[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-82400":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":24,"defaultBranch":25,"hasWiki":23,"hasPages":24,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":27,"readmeContent":28,"aiSummary":29,"trendingCount":16,"starSnapshotCount":16,"syncStatus":30,"lastSyncTime":31,"discoverSource":32},82400,"Office-Word-MCP-Server","GongRzhe\u002FOffice-Word-MCP-Server","GongRzhe","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.","",null,"Python",2036,267,15,53,0,7,29,31,21,90.88,"MIT License",true,false,"main",[],"2026-06-12 04:01:38","# Office-Word-MCP-Server\n\n[![smithery badge](https:\u002F\u002Fsmithery.ai\u002Fbadge\u002F@GongRzhe\u002FOffice-Word-MCP-Server)](https:\u002F\u002Fsmithery.ai\u002Fserver\u002F@GongRzhe\u002FOffice-Word-MCP-Server)\n\nA 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.\n\n\u003Ca href=\"https:\u002F\u002Fglama.ai\u002Fmcp\u002Fservers\u002F@GongRzhe\u002FOffice-Word-MCP-Server\">\n  \u003Cimg width=\"380\" height=\"200\" src=\"https:\u002F\u002Fglama.ai\u002Fmcp\u002Fservers\u002F@GongRzhe\u002FOffice-Word-MCP-Server\u002Fbadge\" alt=\"Office Word Server MCP server\" \u002F>\n\u003C\u002Fa>\n\n![](https:\u002F\u002Fbadge.mcpx.dev?type=server \"MCP Server\")\n\n## Overview\n\nOffice-Word-MCP-Server implements the [Model Context Protocol](https:\u002F\u002Fmodelcontextprotocol.io\u002F) 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.\n\nThe server features a modular architecture that separates concerns into core functionality, tools, and utilities, making it highly maintainable and extensible for future enhancements.\n\n### Example\n\n#### Pormpt\n\n![image](https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Ff49b0bcc-88b2-4509-bf50-995b9a40038c)\n\n#### Output\n\n![image](https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Fff64385d-3822-4160-8cdf-f8a484ccc01a)\n\n## Features\n\n### Document Management\n\n- Create new Word documents with metadata\n- Extract text and analyze document structure\n- View document properties and statistics\n- List available documents in a directory\n- Create copies of existing documents\n- Merge multiple documents into a single document\n- Convert Word documents to PDF format\n\n### Content Creation\n\n- Add headings with different levels and direct formatting (font, size, bold, italic, borders)\n- Insert paragraphs with optional styling and direct formatting (font, size, bold, italic, color)\n- Create tables with custom data\n- Add images with proportional scaling\n- Insert page breaks\n- Insert bulleted and numbered lists with proper XML formatting\n- Add footnotes and endnotes to documents\n- Convert footnotes to endnotes\n- Customize footnote and endnote styling\n- Create professional table layouts for technical documentation\n- Design callout boxes and formatted content for instructional materials\n- Build structured data tables for business reports with consistent styling\n- Insert content relative to existing text or paragraph indices\n\n### Rich Text Formatting\n\n- Format specific text sections (bold, italic, underline)\n- Change text color and font properties\n- Apply custom styles to text elements\n- Search and replace text throughout documents\n- Individual cell text formatting within tables\n- Multiple formatting combinations for enhanced visual appeal\n- Font customization with family and size control\n- Direct formatting during content creation (paragraphs and headings)\n- Reduce function calls by combining content creation with formatting\n- Add section header borders for visual separation\n\n### Table Formatting\n\n- Format tables with borders and styles\n- Create header rows with distinct formatting\n- Apply cell shading and custom borders\n- Structure tables for better readability\n- Individual cell background shading with color support\n- Alternating row colors for improved readability\n- Enhanced header row highlighting with custom colors\n- Cell text formatting with bold, italic, underline, color, font size, and font family\n- Comprehensive color support with named colors and hex color codes\n- Cell padding management with independent control of all sides\n- Cell alignment (horizontal and vertical positioning)\n- Cell merging (horizontal, vertical, and rectangular areas)\n- Column width management with multiple units (points, percentage, auto-fit)\n- Auto-fit capabilities for dynamic column sizing\n- Professional callout table support with icon cells and styled content\n\n### Advanced Document Manipulation\n\n- Delete paragraphs\n- Insert content relative to specific text or paragraph indices\n- Insert bulleted and numbered lists with proper XML numbering structure\n- Insert headers and paragraphs before or after target locations\n- Create custom document styles\n- Apply consistent formatting throughout documents\n- Format specific ranges of text with detailed control\n- Flexible padding units with support for points and percentage-based measurements\n- Clear, readable table presentation with proper alignment and spacing\n\n### Document Protection\n\n- Add password protection to documents\n- Implement restricted editing with editable sections\n- Add digital signatures to documents\n- Verify document authenticity and integrity\n\n### Comment Extraction\n\n- Extract all comments from a document\n- Filter comments by author\n- Get comments for specific paragraphs\n- Access comment metadata (author, date, text)\n\n## Installation\n\n### Installing via Smithery\n\nTo install Office Word Document Server for Claude Desktop automatically via [Smithery](https:\u002F\u002Fsmithery.ai\u002Fserver\u002F@GongRzhe\u002FOffice-Word-MCP-Server):\n\n```bash\nnpx -y @smithery\u002Fcli install @GongRzhe\u002FOffice-Word-MCP-Server --client claude\n```\n\n### Prerequisites\n\n- Python 3.8 or higher\n- pip package manager\n\n### Basic Installation\n\n```bash\n# Clone the repository\ngit clone https:\u002F\u002Fgithub.com\u002FGongRzhe\u002FOffice-Word-MCP-Server.git\ncd Office-Word-MCP-Server\n\n# Install dependencies\npip install -r requirements.txt\n```\n\n### Using the Setup Script\n\nAlternatively, you can use the provided setup script which handles:\n\n- Checking prerequisites\n- Setting up a virtual environment\n- Installing dependencies\n- Generating MCP configuration\n\n```bash\npython setup_mcp.py\n```\n\n## Usage with Claude for Desktop\n\n### Configuration\n\n#### Method 1: After Local Installation\n\n1. After installation, add the server to your Claude for Desktop configuration file:\n\n```json\n{\n  \"mcpServers\": {\n    \"word-document-server\": {\n      \"command\": \"python\",\n      \"args\": [\"\u002Fpath\u002Fto\u002Fword_mcp_server.py\"]\n    }\n  }\n}\n```\n\n#### Method 2: Without Installation (Using uvx)\n\n1. You can also configure Claude for Desktop to use the server without local installation by using the uvx package manager:\n\n```json\n{\n  \"mcpServers\": {\n    \"word-document-server\": {\n      \"command\": \"uvx\",\n      \"args\": [\"--from\", \"office-word-mcp-server\", \"word_mcp_server\"]\n    }\n  }\n}\n```\n\n2. Configuration file locations:\n\n   - macOS: `~\u002FLibrary\u002FApplication Support\u002FClaude\u002Fclaude_desktop_config.json`\n   - Windows: `%APPDATA%\\Claude\\claude_desktop_config.json`\n\n3. Restart Claude for Desktop to load the configuration.\n\n### Example Operations\n\nOnce configured, you can ask Claude to perform operations like:\n\n- \"Create a new document called 'report.docx' with a title page\"\n- \"Add a heading and three paragraphs to my document\"\n- \"Add my name in Helvetica 36pt bold at the top of the document\"\n- \"Add a section heading 'Summary' in Helvetica 14pt bold with a bottom border\"\n- \"Add a paragraph in Times New Roman 14pt with italic blue text\"\n- \"Insert a bulleted list after the paragraph containing 'Introduction'\"\n- \"Insert a numbered list with items: 'First step', 'Second step', 'Third step'\"\n- \"Add bullet points after the 'Summary' heading\"\n- \"Insert a 4x4 table with sales data\"\n- \"Format the word 'important' in paragraph 2 to be bold and red\"\n- \"Search and replace all instances of 'old term' with 'new term'\"\n- \"Create a custom style for section headings\"\n- \"Apply formatting to the table in my document\"\n- \"Extract all comments from my document\"\n- \"Show me all comments by John Doe\"\n- \"Get comments for paragraph 3\"\n- \"Make the text in table cell (1,2) bold and blue with 14pt font\"\n- \"Add 10 points of padding to all sides of the header cells\"\n- \"Create a callout table with a blue checkmark icon and white text\"\n- \"Set the first column width to 50 points and auto-fit the remaining columns\"\n- \"Apply alternating row colors to make the table more readable\"\n\n\n## API Reference\n\n### Document Creation and Properties\n\n```python\ncreate_document(filename, title=None, author=None)\nget_document_info(filename)\nget_document_text(filename)\nget_document_outline(filename)\nlist_available_documents(directory=\".\")\ncopy_document(source_filename, destination_filename=None)\nconvert_to_pdf(filename, output_filename=None)\n```\n\n### Content Addition\n\n```python\nadd_heading(filename, text, level=1, font_name=None, font_size=None,\n            bold=None, italic=None, border_bottom=False)\nadd_paragraph(filename, text, style=None, font_name=None, font_size=None,\n              bold=None, italic=None, color=None)\nadd_table(filename, rows, cols, data=None)\nadd_picture(filename, image_path, width=None)\nadd_page_break(filename)\n```\n\n### Advanced Content Manipulation\n\n```python\n# Insert content relative to existing text or paragraph index\ninsert_header_near_text(filename, target_text=None, header_title=None,\n                       position='after', header_style='Heading 1',\n                       target_paragraph_index=None)\n\ninsert_line_or_paragraph_near_text(filename, target_text=None, line_text=None,\n                                   position='after', line_style=None,\n                                   target_paragraph_index=None)\n\n# Insert bulleted or numbered lists with proper XML formatting\ninsert_numbered_list_near_text(filename, target_text=None, list_items=None,\n                              position='after', target_paragraph_index=None,\n                              bullet_type='bullet')\n# bullet_type options:\n#   'bullet' - Creates bulleted list with bullets (•)\n#   'number' - Creates numbered list (1, 2, 3, ...)\n```\n\n### Content Extraction\n\n```python\nget_document_text(filename)\nget_paragraph_text_from_document(filename, paragraph_index)\nfind_text_in_document(filename, text_to_find, match_case=True, whole_word=False)\n```\n\n### Text Formatting\n\n```python\nformat_text(filename, paragraph_index, start_pos, end_pos, bold=None,\n            italic=None, underline=None, color=None, font_size=None, font_name=None)\nsearch_and_replace(filename, find_text, replace_text)\ndelete_paragraph(filename, paragraph_index)\ncreate_custom_style(filename, style_name, bold=None, italic=None,\n                    font_size=None, font_name=None, color=None, base_style=None)\n```\n\n### Table Formatting\n\n```python\nformat_table(filename, table_index, has_header_row=None,\n             border_style=None, shading=None)\nset_table_cell_shading(filename, table_index, row_index, col_index, \n                      fill_color, pattern=\"clear\")\napply_table_alternating_rows(filename, table_index, \n                            color1=\"FFFFFF\", color2=\"F2F2F2\")\nhighlight_table_header(filename, table_index, \n                      header_color=\"4472C4\", text_color=\"FFFFFF\")\n\n# Cell merging tools\nmerge_table_cells(filename, table_index, start_row, start_col, end_row, end_col)\nmerge_table_cells_horizontal(filename, table_index, row_index, start_col, end_col)\nmerge_table_cells_vertical(filename, table_index, col_index, start_row, end_row)\n\n# Cell alignment tools\nset_table_cell_alignment(filename, table_index, row_index, col_index,\n                        horizontal=\"left\", vertical=\"top\")\nset_table_alignment_all(filename, table_index, \n                       horizontal=\"left\", vertical=\"top\")\n\n# Cell text formatting tools\nformat_table_cell_text(filename, table_index, row_index, col_index,\n                      text_content=None, bold=None, italic=None, underline=None,\n                      color=None, font_size=None, font_name=None)\n\n# Cell padding tools\nset_table_cell_padding(filename, table_index, row_index, col_index,\n                      top=None, bottom=None, left=None, right=None, unit=\"points\")\n\n# Column width management\nset_table_column_width(filename, table_index, col_index, width, width_type=\"points\")\nset_table_column_widths(filename, table_index, widths, width_type=\"points\")\nset_table_width(filename, table_index, width, width_type=\"points\")\nauto_fit_table_columns(filename, table_index)\n```\n\n### Comment Extraction\n\n```python\nget_all_comments(filename)\nget_comments_by_author(filename, author)\nget_comments_for_paragraph(filename, paragraph_index)\n```\n\n## Troubleshooting\n\n### Common Issues\n\n1. **Missing Styles**\n\n   - Some documents may lack required styles for heading and table operations\n   - The server will attempt to create missing styles or use direct formatting\n   - For best results, use templates with standard Word styles\n\n2. **Permission Issues**\n\n   - Ensure the server has permission to read\u002Fwrite to the document paths\n   - Use the `copy_document` function to create editable copies of locked documents\n   - Check file ownership and permissions if operations fail\n\n3. **Image Insertion Problems**\n   - Use absolute paths for image files\n   - Verify image format compatibility (JPEG, PNG recommended)\n   - Check image file size and permissions\n\n4. **Table Formatting Issues**\n\n   - **Cell index errors**: Ensure row and column indices are within table bounds (0-based indexing)\n   - **Color format problems**: Use hex colors without '#' prefix (e.g., \"FF0000\" for red) or standard color names\n   - **Padding unit confusion**: Specify \"points\" or \"percent\" explicitly when setting cell padding\n   - **Column width conflicts**: Auto-fit may override manual column width settings\n   - **Text formatting persistence**: Apply cell text formatting after setting cell content for best results\n\n### Debugging\n\nEnable detailed logging by setting the environment variable:\n\n```bash\nexport MCP_DEBUG=1  # Linux\u002FmacOS\nset MCP_DEBUG=1     # Windows\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature\u002Famazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature\u002Famazing-feature`)\n5. Open a Pull Request\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n## Acknowledgments\n\n- [Model Context Protocol](https:\u002F\u002Fmodelcontextprotocol.io\u002F) for the protocol specification\n- [python-docx](https:\u002F\u002Fpython-docx.readthedocs.io\u002F) for Word document manipulation\n- [FastMCP](https:\u002F\u002Fgithub.com\u002Fmodelcontextprotocol\u002Fpython-sdk) for the Python MCP implementation\n\n---\n\n_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._\n","Office-Word-MCP-Server 是一个用于创建、读取和操作 Microsoft Word 文档的 Model Context Protocol (MCP) 服务器。它通过标准化接口使 AI 助手能够处理 Word 文档，提供丰富的文档编辑功能。项目使用 Python 编写，具有模块化架构，核心功能包括文档管理（如新建、提取文本、合并文档等）、内容创建（如添加标题、段落、表格、图片等）以及丰富的文本格式设置（如字体、颜色、样式等）。适合需要与 AI 助手集成以自动化生成或编辑 Word 文档的场景，例如技术文档编写、报告生成等。",2,"2026-06-11 04:08:30","high_star"]