Platform
MCP server
DevilPDF runs a hosted Model Context Protocol server. Connect an AI assistant or agent to it and it can list your templates, design new ones, and generate documents on your account.
| Setting | Value |
|---|---|
| Endpoint | https://devilpdf.com/mcp |
| Transport | Streamable HTTP |
| Authentication | Authorization: Bearer dp_live_... (a normal API key) |
There is nothing to install or host. The server is stateless: every request is authenticated with your key.
#Connect a client
#Claude Code
claude mcp add --transport http devilpdf https://devilpdf.com/mcp \
--header "Authorization: Bearer dp_live_..."#Cursor
Add this to ~/.cursor/mcp.json (or .cursor/mcp.json in a project):
{
"mcpServers": {
"devilpdf": {
"url": "https://devilpdf.com/mcp",
"headers": { "Authorization": "Bearer dp_live_..." }
}
}
}#Claude Desktop
Claude Desktop starts MCP servers as local commands, so bridge to the hosted server with mcp-remote. Add this to claude_desktop_config.json:
{
"mcpServers": {
"devilpdf": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://devilpdf.com/mcp", "--header", "Authorization:${AUTH_HEADER}"],
"env": { "AUTH_HEADER": "Bearer dp_live_..." }
}
}
}#Other clients
Any client that supports Streamable HTTP with custom headers works. Point it at the endpoint and send the Authorization header. A request without a valid key gets 401.
#Tools
| Tool | What it does |
|---|---|
list_templates | Lists your templates and the built-in starters, with id, name and description. |
get_template | Returns one template with its settings, HTML and sample_data. The sample data shows the JSON shape the template expects. |
create_template | Designs and saves a new template from a plain-English description. Uses one AI generation. |
render_document | Generates a PDF or image and returns a download URL. |
get_usage | Shows documents and AI generations used and remaining this month. |
#render_document
| Argument | Type | Description |
|---|---|---|
template | string | A template id. Fill it with data. |
data | object | JSON for the template. |
html | string | Raw HTML to render instead of a template. |
url | string | A public web page to capture instead of a template. |
format | string | pdf (default), png, jpeg or webp. |
filename | string | File name without extension. |
page_size | string | A4, Letter, Legal, A3, A5 or Tabloid. |
orientation | string | portrait or landscape. |
Pass exactly one of template, html or url. The result contains the document id, url, format, pages, bytes and expires_at.
#create_template
| Argument | Type | Description |
|---|---|---|
description | string | What the document is and what it contains. 3 to 4,000 characters. |
name | string | Optional name for the template. |
Returns the new template's id, name, description and sample_data.
#What it looks like in use
Once connected, ask in plain language:
Create an invoice for Acme Robotics: 12 hours of consulting at $150 and a $400 setup fee, 13% HST. Send me the PDF link.
The assistant calls list_templates, reads the invoice template's sample data with get_template, then calls render_document and replies with the link. Ask for a document that has no template yet and it can call create_template first, then reuse the new template from then on.
#Usage and limits
The MCP server is the same product as the REST API, with the same account:
- Each
render_documentcall counts as one document. Eachcreate_templatecall counts as one AI generation. - Documents created through MCP appear in your dashboard log and fire your webhooks.
- Your plan's monthly allowances and template limit apply.
- When a tool fails, the error comes back to the assistant as readable text (for example a quota or template error), so it can correct itself or tell you what happened.
Give an agent its own API key. You can then revoke it without affecting your other integrations.