mcp.office
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp.officeconvert my report.docx to pdf"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp.document-edit
Headless MCP server for editing Word documents (DOCX) and PDF files. No UI, no desktop application, no backend required. Designed to be called by AI assistants to create, modify, and inspect documents programmatically.
Deployed as part of the GDM AI platform at https://ai.gdm.se/api/v1/mcp/document-edit.
Tools
edit_document_from_prompt
Natural-language editing for DOCX and PDF files. Parses a prompt into discrete actions and applies them to the document.
Parameter | Type | Required | Description |
|
| ✅ | Path to input file ( |
|
| ✅ | Path to write the edited file |
|
| ✅ | Natural-language edit instructions (see syntax below) |
DOCX prompt syntax:
replace "old text" with "new text"
append paragraph "New content at the end"
prepend paragraph "Content at the top"
delete paragraph containing "text to remove"PDF form filling syntax (one field per line):
First Name=John
Last Name=Smith
Email=john@example.com
Date=2026-06-11For PDFs without form fields, text is extracted and rewritten using reportlab. Note: original layout is not preserved in this fallback mode.
format_text
Apply formatting to a paragraph in a DOCX file. All formatting parameters are optional — only specified ones are applied.
Parameter | Type | Required | Description |
|
| ✅ | Path to input DOCX file |
|
| ✅ | Path to write the formatted file |
|
| ✅ | Index of paragraph to format (0-based) |
|
| Set bold on/off | |
|
| Set italic on/off | |
|
| Font size in points | |
|
| Hex color code, e.g. | |
|
|
|
add_list
Append a bulleted or numbered list to a DOCX document.
Parameter | Type | Required | Description |
|
| ✅ | Path to input DOCX file |
|
| ✅ | Path to write the output file |
|
| ✅ | List of items to add |
|
|
|
apply_list_formatting
Apply list style to existing paragraphs by index.
Parameter | Type | Required | Description |
|
| ✅ | Path to input DOCX file |
|
| ✅ | Path to write the output file |
|
| ✅ | Paragraph indices to convert (0-based) |
|
|
|
create_table
Add a new table to a DOCX document, optionally pre-filled with data.
Parameter | Type | Required | Description |
|
| ✅ | Path to input DOCX file |
|
| ✅ | Path to write the output file |
|
| ✅ | Number of rows |
|
| ✅ | Number of columns |
|
| 2D array of cell values |
edit_table_cell
Set the text content of a single table cell.
Parameter | Type | Required | Description |
|
| ✅ | Path to input DOCX file |
|
| ✅ | Path to write the output file |
|
| ✅ | Index of the table (0-based) |
|
| ✅ | Row index (0-based) |
|
| ✅ | Column index (0-based) |
|
| ✅ | New cell text |
add_table_row
Append a row to an existing table.
Parameter | Type | Required | Description |
|
| ✅ | Path to input DOCX file |
|
| ✅ | Path to write the output file |
|
| ✅ | Index of the table (0-based) |
|
| Cell values for the new row |
delete_table_row
Delete a row from an existing table.
Parameter | Type | Required | Description |
|
| ✅ | Path to input DOCX file |
|
| ✅ | Path to write the output file |
|
| ✅ | Index of the table (0-based) |
|
| ✅ | Row index to delete (0-based) |
get_document_structure
Inspect a DOCX file — returns structure and metadata without modifying the file.
Parameter | Type | Required | Description |
|
| ✅ | Path to DOCX file |
Response includes:
paragraph_count,table_countparagraphs: list of{ index, text (first 100 chars), style }tables: list of{ index, rows, cols }core_properties:{ title, author, subject }
search_text
Case-insensitive search across all paragraphs and table cells in a DOCX file.
Parameter | Type | Required | Description |
|
| ✅ | Path to DOCX file |
|
| ✅ | Text to search for |
Returns matches with type (paragraph or table), location (index or table/row/col), and a text excerpt.
add_header
Set header text on the first section of a DOCX document.
Parameter | Type | Required | Description |
|
| ✅ | Path to input DOCX file |
|
| ✅ | Path to write the output file |
|
| ✅ | Header text |
add_footer
Set footer text on the first section of a DOCX document.
Parameter | Type | Required | Description |
|
| ✅ | Path to input DOCX file |
|
| ✅ | Path to write the output file |
|
| ✅ | Footer text |
describe_capabilities
Returns server metadata and a list of all available tools. No parameters.
Related MCP server: MCP-OPENAPI-DOCX
Response Format
All tools return a JSON object.
Success:
{
"ok": true,
"output_path": "/path/to/output.docx"
}Error:
{
"ok": false,
"error": "Paragraph index 12 out of range"
}All indices (paragraphs, tables, rows, columns) are 0-based.
Supported File Types
Format | Support |
| Full — all tools |
| Form field filling via |
| Text extraction and rewrite via |
Usage Examples
Via MCP gateway (curl)
# List available tools
curl https://ai.gdm.se/api/v1/mcp/document-edit \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list",
"params": {}
}'
# Inspect a document
curl https://ai.gdm.se/api/v1/mcp/document-edit \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "get_document_structure",
"arguments": {
"input_path": "/data/contract.docx"
}
}
}'Via Python (MCP SDK)
import asyncio
from mcp import ClientSession
from mcp.client.streamable_http import streamablehttp_client
async def main():
async with streamablehttp_client(
"https://ai.gdm.se/api/v1/mcp/document-edit",
headers={"Authorization": "Bearer YOUR_API_KEY"},
) as (read, write, _):
async with ClientSession(read, write) as session:
await session.initialize()
# Edit a document using a prompt
result = await session.call_tool(
"edit_document_from_prompt",
arguments={
"input_path": "/data/report.docx",
"output_path": "/data/report_edited.docx",
"prompt": 'replace "Draft" with "Final"\nappend paragraph "Approved by: Jane Doe"',
},
)
print(result)
# Create a table
result = await session.call_tool(
"create_table",
arguments={
"input_path": "/data/report_edited.docx",
"output_path": "/data/report_table.docx",
"rows": 3,
"cols": 2,
"data": [["Name", "Value"], ["Item A", "100"], ["Item B", "200"]],
},
)
print(result)
asyncio.run(main())Local Development
pip install -r requirements.txt
python server.pyHealth checks:
GET /healthz→{"status": "ok"}GET /readyz→{"status": "ready"}
MCP endpoint: http://localhost:8000/mcp
Docker
docker build -t ghcr.io/gdmkonsult/mcp.document-edit:main .
docker run --rm -p 8000:8000 ghcr.io/gdmkonsult/mcp.document-edit:mainDependencies
Package | Version | Purpose |
| 1.27.0 | FastMCP server framework |
| 1.2.0 | DOCX reading and writing |
| 6.0.0 | PDF form field reading and filling |
| 4.4.4 | PDF text rewriting fallback |
| 1.2.1 | HTTP server for health probes and MCP endpoint |
| 0.45.0 | ASGI server |
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/gdmkonsult/mcp.office'
If you have feedback or need assistance with the MCP directory API, please join our Discord server