office-mcp
by 1209114767
README.md
# office-mcp
A Python MCP server providing 47 tools for Word, Excel and PowerPoint over stdio.
## Install
Python 3.10 or newer is required. From this directory:
```sh
python -m venv .venv
# Windows Git Bash:
source .venv/Scripts/activate
# Linux/macOS instead: source .venv/bin/activate
python -m pip install '.[dev]'
python smoke_server.py
```
Start the installed console entry point with `office-mcp`, or run `python server.py`
from this checkout. Stdin/stdout belong to the MCP protocol; diagnostics use stderr.
Set `PYTHONUTF8=1` and `PYTHONIOENCODING=utf-8` in your MCP client environment.
Register the absolute path to your virtual environment's `office-mcp` executable
as the MCP command. No network listener is started.
`OFFICE_MCP_DEFAULT_FOLDER` selects the working folder for relative document
paths. It is **not a filesystem sandbox**: trusted clients can supply absolute
paths and modify files readable/writable by the process. Use a restricted OS
account or container when processing untrusted requests or documents.
LibreOffice is optional for PDF and some HTML exports. Set `OFFICE_MCP_SOFFICE`
to its executable if auto-detection fails. Word HTML and Excel CSV work without
LibreOffice. No Office documents, images, local environment or generated files
are bundled in this release tree.
## Verification
```sh
python -m pytest -q
python smoke_server.py
python -m pyflakes office_mcp server.py
```
The smoke test launches the installed console entry point from a temporary
folder, initializes MCP, lists all 47 tools, and calls `list_documents` on that
empty folder. The tests create synthetic files in temporary directories.
## License and provenance
The supplied source metadata declares MIT and credits `office-mcp contributors`.
This release preserves those declarations and includes the MIT permission
text in `LICENSE`. No copyright year or named holder was supplied, so neither
is invented. Retain any original notices when adding third-party contributions.
Dependency licenses remain with their respective owners.
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues