A Docx document processing service based on the FastMCP library, supporting the creation, editing, and management of Word documents using AI assistants in Cursor.
- Complete Document Operations: Support for creating, opening, saving documents, as well as adding, editing, and deleting content
- Formatting: Support for setting fonts, colors, sizes, alignment, and other formatting options
- Table Processing: Support for creating, editing, merging, and splitting table cells
- Image Insertion: Support for inserting images and setting their sizes
- Layout Control: Support for setting page margins, adding page breaks, and other layout elements
- Query Functions: Support for retrieving document information, paragraph content, and table data
- Convenient Editing: Support for find and replace functionality
- Section Editing: Support for replacing content in specific sections while preserving original formatting and styles
Ensure Python 3.10+ is installed, then install the following dependencies:
pip3 install python-docx mcp- Open Cursor and go to Settings
- Find the
Features > MCP Serverssection - Click
Add new MCP server - Fill in the following information:
- Name: MCP_DOCX
- Type: Command
- Command:
python3 /path/to/MCP_dox/server.py(replace with the actual path to yourserver.py)
- Click
Addto add the service
After adding, you can use natural language to operate Word documents in Cursor's AI assistant, for example:
- "Create a new Word document and save it to the desktop"
- "Add a level 3 heading"
- "Insert a 3x4 table and fill it with data"
- "Set the second paragraph to bold and center-aligned"