Get the FREE Ultimate OpenClaw Setup Guide →

office-editor

基于MCP(Model Context Protocol)的Office文档处理助手,支持在MCP Client中创建和编辑Word、Excel、Powerpoint文档。

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio thewdy-office-editor-mcp python /path/to/office_server.py

How to use

This MCP server exposes a full suite of Office document operations (Word, Excel, and PowerPoint) as tools that can be invoked by MCP Clients and AI assistants. It enables creating, editing, formatting, analyzing, and organizing Office documents directly from your AI workflow. You can request actions such as creating a new Word document with metadata, inserting headings and tables, applying text formatting, managing Excel workbooks and worksheets, and constructing PowerPoint presentations with slides, content, and basic animations. Advanced capabilities like OCR extraction from images, document comparison, translation, encryption/decryption, and table data import/export are also available to streamline document processing within your AI environment. To use it, point your MCP client to the configured Python server entry (as shown in the configuration section) and issue the supported function calls via the associated tool commands. The server will interpret your requests and perform the requested Office operations, returning results or document references you can further manipulate in your workflow.

How to install

Prerequisites:

  • Python 3.7 or higher
  • pip (Python package manager)
  • Microsoft Office or compatible components (e.g., python-docx, openpyxl)

Basic installation steps:

  1. Clone the repository:
git clone https://github.com/theWDY/office-editor-mcp.git
cd office-editor-mcp
  1. Install Python dependencies:
pip install -r requirements.txt
  1. Run the MCP server (example):
python office_server.py
  1. (Optional) Configure Cursor or Claude as described in the README to point to your running server using the path /path/to/office_server.py.

Note: Update the path in the mcp.json or your client configuration to reflect the actual location of office_server.py on your system.

Additional notes

Tips and common issues:

  • Ensure your Python environment has access to Office-related libraries (python-docx, openpyxl) and that any required Office components are installed.
  • When configuring the MCP client, use absolute paths for the server script to avoid path resolution issues.
  • If you encounter permission errors when reading/writing documents, verify file system permissions for the target directories and consider running the server with appropriate user privileges.
  • For debugging, enable MCP debugging via environment variable MCP_DEBUG=1 (Linux/macOS) or MCP_DEBUG=1 (Windows).
  • If documents contain custom styles, the server may attempt to create missing styles or fall back to direct formatting; templates with standard Office styles are recommended.
  • When dealing with images in Word or charts in Excel, provide absolute file paths and ensure the files are accessible by the server process.

Related MCP Servers

Sponsor this space

Reach thousands of developers