Cover image
Try Now
2025-03-26

3 years

Works with Finder

1

Github Watches

0

Github Forks

4

Github Stars

Word Tools MCP Server

A Model Context Protocol (MCP) server that provides AI-powered Word document manipulation capabilities. This server implements the MCP protocol to enable AI applications to create, edit, and manage Word documents through natural language interactions.

smithery badge

Features

  • Full MCP protocol implementation
  • Word document creation and management
  • Rich text content manipulation
  • Table creation and formatting
  • Document layout control
  • Document metadata management
  • Real-time document state monitoring

Prerequisites

  • Node.js 14 or higher
  • Microsoft Word (optional, for advanced features)

Installation

npx @puchunjie/doc-tools-mcp

Or install globally:

npm install -g @puchunjie/doc-tools-mcp

For use as a dependency in your project:

npm install @puchunjie/doc-tools-mcp

Usage

  1. Start the MCP server:
npx @puchunjie/doc-tools-mcp
  1. The server will start on port 8765 by default

  2. Configure your AI application (e.g., Cursor, VSCode) to use the MCP server:

    http://localhost:8765
    

MCP Tools

The server provides the following MCP functions:

  • create_document - Create a new Word document

    • Parameters: filePath (required), title, author
  • open_document - Open an existing Word document

    • Parameters: filePath (required)
  • add_paragraph - Add a paragraph to the document

    • Parameters: filePath (required), text (required), style, alignment
  • add_table - Add a table to the document

    • Parameters: filePath (required), rows (required), cols (required), headers, data
  • search_and_replace - Find and replace text in the document

    • Parameters: filePath (required), searchText (required), replaceText (required), matchCase
  • set_page_margins - Set document page margins

    • Parameters: filePath (required), top, right, bottom, left
  • get_document_info - Get document metadata

    • Parameters: filePath (required)

Integration with AI Applications

Cursor

  1. Open the Cursor configuration file ~/.cursor/mcp.json
  2. Add the following configuration:
{
  "mcpServers": {
    "doc-tools-mcp": {
      "command": "npx",
      "args": [
        "@puchunjie/doc-tools-mcp"
      ]
    }
  }
}

Or for local development version:

{
  "mcpServers": {
    "doc-tools-mcp": {
      "command": "node",
      "args": [
        "/path/to/your/doc-tools-mcp/dist/mcp-server.js"
      ]
    }
  }
}

After configuration, you can use natural language to manipulate Word documents:

"Create a new document named report.docx"
"Add a heading 'Monthly Report' to report.docx"
"Insert a 4x3 table with sales data"

VSCode and Other MCP-Compatible Tools

Similar integration steps apply to other tools that support the MCP protocol. Consult your tool's documentation for specific MCP server configuration steps.

Development

To extend or modify this MCP server:

  1. Clone the repository:
git clone <repository-url>
cd doc-tools-mcp
  1. Install dependencies:
npm install
  1. Start in development mode:
npm run start
  1. Build for production:
npm run build

Adding New MCP Functions

  1. Add new methods in src/services/DocumentService.ts
  2. Register new functions in src/mcp-server.ts
  3. Update type definitions as needed

Configuration

  • Default port: 8765 (configurable)
  • Supported file types: .docx
  • All file paths should be absolute or relative to the current working directory

License

MIT

Support

If you encounter any issues or have suggestions for improvements, please submit an issue on our GitHub repository.

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • 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.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • 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.

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

  • Yasir Eryilmaz
  • AI scriptwriting assistant for short, engaging video content.

  • Daren White
  • A supportive coach for mastering all Spanish tenses.

  • J. DE HARO OLLE
  • Especialista en juegos de palabras en varios idiomas.

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

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

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

  • huahuayu
  • 统一的API网关,用于将多个Etherscan样区块链Explorer API与对AI助手的模型上下文协议(MCP)支持。

  • deemkeen
  • 用电源组合控制您的MBOT2:MQTT+MCP+LLM

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

  • HiveNexus
  • 一个适用于中小型团队的AI聊天机器人,支持DeepSeek,Open AI,Claude和Gemini等车型。 专为中小团队设计的ai聊天应用,支持deepSeek,打开ai,claude,双子座等模型。

  • zhaoyunxing92
  • MCP(消息连接器协议)服务

    Reviews

    2 (1)
    Avatar
    user_oDNDAOIZ
    2025-04-16

    I've been using doc-tools-mcp by puchunjie and it has significantly improved my documentation process. The tool is well-structured and easy to integrate into my workflow. You can find it on GitHub at the following link: https://github.com/puchunjie/doc-tools-mcp.git. Highly recommended for developers looking to streamline their documentation tasks!