Use it from Claude, Codex and other AI clients
Compose PDF speaks the Model Context Protocol, so an AI client can list the templates you have published and render them — without you writing any integration code.
What it can do: list templates, read the fields a template takes, and render one to PDF. What it cannot do: create, edit or publish templates. Those stay in the studio, on a screen a person is looking at.
The endpoint
Section titled “The endpoint”https://composepdf.com/mcpIt accepts two credentials, and which one you use depends on the client:
| Credential | Header | Use it when |
|---|---|---|
| API key | x-api-key: rsp_live_… |
the client lets you set a header |
| OAuth | discovered from the 401 | the client only takes a URL |
Issue an API key under Settings → API keys and pick the render role. That role can list and render but cannot write data — a leaked string should not be able to do both.
Claude Code
Section titled “Claude Code”claude mcp add --transport http composepdf https://composepdf.com/mcp \ --header "x-api-key: rsp_live_…"Claude Desktop
Section titled “Claude Desktop”Desktop has no field for a header, so it signs in instead. Go to Settings → Connectors → Add custom connector and paste:
https://composepdf.com/mcpYour browser opens, you approve the connection, and Desktop acts as you — in the organization you belong to, with the same reach the studio gives you.
Add it to ~/.codex/config.toml (or .codex/config.toml in a project):
[mcp_servers.composepdf]url = "https://composepdf.com/mcp"env_http_headers = { "x-api-key" = "COMPOSEPDF_API_KEY" }env_http_headers names an environment variable rather than the key itself, so
the secret stays out of the config file. For a static value use
http_headers = { "x-api-key" = "rsp_live_…" } instead. Codex can also sign in
with OAuth (auth = "oauth", then codex mcp login composepdf).
Other clients
Section titled “Other clients”The endpoint is plain Streamable HTTP, so anything that speaks it will connect.
Only the key names differ between clients — a URL and a headers map, sometimes
with an explicit type: "http". Cursor, VS Code Copilot, Gemini CLI and Goose
all fit this shape.
A client that only speaks stdio can go through a proxy:
npx mcp-remote https://composepdf.com/mcp --header "x-api-key: rsp_live_…"Using it
Section titled “Using it”Name the template and give it data — the title works, you do not need the id:
Render 請求書 for 山田商事, invoice INV-2026-0001, one line item: design work, 1 × ¥180,000
If something is missing, the error names the fields, so the model can fill them in and try again. You get back a link rather than the bytes: a PDF is megabytes and a conversation is not the place to carry them.
On clients that render MCP Apps — Claude and Claude Desktop among them — asking what a template takes also puts a form in the conversation. Fill it in, press 作成, and the same render runs with your answers.
The tools themselves are documented in the MCP reference.