MCP Office Documents Server
by ForLegalAI
README.md
<div align="center">
# ๐ MCP Office Documents Server
[](https://mcptoplist.com/server/glama%2FForLegalAI%2Fmcp-ms-office-documents)
**Let your AI assistant create professional Office documents โ PowerPoint, Word, Excel, emails & XML โ with a single prompt.**
[](https://hub.docker.com/r/georgx22/mcp-office-docs)
[](https://modelcontextprotocol.io/)
[](LICENSE)
</div>
---
## ๐ก What is this?
This is an **MCP (Model Context Protocol) server** that runs in Docker and gives AI assistants (like Claude, Cursor, or any MCP-compatible client) the ability to generate real Office files on demand.
Just ask your AI to _"create a sales presentation"_ or _"draft a welcome email"_ โ and it will produce a ready-to-use file for you.
**No coding required.** Install, connect, and start creating.
---
## โจ Features at a Glance
| Document Type | Tool | Highlights |
|:---:|---|---|
| ๐ **PowerPoint** | `create_powerpoint_presentation` | Typed slide schema (14 slide types incl. KPI, timeline, agenda, free-form blank) ยท Outline-pane sections ยท Markdown bullet bodies ยท Tables, category charts & XY scatter ยท Inline & data-URI images ยท Theme colours ยท Autofit with overflow warnings ยท Proofing language ยท 4:3 or 16:9 ยท Custom templates |
| ๐ **Word** | `create_word_from_markdown` | Write in Markdown, get a `.docx` ยท Headings, lists (with auto-restart), tables, links, images, block quotes, page breaks & text alignment ยท Superscript, subscript, underline & highlighted text ยท Table column alignment, borderless tables, proportional widths & multi-paragraph cells ยท Headers/footers with page numbers ยท Table of Contents ยท Custom style mapping & per-block style tags |
| ๐ **Excel** | `create_excel_from_markdown` | Markdown tables โ `.xlsx` ยท Multiple sheets ยท Formulas with table-relative & cross-sheet references ยท Column data types ยท Freeze panes & auto-filter ยท Column alignment |
| ๐ง **Email** | `create_email_draft` | HTML email drafts (`.eml`) ยท Subject, recipients, priority, language |
| ๐๏ธ **XML** | `create_xml_file` | Well-formed XML files ยท Auto-validates & adds XML declaration if missing |
All tools accept an optional **`file_name`** parameter. When provided, the output file will use that name (without extension) instead of a randomly generated identifier.
All tools also accept an optional **`add_unique_prefix`** parameter. Left unset, it follows the storage backend: `true` for `LOCAL`/`S3`/`GCS`/`AZURE`/`MINIO`, where an 8-character UUID prefix prevents collisions in shared storage (e.g., `ff8ae81d_My_Report.docx`), and `false` for LibreChat, which adds its own UUID prefix during file storage. Set it explicitly to override โ `false` gives clean filenames (e.g., `My_Report.docx`).
**Dynamic templates:**
- ๐ง **Reusable Email Templates** โ Define parameterized email layouts in YAML. Each becomes its own tool with typed arguments (e.g., `first_name`, `promo_code`).
- ๐ **Reusable Word Templates** โ Create `.docx` files with `{{placeholders}}`. Each template becomes an AI tool. Placeholders support full Markdown.
**Output options:**
- **Local** โ Files saved to the `output/` folder
- **Cloud** โ Upload to S3, Google Cloud Storage, Azure Blob, or MinIO and get a time-limited download link
---
## ๐ Quick Start
### 1. Get the compose file
```bash
curl -L -o docker-compose.yml https://raw.githubusercontent.com/ForLegalAI/mcp-ms-office-documents/master/docker-compose.yml
curl -L -o .env.example https://raw.githubusercontent.com/ForLegalAI/mcp-ms-office-documents/master/.env.example
```
> Already cloned the repo? Skip this step โ both files are already there.
### 2. Set up your environment
```bash
cp .env.example .env
```
The defaults work out of the box โ files are saved locally to `output/`.
### 3. Start the server
```bash
docker compose up -d
```
โ
**Done!** Your MCP endpoint is ready at `http://localhost:8958/mcp`. Point your client at it โ snippets for Claude Desktop, LibreChat and Cursor are in [Connecting an AI client](docs/clients.md).
---
## โ๏ธ Configuration
Everything is set through environment variables in `.env`. The ones most deployments touch:
| Variable | Description | Default |
|----------|-------------|---------|
| `API_KEY` | Require an API key on every request (`Bearer`, plain `Authorization`, or `x-api-key`) | _(disabled)_ |
| `UPLOAD_STRATEGY` | Where files go: `LOCAL`, `S3`, `GCS`, `AZURE`, `MINIO`, `LIBRECHAT` | `LOCAL` |
| `SIGNED_URL_EXPIRES_IN` | Lifetime of cloud download links, in seconds | `3600` |
| `ADMIN_ENABLED` | Turn on the browser UI for managing templates | _(off)_ |
| `DEBUG` | Debug-level logging | _(off)_ |
The full list, including the per-backend credentials, thread-pool and multi-replica settings, is in [Configuration](docs/configuration.md). Deployment notes (volumes, health probes, running without Docker, more than one replica) are in [Deployment](docs/deployment.md).
---
## ๐ Documentation
**Using the tools**
- [Markdown reference](docs/markdown-reference.md) โ everything the Word and Excel tools accept: headings, lists with restart rules, tables and directives, inline formatting, formulas with table-relative and cross-sheet references, column types, cell styling.
- [PowerPoint slide reference](docs/powerpoint-slides.md) โ the fourteen slide types and their fields, bodies in Markdown, warnings, compatibility notes.
- [Templates](docs/templates.md) โ drop in your own Word, PowerPoint, email and Excel templates; register several PowerPoint designs by name; turn a Word or email file with `{{placeholders}}` into a tool of its own.
- [Template Admin UI](docs/admin-ui.md) โ do all of that from the browser, no YAML, no restart.
- [Connecting an AI client](docs/clients.md)
**Working on the code**
- [Architecture](docs/development/architecture.md), one page per tool under [docs/development/tools/](docs/development/tools/), and how-tos for [adding a tool](docs/development/adding-a-tool.md) or [a storage backend](docs/development/adding-a-backend.md).
- [CONTRIBUTING.md](CONTRIBUTING.md) for setup, checks and conventions; [AGENTS.md](AGENTS.md) for the rules coding agents follow; [SECURITY.md](SECURITY.md) for what the server protects.
The index is at [docs/README.md](docs/README.md).
---
## ๐ค Contributing
Contributions are welcome. Read [CONTRIBUTING.md](CONTRIBUTING.md), then fork, branch, and open a pull request. Bug reports, feature ideas and documentation fixes are all appreciated โ open an [issue](https://github.com/ForLegalAI/mcp-ms-office-documents/issues) to start a discussion.
## ๐ License
MIT โ see [LICENSE](LICENSE).
This server cannot be deployed
Maintenance
ActivityActive
ResponsivenessResponsive