Metadata-Version: 2.4
Name: opendocswork-mcp
Version: 0.2.0
Summary: Rust-native MCP server for Office document processing — sub-millisecond, local-first, open source
Author-email: Aimino Tech GmbH <hello@aimino.de>
License-Expression: GPL-3.0-only
Project-URL: Homepage, https://github.com/Aimino-Tech/opendocswork-mcp
Project-URL: Repository, https://github.com/Aimino-Tech/opendocswork-mcp
Project-URL: Documentation, https://github.com/Aimino-Tech/opendocswork-mcp
Keywords: mcp,office,ooxml,excel,word
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Rust
Classifier: Topic :: Office/Business :: Office Suites
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# opendocswork-mcp

**Rust-native MCP server for Office document processing (Excel, Word, PowerPoint).**  
Sub-millisecond, local-first, open source — the "open source Aspose."

<p align="center">
  <a href="https://github.com/Aimino-Tech/opendocswork-mcp/discussions"><img src="https://img.shields.io/badge/GitHub-Discussions-%23181717?logo=github" alt="GitHub Discussions"></a>
  <a href="LICENSE"><img src="https://img.shields.io/badge/license-GPL%203.0-blue" alt="License"></a>
</p>

---

## Quick Start

```bash
cargo install opendocswork-mcp
```

