Cover image
Try Now
2025-03-16

一个基于FASTMCP的强大Word文档处理服务,使AI助手能够以完整的格式支持创建,编辑和管理DOCX文件。编辑内容时保留原始样式。 基于fastmcp的强大word文档处理服务,使ai 助手能够创建、编辑和管理 docx文件,支持完整的格式设置功能。在编辑内容时能够保留原始样式和格式,实现精确的文档操作。,实现精确的文档操作。

3 years

Works with Finder

2

Github Watches

5

Github Forks

49

Github Stars

Docx MCP Service

English | 中文

smithery badge

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

  1. Open Cursor and go to Settings
  2. Find the Features > MCP Servers section
  3. Click Add new MCP server
  4. Fill in the following information:
    • Name: MCP_DOCX
    • Type: Command
    • Command: python3 /path/to/MCP_dox/server.py (replace with the actual path to your server.py)
  5. Click Add to 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

  1. The service uses the Python-docx library to process Word documents
  2. It implements the MCP protocol through the FastMCP library to communicate with AI assistants
  3. It processes requests and returns formatted responses
  4. It supports complete error handling and status reporting

Typography Capabilities

The service has good typography understanding capabilities:

  • Text Hierarchy: Support for heading levels (1-9) and paragraph organization
  • Page Layout: Support for page margin settings
  • Visual Elements: Support for font styles (bold, italic, underline, color) and alignment
  • Table Layout: Support for creating tables, merging cells, splitting tables, and setting table formats
  • Pagination Control: Support for adding page breaks

Development Notes

  • server.py - Core implementation of the MCP service using the FastMCP library

Troubleshooting

If you encounter problems in Cursor, try the following steps:

  1. Ensure Python 3.10+ is correctly installed
  2. Ensure the python-docx and mcp libraries are correctly installed
  3. Check if the server path is correct
  4. Restart the Cursor application

Notes

  • Ensure the python-docx and mcp libraries are correctly installed
  • Ensure Chinese characters in paths can be correctly processed
  • Using absolute paths can avoid path parsing issues

License

MIT License

相关推荐

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • https://zenepic.net
  • Embark on a thrilling diplomatic quest across a galaxy on the brink of war. Navigate complex politics and alien cultures to forge peace and avert catastrophe in this immersive interstellar adventure.

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • pontusab
  • 光标与风浪冲浪社区,查找规则和MCP

  • ravitemer
  • 一个功能强大的Neovim插件,用于管理MCP(模型上下文协议)服务器

  • jae-jae
  • MCP服务器使用剧作《无头浏览器》获取网页内容。

  • patruff
  • Ollama和MCP服务器之间的桥梁,使本地LLMS可以使用模型上下文协议工具

  • av
  • 毫不费力地使用一个命令运行LLM后端,API,前端和服务。

  • Mintplex-Labs
  • 带有内置抹布,AI代理,无代理构建器,MCP兼容性等的多合一桌面和Docker AI应用程序。

  • appcypher
  • 很棒的MCP服务器 - 模型上下文协议服务器的策划列表

  • 1Panel-dev
  • 🔥1Panel提供了直观的Web接口和MCP服务器,用于在Linux服务器上管理网站,文件,容器,数据库和LLMS。

    Reviews

    1 (1)
    Avatar
    user_cX8ilZxo
    2025-04-16

    I have been using MCP-Doc by MeterLong and it has significantly boosted my productivity. The tool offers comprehensive functionality and the documentation is well-structured, making it easy to navigate. I appreciate the frequent updates and the responsive support from the author. Highly recommend it to anyone in need of a robust documentation tool! For more information, visit: https://github.com/MeterLong/MCP-Doc