@docmake/mcp
Official Model Context Protocol server for DocMake, the AI-native document generation platform. It lets AI assistants like Claude generate DOCX and PDF documents from your DocMake templates: no glue code, just a conversation.
"Generate the invoice for Acme Corp: 10 hours of consulting at 100 EUR, due in 14 days."
The assistant picks your invoice template, fills in the data, renders a PDF through the DocMake API, and hands you the file path.
Setup
You need a DocMake API key. Create one at app.docmake.io under Settings > API Keys (free plan works).
Claude Desktop
Add to claude_desktop_config.json (Settings > Developer > Edit Config):
{
"mcpServers": {
"docmake": {
"command": "npx",
"args": ["-y", "@docmake/mcp@latest"],
"env": {
"DOCMAKE_API_KEY": "dm_your_key_here"
}
}
}
}
Claude Code
claude mcp add docmake --env DOCMAKE_API_KEY=dm_your_key_here -- npx -y @docmake/mcp@latest
Cursor / other MCP clients
Any client that supports stdio MCP servers works with the same command: npx -y @docmake/mcp@latest with DOCMAKE_API_KEY in the environment.
Configuration
DOCMAKE_API_KEY | yes | | API key from app.docmake.io, Settings > API Keys |
DOCMAKE_OUTPUT_DIR | no | ~/Downloads/DocMake | Where rendered documents are saved |
DOCMAKE_API_BASE | no | https://app.docmake.io/api/v1 | API base URL, override for self-hosted setups |
Tools
list_templates | List the templates in your workspace, with search and pagination |
get_template | A template's field tree: every variable it expects, ready to map to render data |
render_document | Render a template to PDF or DOCX and save the file locally |
create_template | Create a new template from a document schema JSON |
import_docx | Import a local .docx file as a new template |
get_usage | Plan, render quota, and rate limits for the current billing period |
The server also exposes your templates as MCP resources and ships a generate-document prompt for a guided render flow.
How rendering works
render_document is strict by default: if any template variable has no value in data, the render fails and returns the list of missing keys, so the assistant can ask you for the values instead of producing an incomplete document. Pass strict: false to render with each variable's fallback text instead.
Rendered files are saved to DOCMAKE_OUTPUT_DIR and never overwrite an existing file.
Links
License
MIT