Metadata-Version: 2.4
Name: docforge-mcp
Version: 0.1.0
Summary: MCP server for complete Office document manipulation — create, read, edit, convert DOCX/XLSX/PPTX/PDF/EML
Project-URL: Homepage, https://github.com/filhocf/docforge-mcp
Project-URL: Repository, https://github.com/filhocf/docforge-mcp
Project-URL: Issues, https://github.com/filhocf/docforge-mcp/issues
Author-email: Claudio Ferreira Filho <filhocf@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: docforge,documents,docx,mcp,office,pdf,pptx,xlsx
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.10
Requires-Dist: beautifulsoup4>=4.13.4
Requires-Dist: defusedxml>=0.7.1
Requires-Dist: fastmcp>=3.2.0
Requires-Dist: fpdf2>=2.8.0
Requires-Dist: markdown>=3.5
Requires-Dist: openpyxl>=3.1.2
Requires-Dist: pydantic>=2.11.5
Requires-Dist: pystache>=0.6.5
Requires-Dist: python-docx==1.2.0
Requires-Dist: python-dotenv>=1.2.1
Requires-Dist: python-pptx==1.0.2
Requires-Dist: pyyaml
Requires-Dist: requests>=2.31.0
Provides-Extra: cloud
Requires-Dist: azure-storage-blob>=12.23.1; extra == 'cloud'
Requires-Dist: boto3>=1.40.1; extra == 'cloud'
Requires-Dist: botocore>=1.40.1; extra == 'cloud'
Requires-Dist: google-cloud-storage>=2.18.2; extra == 'cloud'
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=1.0; extra == 'dev'
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.4.0; extra == 'dev'
Description-Content-Type: text/markdown

# docforge-mcp

MCP server for **complete Office document manipulation** — create, read, edit, convert, and template DOCX, XLSX, PPTX, PDF, and EML files.

Built for AI agents that need full document lifecycle control, not just one-shot generation.

## Install

```bash
# Via uvx (no install needed)
uvx docforge-mcp

# Or install globally
uv tool install docforge-mcp

# Or pip
pip install docforge-mcp
```

## Tools (38)

| Category | Tools | Capabilities |
|----------|:-----:|--------------|
| **Word (DOCX)** | 12 | Create from markdown, read, edit paragraphs, insert, delete, search/replace, headers/footers, images, merge, templates |
| **Excel (XLSX)** | 7 | Create from markdown, read sheets, edit cells, insert/delete rows, charts, conditional formatting |
| **PowerPoint (PPTX)** | 9 | Create presentations, read slides, edit text, add shapes/images, reorder, duplicate, delete, merge, templates |
| **PDF** | 3 | Create from markdown, convert DOCX→PDF, read |
| **Email (EML)** | 1 | Create HTML email drafts |
| **XML** | 1 | Create well-formed XML |
| **Templates** | 2 | Render DOCX/PPTX with variables, conditionals (`{{#if}}`), loops (`{{#each}}`) |
| **Metadata** | 1 | Get document info/stats |
| **Merge** | 2 | Merge multiple DOCX or PPTX files |

## Usage

### As MCP server (stdio — default)

```bash
docforge-mcp
```

### As HTTP server

```bash
MCP_TRANSPORT=streamable-http MCP_PORT=8958 docforge-mcp
```

### MCP client configuration

```json
{
  "mcpServers": {
    "office-documents": {
      "command": "docforge-mcp",
      "autoApprove": ["read_document", "get_document_info", "get_docx_paragraphs", "get_pptx_slides", "get_xlsx_sheets"]
    }
  }
}
```

## Origins

This project was born from [ForLegalAI/mcp-ms-office-documents](https://github.com/ForLegalAI/mcp-ms-office-documents) (MIT license). It diverged in scope and philosophy:

| | ForLegalAI (upstream) | docforge-mcp |
|---|---|---|
| **Goal** | One-shot document generation | Full document lifecycle |
| **Read** | ❌ | ✅ Read any DOCX/XLSX/PPTX |
| **Edit** | ❌ | ✅ Edit paragraphs, cells, slides |
| **Convert** | ❌ | ✅ DOCX→PDF |
| **Templates** | Simple `{{var}}` | Conditionals + loops |
| **Transport** | Docker + HTTP only | stdio + HTTP |
| **Install** | Docker | `uvx docforge-mcp` |

We continue to contribute compatible features upstream (PRs #57, #58, #59) while developing the full toolkit independently.

## Development

```bash
git clone https://github.com/filhocf/docforge-mcp.git
cd docforge-mcp
uv sync --group dev
uv run pytest tests/ -v
uv run ruff check .
```

## License

MIT — see [LICENSE](LICENSE) for details. Original work © ForLegalAI, extensions © Claudio Ferreira Filho.
