meterlong/mcp-doc 是从 https://github.com/meterlong/mcp-doc. 导入的 MCP 服务器候选
概览
meterlong/mcp-doc 是从 https://github.com/meterlong/mcp-doc. 导入的 MCP 服务器候选
概述(AI 翻译)
英文 |中文
基于FastMCP库的Docx文档处理服务,支持通过光标中的AI助手创建、编辑和管理Word文档。
特色
- 完整文档操作:支持创建、打开、保存文档,以及添加、编辑和删除内容
- 格式化:支持设置字体、颜色、大小、对齐及其他格式选项
- 表处理:支持创建、编辑、合并和拆分表单元格
- 图片插入:支持插入图片和设置图片大小
- 版面控制:支持设置页边距、添加页分隔及其他布局元素
- 查询功能:支持检索文档信息、段落内容和表格数据
- 便捷编辑:支持查找和替换功能
- 章节编辑:支持替换特定部分内容,同时保留原始格式和样式
安装依赖关系
确保安装了 Python 3.10+,然后安装以下依赖:
用途
在光标中作为MCP服务使用
- 打开光标,进入设置
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Docx MCP Service
A Docx document processing service based on the FastMCP library, supporting the creation, editing, and management of Word documents using AI assistants in Cursor.
Features
- 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
Installation Dependencies
Ensure Python 3.10+ is installed, then install the following dependencies:
pip3 install python-docx mcp
Usage
Using as an MCP Service in Cursor
- 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”
Supported Operations
The service supports the following operations:
- Document Management:
create_document,open_document,save_document - Content Addition:
add_paragraph,add_heading,add_table,add_picture - Content Editing:
edit_paragraph,delete_paragraph,delete_text - Table Operations:
add_table_row,delete_table_row,edit_table_cell,merge_table_cells,split_table - Layout Control:
add_page_break,set_page_margins - Query Functions:
get_document_info,get_paragraphs,get_tables,search_text - File Operations:
create_document,open_document,save_document,save_as_document,create_document_copy - Section Editing:
replace_section,edit_section_by_keyword - Other Functions:
find_and_replace,search_and_replace(with preview functionality)
How It Works
- The service uses the Python-docx library to process Word documents
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →