MCP server
makesPDF exposes its authoring loop as a Model Context Protocol server at https://makespdf.com/api/v1/mcp. Register it once with your AI client and the assistant gets schema-validated tools for validating, previewing, and saving DSL templates — no need to teach it the REST API shape by hand.
When to use MCP vs the skill
The MCP server and the skill file are complementary — both end up in the AI’s context, but they answer different questions.
- Skill file — teaches the AI the DSL itself: function reference, style properties, design principles, recipes. The skill stays the canonical DSL guide regardless of how the AI calls the API.
- MCP server — gives the AI schema-validated tools to validate/render/persist templates, so it stops guessing request shapes. Also exposes the skill file as a fetchable resource, so agents that prefer resources over system prompts can pull it on demand.
If your AI client supports remote MCP, use MCP. If it doesn’t (or you’d rather paste the skill URL into a chat), the skill-only flow still works — see Bring your own AI.
Tools exposed
v1 covers the full authoring → render loop. Authoring tools (validate, preview, template CRUD) are free; the one billed tool is render_template, which produces a real PDF from a saved template and charges credits like /api/v1/render. The markdown endpoint (/api/v1/md) remains REST-only for now.
| Tool | Wraps | Purpose |
|---|---|---|
| validate_dsl | /preview/validate | Catalog + accessibility check, no render. |
| validate_markdown | /md/validate | Heading hierarchy + alt-text check for markdown. |
| render_dsl_preview | /preview | Free watermarked preview PDF (returned as base64 blob). |
| render_template | POST /render | Billed. Render a saved template to a real PDF (1 credit / 10 pages). Watermarked on the free plan, clean on paid plans. |
| save_template | POST /templates | Persist a DSL template with a name. |
| list_templates | GET /templates | List the caller’s templates. |
| get_template | GET /templates/:id | Fetch one template with full DSL. |
| update_template | PUT /templates/:id | Update DSL and/or name. |
| delete_template | DELETE /templates/:id | Remove a template. |
Plus one resource — file:///skills/pdf-template-author.md — the canonical authoring skill. MCP clients that support resources fetch it on demand.
1. Get an API key
The MCP endpoint uses the same auth as every other /api/v1/* endpoint: a Bearer token. Create one at Settings → API Keys. You’ll paste it into your client’s config in the next step.
2. Register the server with your client
All examples use the same endpoint and header — only the config file location varies. Restart the client after editing.
Claude Desktop
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json. Windows: %APPDATA%\Claude\claude_desktop_config.json.
{
"mcpServers": {
"makespdf": {
"url": "https://makespdf.com/api/v1/mcp",
"headers": {
"Authorization": "Bearer mpdf_your_api_key"
}
}
}
}Claude Code
Add to your user or project .mcp.json (or use claude mcp add):
claude mcp add --transport http makespdf \
https://makespdf.com/api/v1/mcp \
--header "Authorization: Bearer mpdf_your_api_key"Cursor
Global config at ~/.cursor/mcp.json, or per-project at .cursor/mcp.json:
{
"mcpServers": {
"makespdf": {
"url": "https://makespdf.com/api/v1/mcp",
"headers": {
"Authorization": "Bearer mpdf_your_api_key"
}
}
}
}Other clients
Any client that supports the MCP Streamable HTTP transport (2025-03-26 revision or later) will work. Point it at https://makespdf.com/api/v1/mcp and send Authorization: Bearer <key> on every POST.
3. Verify the connection
Most clients list connected MCP servers in a status panel. Quick sanity check from the command line:
curl -X POST https://makespdf.com/api/v1/mcp \
-H "Authorization: Bearer mpdf_your_api_key" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'You should see a JSON response listing all eleven tools. A 401 means the API key isn’t valid; a 200 with an empty tool array shouldn’t happen — if it does, file an issue.
4. Try it
Ask your AI something like:
Create an invoice template for Acme Corp with 3 line items, save it, and
show me the preview PDF.The agent should:
- Read the pdf-template-author.md resource (prompted by the server’s instructions).
- Draft DSL and call validate_dsl.
- Fix any reported issues and call render_dsl_preview.
- Call save_template once you confirm the result.
- (Optional, billed) Call render_template with the new ID and real data to produce the deliverable PDF.
Limits and cost
- Rate limits are shared with the REST endpoints each tool wraps — MCP calls and curl/CLI calls draw from the same per-endpoint bucket (e.g. 200/hour for preview, 500/hour for the validate tools, 100/hour for template writes).
- Billing: every authoring tool is free. The one billed tool is render_template, which deducts 1 credit per 10 pages on success — same rate as /api/v1/render. The tool description and the JSON metadata it returns (
creditsDeducted,creditsRemaining) make the cost explicit so a chat session can surface it to the human. The markdown endpoint (/md) remains REST-only. - Watermarks: render_dsl_preview always bakes a “PREVIEW — NOT FOR USE” overlay into the PDF and is free. render_template follows the caller’s plan: free-plan output is stamped, paid plans render clean.
What’s next
- Bring your own AI — skill-only flows and CLI-based authoring.
- API Reference — the REST endpoints each MCP tool wraps.
- pdf-template-author.md — the canonical authoring skill, also available as an MCP resource.