Word Live MCP Server

Word Live MCP Server

A Windows MCP server that attaches to a running Microsoft Word instance via COM automation and exposes 20 tools for reading, editing, formatting, and exporting documents — live on screen.

Category
访问服务器

README

Word Live MCP Server

A Windows MCP (Model Context Protocol) server that attaches to a running Microsoft Word instance via COM automation and exposes 20 tools for reading, editing, formatting, and exporting documents — live on screen.

The Word counterpart to the PowerPoint Live MCP.

How It Works

The server attaches to the running Word.Application instance via win32com (pywin32). Because it talks to the live COM object, every edit appears instantly on the Word canvas — no file round-trip, no reopen.

Tools (20)

Category Tool Description
Discovery list_documents List all open Word documents
get_active_document Details of active document (name, path, word/para count)
Read get_document_content Paginated paragraph listing with styles
get_paragraph Full text + formatting of one paragraph
get_table All cell content from a table
get_selection Current cursor/selection state
find_text Full-text search with paragraph locations
Edit set_paragraph_text Replace text of a paragraph
insert_paragraph_after Insert new paragraph after a given index
delete_paragraph Delete a paragraph
replace_text Find-and-replace throughout document
Format set_font Font size/bold/italic/color/name
set_highlight Yellow/red/green/none highlight
set_paragraph_style Apply named style (Heading 1, Normal, etc.)
Tables set_table_cell Set cell text by (row, column)
insert_table Insert a new table
Export export_pdf Export document to PDF
export_page_image Export single page as PNG (via PDF render)
Other update_toc Update all Tables of Contents
save_document Save the document

Requirements

  • Windows + Microsoft Word installed
  • Python 3.11+ with these packages:
    pip install pywin32 mcp pymupdf
    
    Run python Scripts/pywin32_postinstall.py -install once after installing pywin32.

Installation

Hermes Agent

Add to ~/.hermes/config.yaml:

mcp_servers:
  word:
    command: "C:/Users/You/AppData/Local/Programs/Python/Python313/python.exe"
    args: ["C:/path/to/word-live-mcp/server.py"]
    connect_timeout: 30
    enabled: true
    timeout: 90

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "word": {
      "command": "python",
      "args": ["C:/path/to/word-live-mcp/server.py"]
    }
  }
}

Generic MCP Client

The server communicates over stdio using the MCP protocol. Any MCP-compatible client can connect by spawning the server process.

Usage

Word must be running with a document open. Tools operate on the active document by default; pass doc="filename.docx" to target a specific open document.

Paragraph and table indices are 1-indexed (matching what you see in Word).

Example workflows

  • "Read me paragraph 5"get_paragraph(paragraph_index=5)
  • "Find all mentions of 'confidential'"find_text(find="confidential")
  • "Replace 'old term' with 'new term'"replace_text(find="old term", replace="new term")
  • "Highlight paragraph 20 in yellow"set_highlight(paragraph_index=20, color="yellow")
  • "Show me what page 3 looks like"export_page_image(page=3)
  • "Set paragraph 10 font to bold red"set_font(paragraph_index=10, bold=True, color_rgb="FF0000")

Architecture

  • COM session per call: Each tool call re-initialises COM (pythoncom.CoInitialize) and dispatches Word.Application, which transparently reconnects to the running instance.
  • app parameter injection: The word_tool decorator injects the COM app handle as the first argument, but strips it from the public signature so FastMCP doesn't expose it.
  • Graceful errors: All exceptions are caught and returned as {"error": "...", "traceback": "..."} JSON dicts — never crash the server.
  • 1-indexed: Paragraph and table indices match what the user sees in Word.

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选