MCP-Doc 文档处理工具添加福利群:解决AI开发者的「MCP实战痛点」一个基于 FastMCP 库的 Docx 文档处理服务,支持在 Cursor 中使用 AI 助手创建、编辑和管理 Word 文档。
确保已安装 Python 3.10+,然后安装以下依赖:
pip3 install python-docx mcp
Features > MCP Servers 部分Add new MCP serverpython3 /path/to/MCP_dox/server.py(请替换为实际的 server.py 路径)Add 添加服务添加后,您可以在 Cursor 的 AI 助手中使用自然语言来操作 Word 文档,例如:
该服务支持以下操作:
create_document, open_document, save_documentadd_paragraph, add_heading, add_table, add_pictureedit_paragraph, delete_paragraph, delete_textadd_table_row, delete_table_row, edit_table_cell, merge_table_cells, split_tableadd_page_break, set_page_marginsget_document_info, get_paragraphs, get_tables, search_textcreate_document, open_document, save_document, save_as_document, create_document_copyreplace_section, edit_section_by_keywordfind_and_replace, search_and_replace(带预览功能)该服务具有良好的排版理解能力:
server.py - 使用 FastMCP 库实现的 MCP 服务的核心代码如果在 Cursor 中遇到问题,请尝试以下步骤:
MIT 许可证