Office-Word-MCP-Server  by GongRzhe

AI assistant for Microsoft Word document manipulation

Created 5 months ago
750 stars

Top 46.3% on SourcePulse

GitHubView on GitHub
Project Summary

This project provides a Model Context Protocol (MCP) server for programmatic interaction with Microsoft Word documents, enabling AI assistants to create, read, and manipulate .docx files. It offers a comprehensive set of tools for document management, content creation, rich text formatting, table manipulation, and document protection, serving as a bridge between AI and Word.

How It Works

The server implements the Model Context Protocol (MCP) to expose Word document operations as tools. It leverages the python-docx library for core document manipulation, abstracting its functionality into a standardized, extensible interface. This modular architecture separates concerns, allowing for easier maintenance and future enhancements, and is designed for integration with AI assistants like Claude Desktop.

Quick Start & Requirements

  • Installation: pip install -r requirements.txt after cloning the repository. Alternatively, use npx -y @smithery/cli install @GongRzhe/Office-Word-MCP-Server --client claude.
  • Prerequisites: Python 3.8+, pip.
  • Configuration: Add server details to Claude Desktop's claude_desktop_config.json file.
  • Docs: https://github.com/GongRzhe/Office-Word-MCP-Server

Highlighted Details

  • Supports creating new documents, extracting text, and analyzing document structure.
  • Enables rich content creation including tables, images, footnotes, and custom styles.
  • Offers advanced features like document protection (password, restricted editing) and digital signatures.
  • Includes text formatting, search/replace, and table formatting capabilities.

Maintenance & Community

Contributions are welcome via pull requests. The project is open source under the MIT license.

Licensing & Compatibility

MIT License. Compatible with commercial use and closed-source linking.

Limitations & Caveats

The server interacts directly with local files; users should verify operations. Missing styles in documents may lead to direct formatting or style creation attempts. Permission issues for file access might require using copy_document or adjusting file permissions. Image insertion requires compatible formats and absolute paths.

Health Check
Last Commit

1 week ago

Responsiveness

1 day

Pull Requests (30d)
3
Issues (30d)
7
Star History
130 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.