Skip to content

Let your AI agent make PDFs (MCP)

KikiDoc ships a Model Context Protocol server, so an MCP-enabled agent (Claude, Cursor, your own LLM app) can generate PDFs as a tool call — no glue code.

  • Endpoint: https://mcp.kikidoc.dev/mcp (Streamable HTTP)
  • Auth: Authorization: Bearer <token> — a portal-issued JWT (see below)
  • Liveness: GET https://mcp.kikidoc.dev/healthz{"status":"ok"} (no auth)

Tools the agent gets

Tool Does
render_html_to_pdf Render an HTML string (+ data) to a PDF
render_template_to_pdf Render a stored template by name (+ data) — Pro
list_templates List the org's stored templates
create_template / update_template / delete_template Manage stored templates (Pro)

Every tool is org-scoped to the authenticated user — an agent only ever sees your org's data.

Get a token

The MCP server accepts the same JWT the portal issues. Log in to get one:

curl -X POST https://app.kikidoc.dev/auth/jwt/login \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "username=you@example.com&password=your-password"
# → { "access_token": "eyJ…", "token_type": "bearer" }

Use that access_token as the bearer. (Tokens expire — re-issue when you get a 401.)

Point a client at it

Any MCP client that speaks Streamable HTTP works. Example config:

{
  "mcpServers": {
    "kikidoc": {
      "url": "https://mcp.kikidoc.dev/mcp",
      "headers": { "Authorization": "Bearer eyJ…" }
    }
  }
}

Then ask your agent something like "render this HTML invoice to a PDF with kikidoc" — it calls render_html_to_pdf and gets the document back.

REST vs MCP auth

The REST API uses an X-API-Key header; the MCP server uses a portal JWT bearer. Same account, two auth styles — REST for scripts/automations, MCP for agents.