MCP_Servers_PoC

michaelprinc/MCP_Servers_PoC

3.2

If you are the rightful owner of MCP_Servers_PoC and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

The MCP Server is a production-ready Model Context Protocol server designed for LLM-driven editing of Microsoft Word (.docx) files, supporting both text and images.

Tools
5
Resources
0
Prompts
0

MCP_Servers_PoC

Proof of concept of MCP servers.

📚 DOCX MCP Server

A production-ready Model Context Protocol (MCP) server that enables LLM-driven editing of Microsoft Word (.docx) files with full multimodal support for text and images. This server is compatible with GitHub Copilot, Claude Desktop, and other MCP-compatible agentic systems.

🚀 Quick Start

# Install dependencies
pip install mcp python-docx Pillow

# Run tests
python test_server.py

# Try the example
python example_usage.py

# Start the server
python run_server.py

✨ Features

  • 📖 Read DOCX files - Extract text content and embedded images
  • ✍️ Write DOCX files - Create new documents with text and images
  • ➕ Append content - Add content to existing documents
  • 🔄 Replace text - Find and replace text throughout documents
  • 🖼️ Image support - Handle images with base64 encoding for multimodal operations
  • 📊 Metadata extraction - List all images with properties and dimensions

🛠️ Available Tools

  1. read_docx - Read content from DOCX files including text and images
  2. write_docx - Create or overwrite DOCX files with new content
  3. append_to_docx - Append content to existing DOCX files
  4. replace_text_in_docx - Replace all occurrences of text
  5. list_docx_images - List all images with their metadata

📖 Documentation

  • - Detailed setup instructions
  • - Complete API reference with examples
  • - Real-world use cases and workflows
  • - Complete business proposal example

🎯 Use Cases

Automated Report Generation

Create a monthly sales report with charts and company logo

Document Template Processing

Customize contract templates for different clients

Document Analysis

Extract and summarize content from existing documents

Image Management

Add data visualizations and charts to reports

Batch Updates

Update company name across multiple documents

🔧 Configuration

For GitHub Copilot

Add to your MCP configuration:

{
  "mcpServers": {
    "docx-editor": {
      "command": "python",
      "args": ["run_server.py"],
      "cwd": "/path/to/MCP_Servers_PoC"
    }
  }
}
For Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "docx-editor": {
      "command": "python",
      "args": ["/full/path/to/MCP_Servers_PoC/run_server.py"]
    }
  }
}

💡 Example Usage

With AI Agents:

"Create a Word document at /tmp/report.docx with:
- A title 'Monthly Report'
- A paragraph about sales performance  
- Add a revenue chart (provide base64 image)
- A conclusion paragraph"

The agent automatically uses the appropriate MCP tools to create the document.

🧪 Testing

# Run functional tests
python test_server.py

# Run integration test (creates complete business proposal)
python integration_test.py

# Run example usage
python example_usage.py

📦 Project Structure

MCP_Servers_PoC/
├── src/docx_mcp_server/
│   ├── __init__.py
│   └── server.py              # Main MCP server implementation
├── run_server.py               # Entry point script
├── pyproject.toml             # Python project configuration  
├── requirements.txt           # Dependencies
├── mcp-config.json            # MCP client configuration
├── README.md                  # This file
├── API.md                     # API documentation
├── FEATURES.md                # Features showcase
├── INSTALLATION.md            # Installation guide
├── LICENSE                    # MIT License
├── test_server.py             # Functional tests
├── integration_test.py        # Integration test
└── example_usage.py           # Usage examples

✅ Tested and Verified

  • ✅ All functional tests passing
  • ✅ MCP protocol compliance verified
  • ✅ Sample documents validated (Microsoft Word 2007+ format)
  • ✅ Image embedding and extraction working
  • ✅ Base64 encoding/decoding operational
  • ✅ Compatible with GitHub Copilot and Claude Desktop

🤝 Compatibility

Works with:

  • GitHub Copilot - Agentic workflows
  • Claude Desktop - Direct integration
  • Any MCP-compatible client - Standard stdio transport

📝 Requirements

  • Python 3.10 or higher
  • mcp >= 0.9.0
  • python-docx >= 1.1.0
  • Pillow >= 10.0.0

📄 License

This project is licensed under the MIT License - see the file for details.

🎉 Getting Started

  1. Install dependencies: pip install -r requirements.txt
  2. Configure your MCP client (see configuration examples above)
  3. Start creating documents with natural language!

For detailed instructions, see .