by GongRzhe
Creates, reads, and manipulates Microsoft Word documents through a standardized interface for AI assistants, enabling rich editing, formatting, and analysis capabilities.
Office Word MCP Server provides a set of tools and resources that expose Microsoft Word document operations—such as creation, content insertion, formatting, table handling, comment extraction, and protection—via the Model Context Protocol. AI assistants can invoke these functions to work with .docx
files without needing direct access to the Word application.
npx -y @smithery/cli install @GongRzhe/Office-Word-MCP-Server --client claude
python word_mcp_server.py
or the installed package).MCP_DEBUG
.Q: Do I need Microsoft Word installed?
A: No. The server uses the python‑docx
library to manipulate .docx
files directly.
Q: Which Python version is required? A: Python 3.8 or newer.
Q: How are colors specified for table cells?
A: Use hex codes without the ‘#’ (e.g., FF0000
for red) or standard color names.
Q: Can I run the server without installing dependencies manually?
A: Yes. Use the provided setup_mcp.py
script or the Smithery installation command, which sets up a virtual environment and installs all requirements automatically.
Q: How do I enable detailed logs?
A: Set the environment variable MCP_DEBUG=1
before starting the server.
Q: Is there support for Linux/macOS and Windows? A: The server is cross‑platform; configuration files for Claude Desktop differ by OS (see the README for exact paths).
A Model Context Protocol (MCP) server for creating, reading, and manipulating Microsoft Word documents. This server enables AI assistants to work with Word documents through a standardized interface, providing rich document editing capabilities.
Office-Word-MCP-Server implements the Model Context Protocol to expose Word document operations as tools and resources. It serves as a bridge between AI assistants and Microsoft Word documents, allowing for document creation, content addition, formatting, and analysis.
The server features a modular architecture that separates concerns into core functionality, tools, and utilities, making it highly maintainable and extensible for future enhancements.
To install Office Word Document Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @GongRzhe/Office-Word-MCP-Server --client claude
# Clone the repository
git clone https://github.com/GongRzhe/Office-Word-MCP-Server.git
cd Office-Word-MCP-Server
# Install dependencies
pip install -r requirements.txt
Alternatively, you can use the provided setup script which handles:
python setup_mcp.py
{
"mcpServers": {
"word-document-server": {
"command": "python",
"args": ["/path/to/word_mcp_server.py"]
}
}
}
{
"mcpServers": {
"word-document-server": {
"command": "uvx",
"args": ["--from", "office-word-mcp-server", "word_mcp_server"]
}
}
}
Configuration file locations:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
Restart Claude for Desktop to load the configuration.
Once configured, you can ask Claude to perform operations like:
create_document(filename, title=None, author=None)
get_document_info(filename)
get_document_text(filename)
get_document_outline(filename)
list_available_documents(directory=".")
copy_document(source_filename, destination_filename=None)
convert_to_pdf(filename, output_filename=None)
add_heading(filename, text, level=1)
add_paragraph(filename, text, style=None)
add_table(filename, rows, cols, data=None)
add_picture(filename, image_path, width=None)
add_page_break(filename)
get_document_text(filename)
get_paragraph_text_from_document(filename, paragraph_index)
find_text_in_document(filename, text_to_find, match_case=True, whole_word=False)
format_text(filename, paragraph_index, start_pos, end_pos, bold=None,
italic=None, underline=None, color=None, font_size=None, font_name=None)
search_and_replace(filename, find_text, replace_text)
delete_paragraph(filename, paragraph_index)
create_custom_style(filename, style_name, bold=None, italic=None,
font_size=None, font_name=None, color=None, base_style=None)
format_table(filename, table_index, has_header_row=None,
border_style=None, shading=None)
set_table_cell_shading(filename, table_index, row_index, col_index,
fill_color, pattern="clear")
apply_table_alternating_rows(filename, table_index,
color1="FFFFFF", color2="F2F2F2")
highlight_table_header(filename, table_index,
header_color="4472C4", text_color="FFFFFF")
# Cell merging tools
merge_table_cells(filename, table_index, start_row, start_col, end_row, end_col)
merge_table_cells_horizontal(filename, table_index, row_index, start_col, end_col)
merge_table_cells_vertical(filename, table_index, col_index, start_row, end_row)
# Cell alignment tools
set_table_cell_alignment(filename, table_index, row_index, col_index,
horizontal="left", vertical="top")
set_table_alignment_all(filename, table_index,
horizontal="left", vertical="top")
# Cell text formatting tools
format_table_cell_text(filename, table_index, row_index, col_index,
text_content=None, bold=None, italic=None, underline=None,
color=None, font_size=None, font_name=None)
# Cell padding tools
set_table_cell_padding(filename, table_index, row_index, col_index,
top=None, bottom=None, left=None, right=None, unit="points")
# Column width management
set_table_column_width(filename, table_index, col_index, width, width_type="points")
set_table_column_widths(filename, table_index, widths, width_type="points")
set_table_width(filename, table_index, width, width_type="points")
auto_fit_table_columns(filename, table_index)
get_all_comments(filename)
get_comments_by_author(filename, author)
get_comments_for_paragraph(filename, paragraph_index)
Missing Styles
Permission Issues
copy_document
function to create editable copies of locked documentsImage Insertion Problems
Table Formatting Issues
Enable detailed logging by setting the environment variable:
export MCP_DEBUG=1 # Linux/macOS
set MCP_DEBUG=1 # Windows
Contributions are welcome! Please feel free to submit a Pull Request.
git checkout -b feature/amazing-feature
)git commit -m 'Add some amazing feature'
)git push origin feature/amazing-feature
)This project is licensed under the MIT License - see the LICENSE file for details.
Note: This server interacts with document files on your system. Always verify that requested operations are appropriate before confirming them in Claude for Desktop or other MCP clients.
Please log in to share your review and rating for this MCP.
{ "mcpServers": { "office-word-mcp-server": { "command": "npx", "args": [ "-y", "@smithery/cli", "install", "@GongRzhe/Office-Word-MCP-Server", "--client", "claude" ], "env": {} } } }
Discover more MCP servers with similar functionality and use cases
by elie222
An AI‑powered email assistant that automates inbox management, enabling users to reach inbox zero fast by handling replies, labeling, archiving, unsubscribing, and providing analytics through a plain‑text prompt configuration.
by makenotion
Provides a remote Model Context Protocol server for the Notion API, enabling OAuth‑based installation and optimized toolsets for AI agents with minimal token usage.
by sooperset
MCP Atlassian is a Model Context Protocol (MCP) server that integrates AI assistants with Atlassian products like Confluence and Jira. It enables AI to automate tasks, search for information, and manage content within Atlassian ecosystems.
by ggozad
Interact with Ollama models through an intuitive terminal UI, supporting persistent chats, system prompts, model parameters, and MCP tools integration.
by nbonamy
A desktop AI assistant that bridges dozens of LLM, image, video, speech, and search providers, offering chat, generative media, RAG, shortcuts, and extensible plugins directly from the OS.
by GongRzhe
Provides tools for creating, editing, and enhancing PowerPoint presentations through a comprehensive set of MCP operations powered by python-pptx.
by GongRzhe
Gmail-MCP-Server is a Model Context Protocol (MCP) server that integrates Gmail functionalities into AI assistants like Claude Desktop. It enables natural language interaction for email management, supporting features like sending, reading, and organizing emails.
by nspady
google-calendar-mcp is a Model Context Protocol (MCP) server that integrates Google Calendar with AI assistants. It enables AI assistants to manage Google Calendar events, including creating, updating, deleting, and searching for events.
by runebookai
Provides a desktop interface to chat with local or remote LLMs, schedule tasks, and integrate Model Context Protocol servers without coding.