Skip to main content
Glama
Word Office MCP Server

Word Office MCP Server

Word Office MCP Server

A Model Context Protocol (MCP) server that enables LLMs like Claude to interact with Microsoft Word applications through Python automation.

Features

  • Word Automation: Control Microsoft Word through COM interface

  • Document Operations: Create, open, save, and manipulate Word documents

  • Text Processing: Insert, format, and modify text content

  • Advanced Features: Tables, lists, headers/footers, find/replace

  • Document Reading: Extract content and metadata from existing documents

  • MCP Protocol: Full compatibility with Claude and other MCP clients

Related MCP server: Word Document MCP Server

Requirements

  • Python 3.8 or higher

  • Microsoft Word 2016 or later (Windows only)

  • Windows operating system (for COM interface)

Installation

pip install word-mcp-server

Or install from source:

git clone <repository-url>
cd word-mcp-server
pip install -e .

Quick Start

  1. Create a configuration file:

word-mcp-server --create-config
  1. Start the server:

word-mcp-server
  1. Configure Claude to use the MCP server by adding to your MCP configuration:

{
  "mcpServers": {
    "word-office": {
      "command": "word-mcp-server",
      "args": []
    }
  }
}

Configuration

The server uses a YAML configuration file (config.yaml) with the following structure:

server:
  host: "localhost"
  port: 8080
  max_concurrent_docs: 10
  timeout_seconds: 30

word:
  auto_launch: true
  visible: false
  save_on_exit: true
  backup_enabled: true

logging:
  level: "INFO"
  file: "word_mcp_server.log"
  max_size_mb: 100

security:
  allowed_paths:
    - "~/Documents"
    - "~/Desktop"
  enable_macros: false
  max_file_size_mb: 50

Project Structure

word_mcp_server/
├── __init__.py              # Package initialization
├── main.py                  # Main entry point
├── config/                  # Configuration management
│   ├── __init__.py
│   ├── config_manager.py    # Configuration loader
│   └── models.py           # Configuration data models
├── server/                  # MCP server implementation
│   ├── __init__.py
│   └── mcp_server.py       # Main MCP server class
├── word/                    # Word application interface
│   ├── __init__.py
│   ├── controller.py       # COM interface controller
│   └── document_manager.py # Document file operations
└── utils/                   # Utility functions
    ├── __init__.py
    ├── errors.py           # Custom exceptions
    ├── logging.py          # Logging utilities
    └── validators.py       # Input validation

Development Status

This project is currently under development. The following tasks have been completed:

  • Task 1: Project structure and core dependencies

  • Task 2: MCP server foundation

  • Task 3: Word COM interface controller

  • Task 4: Basic document operations

  • Task 5: Advanced document manipulation

  • Task 6: Document reading capabilities

  • Task 7: Headers, footers, and page formatting

  • Task 8: Error handling and logging

  • Task 9: Configuration and deployment

  • Task 10: Advanced Word features

  • Task 11: Testing and documentation

  • Task 12: Packaging and distribution

License

MIT License - see LICENSE file for details.

Contributing

Contributions are welcome! Please read the contributing guidelines before submitting pull requests.

Support

For issues and questions, please use the GitHub issue tracker.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      Not graded
      maintenance
      Enables AI assistants to create, read, and manipulate Microsoft Word documents with comprehensive formatting, table creation, content management, and document protection capabilities. Supports advanced operations like merging documents, PDF conversion, and rich text formatting through a standardized interface.
      32
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables Claude Agent to control Microsoft Word through COM automation, allowing document creation, editing, formatting, and VBA execution while keeping the Word window visible.
      1
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI assistants to drive Microsoft Word for Windows via COM automation, including opening and creating documents, editing text, managing paragraphs, tables, images, styles, tracked changes, and exporting to PDF.
      3
      MIT