Most AI agent integrations follow the same pattern: you wrap an API in a function, describe it to the model, and hope the JSON it returns matches your schema. It works, but it’s fragile — schema drift, inconsistent field names, and missing error context all become your problem.
The Model Context Protocol (MCP) takes a different approach. It’s a standard that lets language models discover and call tools natively, with rich type information and structured error feedback built in. pdfs.build exposes its entire rendering pipeline as an MCP server — which means any MCP-compatible agent can generate documents without you writing a single line of integration code.
How it works
When your agent connects to the pdfs.build MCP server, it gains access to a set of tools:
- list_templates — browse available templates with their schemas
- render_template — render a template with a data payload, returns a PDF URL
- get_schema — fetch the exact schema for a given template
The agent can call these tools mid-conversation. If a user says “send me an invoice for last month’s consulting work,” the agent can look up the invoice template, map the conversation context to the schema fields, and render a PDF — all in one turn.
Setting up the MCP connection
In your agent configuration, add the pdfs.build MCP server endpoint:
{
"mcpServers": {
"pdfreport": {
"url": "https://backend.pdfs.build/mcp",
"headers": {
"Authorization": "Bearer prs_your_key_here"
}
}
}
}
That’s the entire setup. The agent will automatically discover the available tools and their input schemas on first connection.
Example: Claude generating an invoice
Here’s what a Claude conversation with MCP looks like from the agent’s perspective:
- User: “Can you generate an invoice for the October project?”
- Claude calls
list_templates→ findsinvoice-v3 - Claude calls
get_schemaforinvoice-v3→ learns the required fields - Claude maps conversation context to the schema, filling in client name, line items, and dates
- Claude calls
render_templatewith the data → receives a PDF URL - Claude responds: “Here’s your invoice: [download link]”
The model handles the data mapping. You handle the template design. No glue code in between.
Why this matters for document-heavy workflows
Traditional document generation requires a developer to write mapping logic for every template change. With MCP, the model reads the schema directly and adapts. Update your invoice template to add a new “project code” field, and any connected agent immediately knows it’s available — no deployment required.
This is particularly valuable for:
- Finance and ops teams where documents change frequently
- Customer-facing agents that generate personalized reports on demand
- Internal tools where non-engineers need to trigger document generation
Getting your MCP key
MCP connections use the same API keys as the REST API. Create one at Settings → API Keys in your dashboard. The key prefix (prs_) is the same — the MCP server and REST API share the same authentication layer.
Check the API Reference for the full list of MCP-exposed tools and their schemas.