Skip to main content

word-mcp-codemode-live

Windows-first Code Mode MCP server for editing Microsoft Word documents. It exposes a compact discovery and execution interface over file-based DOCX tools and live Word automation instead of loading the entire tool catalog into an agent context.

This project is currently beta software.

Install

Python 3.10 or newer is required. Run the published package in an isolated environment with uvx:

{
  "mcpServers": {
    "word": {
      "command": "uvx",
      "args": ["word-mcp-codemode-live"],
      "env": {
        "MCP_AUTHOR": "Your Name",
        "MCP_AUTHOR_INITIALS": "YN"
      }
    }
  }
}

To install the command permanently:

uv tool install word-mcp-codemode-live
word-mcp-codemode-live

Live editing requires Microsoft Word on Windows. pywin32 drives Word, and PyMuPDF renders Word's PDF output into page images for visual verification.

Modes

  • Code Mode is the default. Clients see search, get_schema, execute, and the two image-producing workflow tools (word_live_edit_batch and word_live_capture_pages). The rest of the catalog is discovered on demand.
  • MCP_TOOL_MODE=full exposes the complete catalog for development and diagnostics.
  • File-based tools edit saved DOCX files with python-docx and OOXML.
  • Windows live tools automate an open Word instance through COM.
  • word_live_edit_batch groups multiple edits into one Undo action, verifies text/layout assertions, saves once, and can return rendered affected pages.
  • word_live_capture_pages returns page images rendered by Word itself.

Transports

The server supports two transports:

  • stdio is the default and the normal choice for a local MCP client.
  • http is opt-in for clients that need a network endpoint.

HTTP binds to loopback by default. This server can read and modify local files and open Word documents, so do not expose it to an untrusted network without an authentication boundary.

Configuration

Variable Default Purpose
MCP_AUTHOR Author Author for comments and tracked changes
MCP_AUTHOR_INITIALS empty Comment author initials
MCP_TOOL_MODE code code for Code Mode or full for the raw catalog
MCP_TRANSPORT stdio stdio or http
MCP_HOST 127.0.0.1 HTTP bind address
MCP_PORT 8000 HTTP bind port
MCP_PATH /mcp HTTP endpoint path

Development

git clone https://github.com/chikingsley/word-mcp-codemode-live.git
cd word-mcp-codemode-live
uv sync

uv run ruff check .
uv run ruff format --check .
uv run ty check
uv run vulture
uv run pytest
uv build --no-sources

Pushes to main run the same checks on Windows. If the version in pyproject.toml does not yet exist on PyPI, the workflow publishes it with uv publish and the repository's PYPI_TOKEN Actions secret. Bump the version before a release:

uv version --bump patch
git add pyproject.toml uv.lock
git commit -m "release: bump version"
git push origin main

Source lives under src/word_mcp_codemode_live/. Tool implementations are grouped by domain in tools/, lower-level Word and OOXML operations live in core/, and registry.py defines the internal tool catalog used by Code Mode.

Acknowledgments

Forked from ykarapazar/word-mcp-live, which was built from GongRzhe/Office-Word-MCP-Server.

License

MIT. See LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

word_mcp_codemode_live-0.1.1.tar.gz (116.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

word_mcp_codemode_live-0.1.1-py3-none-any.whl (135.4 kB view details)

Uploaded Python 3

File details

Details for the file word_mcp_codemode_live-0.1.1.tar.gz.

File metadata

  • Download URL: word_mcp_codemode_live-0.1.1.tar.gz
  • Upload date:
  • Size: 116.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for word_mcp_codemode_live-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e055b54d78483dbbe037fca7bcc194456075ee2d91486f6d31920c95bd4e9264
MD5 60fc18037138b9ea34d1705b13bfadb4
BLAKE2b-256 294bfafbd76dd2dc45eaf8cba58b5dba9aeb295ccea41b3657446615a02922aa

See more details on using hashes here.

File details

Details for the file word_mcp_codemode_live-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: word_mcp_codemode_live-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 135.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for word_mcp_codemode_live-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4d250fdb7e600022792a57f972cfd1896e6eafb89a2c34c75f1609549afe984e
MD5 ca90a756e7f86aa5f80c4e6de26ebe36
BLAKE2b-256 e42960184cea1071072a582bc3ec251a688cce86a0f2399117e1426fa94f2708

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.2

2 files

This release

0.1.1 This release

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page