Typeset PDFs, from your own code

Add typeset-PDF generation to your app or agent — one HTTP call in, a designed, print-ready PDF out. 1 credit per PDF, and a failed conversion costs nothing.

No subscription. Credits come in packs and never expire.

REST API

One POST, bearer auth, JSON in and a download link out. OpenAPI 3.1 published.

MCP server

Three tools in any MCP client over stdio. Your agent converts without you writing a client.

Claude Skill

Ask for a PDF in plain language; the skill picks the theme and mode and hands back a link.

GPT Action

Import the OpenAPI document into a custom GPT — nothing to build, only to configure.

Convert your first document

Paste the whole block — it sets the two variables it uses, so nothing has to be filled in first:

export MDPRINT_API_URL="https://grimoireprint.com"
export MDPRINT_API_KEY="mdp_sk_your_key_here"

curl -s -X POST "$MDPRINT_API_URL/api/v1/convert" \
  -H "Authorization: Bearer $MDPRINT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "markdown": "# Quarterly Review\n\nRevenue is up.",
    "theme": "default",
    "mode": "report"
  }'

The response carries a link to the finished PDF, valid for five minutes:

{
  "download_url": "https://…/api/download/<token>/quarterly-review.pdf",
  "expires_in": 300,
  "filename": "quarterly-review.pdf",
  "bytes": 214512,
  "credits_remaining": 41
}

The token is in the link, so fetching the PDF needs no key — it is a plain second request:

curl -o quarterly-review.pdf "<download_url>"

Or do both in one line, so no one has to copy a token by hand:

curl -s -X POST "$MDPRINT_API_URL/api/v1/convert" \
  -H "Authorization: Bearer $MDPRINT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"markdown": "# Quarterly Review\n\nRevenue is up."}' \
  | jq -r '.download_url' \
  | xargs curl -o quarterly-review.pdf

No jq? The same thing with grep and cut:

curl -s -X POST "$MDPRINT_API_URL/api/v1/convert" \
  -H "Authorization: Bearer $MDPRINT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"markdown": "# Quarterly Review\n\nRevenue is up."}' \
  | grep -o '"download_url":"[^"]*"' | cut -d'"' -f4 \
  | xargs curl -o quarterly-review.pdf

markdown is the only required field. theme fantasy gives the tabletop treatment — stat blocks, GM callouts, parchment; default covers reports, newsletters, newspapers, résumés, certificates and poetry. GET /api/v1/themes lists every value that exists, so an agent can read the options rather than guess them.

Use it from an MCP client

The MCP server is a thin stdio client over the same API. Drop this into your client's config — Claude Desktop puts it under Settings → Developer → Edit Config:

{
  "mcpServers": {
    "grimoireprint": {
      "command": "npx",
      "args": ["-y", "@mdprint/mcp-server"],
      "env": { "MDPRINT_API_KEY": "mdp_sk_your_key_here" }
    }
  }
}

In Claude Code it is one line:

claude mcp add grimoireprint --env MDPRINT_API_KEY=mdp_sk_your_key_here -- npx -y @mdprint/mcp-server

Restart the client and three tools appear: convert_markdown_to_pdf, list_themes and get_credit_balance. Running out of credits, a bad key or a rate limit come back as ordinary tool errors saying what to do about them.

stdio, not a remote endpoint. The key comes from the environment, which is what the MCP specification asks of a stdio server. A hosted HTTP endpoint would need full OAuth 2.1, so it is not offered rather than shipped as a deviation.

Or skip the client entirely

Pricing

One credit per PDF. The credit is spent only once the PDF exists, so a rejected request, an invalid option or a conversion failure is never charged. API keys spend purchased credits, and nothing they produce is watermarked.

50 Pack $5 50 PDFs
200 Pack $15 200 PDFs
500 Pack $30 500 PDFs

Packs are one-time purchases and the credits never expire. The monthly free allowance is for browser use; a key has none, because keys are free to mint and one would be an unlimited free tier. Each key has an hourly conversion allowance — 60 by default, raisable on request — and every response carries the numbers in its headers.

Get a key

Generate a key yourself: sign in to your account and create one under API access. A key spends your account's credits — there is no separate balance and no free allowance for keys — and it is shown once, so copy it when it appears. You can revoke it there at any time.

A key is shown once and stored only as a hash — treat it like a password, because it spends real credits.