MCP server for AI agents.

a2pdf exposes a remote MCP server. Claude Code, Cursor, Windsurf, Cline, and anything else that speaks MCP can convert documents to PDF without copy-paste. Streamable HTTP (the current MCP spec) and legacy SSE transports both work.

Streamable HTTP SSE (legacy) 3 tools No API key required

Install

Claude Code (recommended)

claude mcp add --transport http a2pdf https://a2pdf.com/mcp

Or for older Claude Code releases that only support SSE:

claude mcp add --transport sse a2pdf https://a2pdf.com/mcp/sse

Claude Desktop / Cursor / Windsurf / VS Code MCP

Add this to your mcpServers config:

"a2pdf": {
  "url": "https://a2pdf.com/mcp",
  "transport": "streamable-http"
}

Hermes (YAML)

mcp_servers:
  a2pdf:
    url: "https://a2pdf.com/mcp"

Cline / OpenClaw / others (SSE)

{"url":"https://a2pdf.com/mcp/sse"}

Tools

convert_to_pdf

Primary tool — converts any supported input to a PDF and returns a one-time download URL valid for 10 minutes.

{
  "name": "convert_to_pdf",
  "arguments": {
    "text": "# My document\n\nHello **world**.",
    "theme": "clean",
    "paper_size": "letter"
  }
}

Accepts exactly one of:

Options:

preview_html

Render an input to themed HTML without producing a PDF. Returns the HTML string. Useful when iterating on themes or content before committing to a final render.

list_themes

Returns the four themes with one-line descriptions. Call once and cache.

Large files — out-of-band upload

Tool calls have a 2 MB inline cap to protect the agent's token budget. For larger files, upload first:

curl -F [email protected] https://a2pdf.com/mcp/upload
# → {"id":"abc...","filename":"input.docx","bytes":123456,"expires_in_seconds":600}

Then call convert_to_pdf with upload_id: "abc..." and no file_base64. IDs are single-use and expire after 10 minutes.

Transports

Endpoints reference

POST /mcp                          Streamable HTTP transport
GET  /mcp/sse                      Legacy SSE session opener
POST /mcp/messages?sessionId=X     Legacy SSE replies
POST /mcp/upload                   Out-of-band file upload (multipart, field: file)
GET  /mcp/download/{id}            One-time PDF download (10-min TTL)

Sister sites with MCP