Word MCP
Enables programmatic generation of Microsoft Word documents (.docx) from AI-generated text and data, with support for Markdown formatting, tables, headers, and rich document elements that are saved directly to the local file system.
README
Word MCP
A Model Context Protocol (MCP) server for generating Microsoft Word documents (.docx) programmatically. Unlike typical MCP servers that act as gateways to APIs, this server acts as a Factory, converting AI-generated text and data into professional, downloadable files.
Features
Document Generation
- generate_report: Create complete Word documents in one shot
- Markdown Support: Automatically converts basic Markdown (bold, lists) into Word formatting
- Rich Elements: Supports:
- Headers (Levels 1-3)
- Data Tables with custom headers
- Text Paragraphs
- File metadata (Titles, Authors)
Architecture
- Local File Output: Saves files directly to your host machine
- Dockerized Factory: Runs securely in a container with volume mapping
- Stateless Operation: No complex databases required
Simple Setup
1. Local Development
-
Install dependencies:
npm install -
Create a
.envfile (Optional, defaults to./output):OUTPUT_DIR=./generated_reports -
Build and start:
npm run build npm start
2. Docker Usage
Critical Note: Because this server creates files, you must mount a volume to see the output.
-
Build the image:
docker build -t word-mcp . -
Run with Volume Mapping:
docker run --rm -i \ -v $(pwd)/generated_reports:/app/output \ word-mcp
MCP Client Integration
Configuration for Claude Desktop
To allow the AI to save files to your Windows "Documents" folder, you must map the volume in the configuration.
-
Open your config file:
- Windows:
%APPDATA%\Claude\claude_desktop_config.json - macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
-
Add this configuration:
{ "mcpServers": { "word-mcp": { "command": "docker", "args": [ "run", "--rm", "-i", "-v", "C:\\Users\\hp\\Documents\\mcp\\word-mcp\\generated_reports:/app/output", "word-mcp" ] } } }Note: Update the path
C:\\Users\\hp...to match your actual project location.
Using with Docker Compose
If you prefer docker-compose, use the included configuration:
# docker-compose.yml
services:
word-mcp:
build: .
volumes:
- ./generated_reports:/app/output
Usage Examples
Generate a Project Audit
The AI can call the tool with structured data to create a formatted report.
{
"filename": "Audit_Report_2024",
"title": "Q4 Security Audit",
"sections": [
{
"heading": "Executive Summary",
"content": "The audit was completed on **January 20th**. No critical vulnerabilities were found."
},
{
"heading": "Vulnerability Matrix",
"table": {
"headers": ["Severity", "Count", "Status"],
"rows": [
["High", "0", "Pass"],
["Medium", "2", "Investigating"]
]
}
}
]
}
Troubleshooting
"I can't find the generated file"
- Check Volume Mapping: Ensure your
claude_desktop_config.jsonhas the-vflag pointing to a valid folder on your host machine. - Docker Permissions: The container runs as a non-root user (
appuser). Ensure your host folder allows writing (usually automatic on Windows, but requireschmodon Linux).
"Error: Output directory does not exist"
The server attempts to create the directory on startup. If using Docker, ensure the internal path /app/output is correctly mapped.
"Formatting looks wrong"
Currently, the Markdown parser supports bold (**text**) and basic paragraph splitting. Complex Markdown (like code blocks or nested lists) will be rendered as plain text in this version.
Development
Run in development mode:
npm run dev
Watch for changes:
npm run watch
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.