Docs / MCP server

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.

SettingValue
Endpointhttps://devilpdf.com/mcp
TransportStreamable HTTP
AuthenticationAuthorization: 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

ToolWhat it does
list_templatesLists your templates and the built-in starters, with id, name and description.
get_templateReturns one template with its settings, HTML and sample_data. The sample data shows the JSON shape the template expects.
create_templateDesigns and saves a new template from a plain-English description. Uses one AI generation.
render_documentGenerates a PDF or image and returns a download URL.
get_usageShows documents and AI generations used and remaining this month.

#render_document

ArgumentTypeDescription
templatestringA template id. Fill it with data.
dataobjectJSON for the template.
htmlstringRaw HTML to render instead of a template.
urlstringA public web page to capture instead of a template.
formatstringpdf (default), png, jpeg or webp.
filenamestringFile name without extension.
page_sizestringA4, Letter, Legal, A3, A5 or Tabloid.
orientationstringportrait 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

ArgumentTypeDescription
descriptionstringWhat the document is and what it contains. 3 to 4,000 characters.
namestringOptional 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_document call counts as one document. Each create_template call 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.