MCP Office Word

v0.7.0
io.github.dosev-ai/mcp-office-word Checked 35 minutes ago Published 5 months ago

50-tool Word MCP server.

Values you need

VariableWhat it is
WORD_ALLOWLIST_ROOTSrequired Comma-separated directory roots allowed for file access. Required — no files are accessible without this.
WORD_ENABLE_WRITEoptional Set to 'true' to enable write operations (document content editing and styles).
WORD_ENABLE_COMoptional Set to 'true' to activate COM-backed tools: manage_tracked_changes and export_document (PDF/HTML). Windows-only — requires pywin32 and Microsoft Word.

PyPI (uvx) verified

Requires uv (https://docs.astral.sh/uv/)

Run in a terminal
claude mcp add mcp-office-word -e 'WORD_ALLOWLIST_ROOTS=<WORD_ALLOWLIST_ROOTS>' -- uvx --from mcp-office==0.7.0 excelmcp
Add to claude_desktop_config.json
{
  "mcpServers": {
    "mcp-office-word": {
      "args": [
        "--from",
        "mcp-office==0.7.0",
        "excelmcp"
      ],
      "command": "uvx",
      "env": {
        "WORD_ALLOWLIST_ROOTS": "<WORD_ALLOWLIST_ROOTS>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "mcp-office-word": {
      "args": [
        "--from",
        "mcp-office==0.7.0",
        "excelmcp"
      ],
      "command": "uvx",
      "env": {
        "WORD_ALLOWLIST_ROOTS": "<WORD_ALLOWLIST_ROOTS>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "WORD_ALLOWLIST_ROOTS",
      "id": "word-allowlist-roots",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "mcp-office-word": {
      "args": [
        "--from",
        "mcp-office==0.7.0",
        "excelmcp"
      ],
      "command": "uvx",
      "env": {
        "WORD_ALLOWLIST_ROOTS": "${input:word-allowlist-roots}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.mcp-office-word]
command = "uvx"
args = ["--from", "mcp-office==0.7.0", "excelmcp"]
env = { "WORD_ALLOWLIST_ROOTS" = "<WORD_ALLOWLIST_ROOTS>" }

For AI agents

  1. Ask the user for: WORD_ALLOWLIST_ROOTS. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: get_workbook_context, bulk_copy_sheet, set_row_heights, set_column_widths, bulk_add_comments, fill_formula_range, bulk_range_write, chart, ….
  5. If it fails, check that the required runtime is installed (uv (https://docs.astral.sh/uv/)) and that the values above are set.

Machine-readable: install.md · manifest.json