Read, convert and fill Word (.docx) documents: templates, Markdown/HTML in and out, PDF with math.
MCPpedia last refreshed this data
io.github.plutext/docx4j-mcp is an MCP server that read, convert and fill Word (.docx) documents: templates, Markdown/HTML in and out, PDF with math. Its tool list has not been published yet over stdio and sse, requires no API key, and scores 65/100 on MCPpedia's security, maintenance and efficiency rubric.
Config is the same across clients - only the file and path differ.
{
"mcpServers": {
"docx4j": {
"args": [
"-jar",
"/path/to/docx4j-mcp.jar",
"--root",
"/path/to/documents"
],
"command": "java"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
Read, convert and fill Word (.docx) documents: templates, Markdown/HTML in and out, PDF with math.
This server supports HTTP transport. Be the first to test it - help the community know if it works.
Five weighted categories - click any category to see the underlying evidence.
No known CVEs.
No package registry to scan.
Be the first to review
Have you used this server?
Share your experience - it helps other developers decide.
Sign in to write a review.
Others in writing
一键同步文章到多个内容平台,支持今日头条、WordPress、知乎、简书、掘金、CSDN、typecho各大平台,一次发布,多平台同步发布。解放个人生产力
Publish HTML, Markdown, PDF, or images as instant shareable links with expiry and passwords.
Any file → clean Markdown for AI agents: PDF, Office, EPUB, HTML, images, audio/video. Local MCP.
Scrape, crawl, and map websites to Markdown or JSON via local CLI.
MCP Security Weekly
Get CVE alerts and security updates for io.github.plutext/docx4j-mcp and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
A Model Context Protocol server that exposes docx4j's engine to AI agents: read, convert and fill Word (.docx) documents from Claude Desktop, Claude Code, or any MCP client.
Engine: docx4j 17.1.0 (the server versions independently; the bundled docx4j version is in the pom, the server's startup log, and its MCP instructions).
MCP protocol: 2025-11-25 (Java SDK 2.0.1, the newest available). Clients
speaking the 2026-07-28 spec work if they implement its dual-era fallback: the
server/discover probe gets a clean JSON-RPC -32601 and the client falls
back to initialize (verified over stdio). A modern-only client with no
fallback cannot connect until the SDK's 2026-07-28 support (milestone 2.2)
ships, at which point this server will migrate.
Status: phase 3 — all tools work over stdio against released docx4j 17.0.4;
packaged as a runnable jar, an .mcpb bundle, an OCI image and a Claude Code
plugin. The plan, tool surface and phasing are in CR-mcp-server.md.
Requires JDK 17+. All docx4j dependencies (docx4j 17.1.0, ImportXHTML 17.0.4) come from Maven Central.
mvn package # -> target/docx4j-mcp.jar (shaded, runnable)
mvn test # JUnit 5 tests against the tool handlers directly
java -jar target/docx4j-mcp.jar --root /path/to/documents [--root ...] [--max-inline-chars N]
Bare directory arguments are also accepted as roots (this is what the .mcpb
bundle's folder picker passes).
Install docx4j-mcp.mcpb from the GitHub release (Settings → Extensions), pick
the folders the server may touch, done. Built locally with
packaging/build-mcpb.sh. Requires Java 17+ on your PATH.
docker run -i --rm -v /path/to/documents:/data ghcr.io/plutext/docx4j-mcp
(paths in tool calls are then container paths under /data;
packaging/docker/Dockerfile to build locally).
packaging/claude-plugin/ bundles the server config and a skill for the
template/authoring workflows. Set DOCX4J_MCP_JAR (path to the jar) and
optionally DOCX4J_MCP_ROOTS.
Tag vX.Y.Z: .github/workflows/release.yml builds jar + mcpb, attaches them
to the GitHub release, pushes ghcr.io/plutext/docx4j-mcp, and publishes
server.json (sha filled in) to the official MCP registry via GitHub OIDC.
Every file path an agent passes must resolve inside one of the --root
directories (symlinks are resolved first). There is no default root; the server
refuses to start without one. Logging goes to stderr; stdout is the protocol.
Tools that return text inline cap it at --max-inline-chars (default 200000) and
otherwise write to output_path or truncate with a marker.
.mcp.json in your project){
"mcpServers": {
"docx4j": {
"command": "java",
"args": ["-jar", "/path/to/docx4j-mcp.jar", "--root", "/path/to/documents"]
}
}
}
claude_desktop_config.json){
"mcpServers": {
"docx4j": {
"command": "java",
"args": ["-jar", "/path/to/docx4j-mcp.jar", "--root", "/Users/you/Documents"]
}
}
}
| Tool | What it does |
|---|---|
describe_template | What data a template wants: skeleton XML + xpaths/conditions (OpenDoPE, bound content controls) or MERGEFIELD names and format switches (mail merge). Call before fill_template. |
fill_template | Fill a template, preserving its formatting. data is an XML string (OpenDoPE / bound controls; repeats and conditions processed) or a JSON object (mail merge). |
convert_to_pdf | docx → PDF via XSL-FO / Apache FOP; equations and WMF/EMF drawings rendered as vectors; optional update_toc; reports font substitutions. Bundles metric-compatible fonts (Carlito, Caladea, Liberation, Tinos…). |
markdown_to_docx | Markdown → properly st |