- Home
- MCP servers
- Docx
Docx
- python
4
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"rookie0x80-docx-mcp": {
"command": "python",
"args": [
"-m",
"docx_mcp.server"
],
"env": {
"PYTHONPATH": "YOUR_PYTHON_PATH"
}
}
}
}You can operate and automate Word document tasks with a Python-based MCP server focused on advanced table operations, formatting, and analysis. This server exposes a set of table-centric actions you can perform against Word documents, enabling you to open, modify, query, and style tables efficiently from your MCP client.
How to use
You run the MCP server locally and connect to it from your MCP client using the standard stdio workflow or an HTTP transport. The server lets you open or create Word documents, build and modify tables, batch-update cells with rich formatting, and query table data and styles. Use batch operations to efficiently update many cells, and use the search features to locate content within tables. When you start the server with a Python command, you can choose the transport that best fits your environment and tooling.
How to install
Prerequisites: you need Python installed on your system.
Install steps you should follow exactly as shown here:
# Clone the MCP server repository
git clone <repository-url>
# Change into the project directory
cd docx_table
# Install dependencies
pip install -r requirements.txt
# Install the MCP package in editable mode
pip install -e .
Additional notes and usage tips
To run the MCP server with the default stdio transport you start the server with Python using the module entry point.
python -m docx_mcp.server
If you prefer HTTP/SSE transports, you can start the server with an HTTP-based transport on a specific host and port.
python -m docx_mcp.server --transport sse --host localhost --port 8000
python -m docx_mcp.server --transport streamable-http --host localhost --port 8000
Available tools
open_document
Open or create a Word document; returns a handle or reference to the document for subsequent operations.
save_document
Save the current document with an optional new filename.
get_document_info
Retrieve document metadata and properties.
create_table
Create a new table within a document with specified rows, columns, and optional headers.
delete_table
Delete a table by its index within the document.
add_table_rows
Add rows at a specified position with optional styling.
add_table_columns
Add columns at a specified position with optional styling.
delete_table_rows
Delete specific rows from a table by index list.
merge_cells
Merge a rectangular region of cells.
unmerge_cells
Split a previously merged region back into individual cells.
set_cells_value
Batch set multiple cells with values and comprehensive formatting options.
get_table_data_and_structure
Return table data and its structure in formats such as array, object, or CSV.
get_table_styles
Retrieve formatting and styling information for table cells.
list_tables
List all tables in the document with metadata.
search_table_content
Search text across all table cells.
search_table_headers
Search specifically within table header cells.