Or download from [GitHub Releases](https://github.com/Aimino-Tech/opendocswork-mcp/releases).

### Claude Desktop

```json
{
  "mcpServers": {
    "office": { "command": "opendocswork-mcp", "args": ["--transport", "stdio"] }
  }
}
```

### Cursor

```json
{
  "mcpServers": {
    "opendocswork-mcp": { "command": "opendocswork-mcp", "args": ["--transport", "stdio"] }
  }
}
```

### VS Code (Copilot)

```json
{
  "servers": {
    "opendocswork-mcp": { "command": "opendocswork-mcp", "args": ["--transport", "stdio"] }
  }
}
```

---

## Use Cases

Every document below was generated by opendocswork-mcp — click to download.

| # | Format | Use Case | Skill | Preview |
|---|--------|----------|-------|---------|
| 1 | XLSX | [Profit & Loss Statement](showcase/generated/01-posch-energy-pnl/01-posch-energy-pnl.xlsx) | `excel.basic` | <img src="showcase/previews/01-pnl.png" width="180" alt="P&L"> |
| 2 | XLSX | [Executive KPI Dashboard](showcase/generated/02-meyer-automotive-kpi/02-meyer-automotive-kpi.xlsx) | `excel.basic` | <img src="showcase/previews/02-kpi.png" width="180" alt="KPI"> |
| 3 | XLSX | [Budget vs Actual Variance](showcase/generated/03-liebermann-health-budget/03-liebermann-health-budget.xlsx) | `excel.basic` | <img src="showcase/previews/03-budget.png" width="180" alt="Budget"> |
| 4 | XLSX | [Balance Sheet with Ratios](showcase/generated/04-wolfsburg-financial-balance/04-wolfsburg-financial-balance.xlsx) | `excel.basic` | <img src="showcase/previews/04-balance.png" width="180" alt="Balance"> |
| 5 | XLSX | [Revenue Forecast](showcase/generated/10-hoffmann-machine/10-hoffmann-machine.xlsx) | `excel.basic` | <img src="showcase/previews/10-forecast.png" width="180" alt="Forecast"> |
| 6 | XLSX | [Cost Analysis](showcase/generated/11-beck-energy/11-beck-energy.xlsx) | `excel.basic` | <img src="showcase/previews/11-cost.png" width="180" alt="Cost"> |
| 7 | DOCX | [Invoice](showcase/generated/05-thyssen-steel/05-thyssen-steel.xlsx) | `word.invoice` | <img src="showcase/previews/05-invoice.png" width="180" alt="Invoice"> |
| 8 | DOCX | [Annual Business Report](showcase/generated/15-meyer-automotive-report/15-meyer-automotive-report.docx) | `word.report` | <img src="showcase/previews/15-report.png" width="180" alt="Report"> |
| 9 | DOCX | [IT Service Agreement](showcase/generated/17-liebermann-health-contract/17-liebermann-health-contract.docx) | `word.report` | <img src="showcase/previews/17-contract.png" width="180" alt="Contract"> |
| 10 | DOCX | [Digital Strategy Report](showcase/generated/16-wolfsburg-digital-strategy/16-wolfsburg-digital-strategy.docx) | `word.report` | <img src="showcase/previews/16-strategy.png" width="180" alt="Strategy"> |
| 11 | PDF | [Financial Report Export](showcase/generated/06-bauer-construction/06-bauer-construction.xlsx) | `office_export_pdf` | <img src="showcase/previews/06-pdfexport.png" width="180" alt="PDF"> |

> **Interactive showcase → [`showcase/use-cases.html`](showcase/use-cases.html)** with full prompts, JSON-RPC calls, and details.

---

## Tool Overview

| Tool | Description | Inputs |
|---|---|---|
| `list_formats` | All supported Office formats + capabilities | — |
| `get_document_info` | File metadata (format, size, readability) | `file_path` |
| `office_read` | Read content → JSON / Markdown / Chunks | `file_path`, `output_format` |
| `increment` | Increment counter (demo) | — |
| `get_value` | Get current counter value (demo) | — |

### Full Suite

**AI Reading:** `to_md`, `to_json`, `to_chunks`, `excel_schema`, `coherence_check`

**Excel Write:** `office_create_xlsx`, `office_write_cell`, `office_write_range`, `office_format_range`, `office_create_chart`, `office_create_pivot`, `office_add_sheet`, `office_rename_sheet`, `office_delete_sheet`, `office_merge_cells`, `office_set_column_width`, `office_apply_conditional_format`

**Word Write:** `office_create_docx`, `office_write_docx_from_md`, `office_replace_text`, `office_set_style`, `office_add_table`, `office_add_image`, `office_add_header_footer`, `office_add_toc`, `office_add_comment`, `office_accept_changes`

**PPT Write:** `office_create_pptx`, `office_add_slide`, `office_set_slide_layout`, `office_add_text_box`, `office_add_chart`, `office_add_image`

**Skills System:** `skill_run`, `skill_list`, `skill_validate`, `skill_register`

**Coherence Engine:** `office_propagate_edit`, `office_check_consistency`

**Batch & PDF:** `office_batch_read`, `office_batch_convert`, `office_export_pdf`, `office_fill_pdf_form`, `office_list_pdf_fields`

---

## Architecture

```
┌────────────────────────────────────────────────────────┐
│                    MCP Transport                        │
│           rmcp 1.7+ — stdio + Streamable HTTP          │
│              0.38ms per call · 4,845 RPS               │
├────────────────────────────────────────────────────────┤
│                     Tool Layer                          │
│  AI Reading · Excel/Word/PPT · Skills · Coherence      │
├────────────────────────────────────────────────────────┤
│                   OOXML Engine                          │
│  calamine · rust_xlsxwriter · rdocx · office_oxide     │
│          6 formats: DOCX/XLSX/PPTX/DOC/XLS/PPT         │
├────────────────────────────────────────────────────────┤
│                  ZIP + XML Layer                        │
│    quick-xml (zero-copy) · zip · zlib-ng (SIMD)        │
├────────────────────────────────────────────────────────┤
│                 Semantic Layer                          │
│    Entity DAG · BFS propagation · Stale detection      │
└────────────────────────────────────────────────────────┘
```

---

## Performance Benchmarks

| Operation | Python | opendocswork-mcp | Speedup |
|---|---|---|---|
| 10M cell XLSX read (openpyxl) | 239s | ~25s | **~10×** |
| 100K cell XLSX write (openpyxl) | 1.8s | 152ms | **~12×** |
| DOCX read mean (6K docs) | 11.8ms | 0.8ms | **~14×** |
| PPTX read mean (323 slides) | 32.5ms | 0.7ms | **~46×** |
| MCP tool call (FastMCP) | 3ms | 0.38ms | **~6×** |
| Cold start | 1-5s | <50ms | **~100×** |
| Memory (idle) | 42.7MB | <2MB | **~20×** |

---

## Build

```bash
cargo build                           # Debug
cargo build --release                 # Release
cargo clippy                          # Lint
cargo doc --open                      # Docs
```

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md). All contributions welcome.

## License

GNU General Public License v3.0 — see [LICENSE](LICENSE).
