PDFiTT is an open-source PDF generation MCP for rendering Markdown into polished PDF documents. It ships as a browser editor, a direct HTTP PDF API, a remote Streamable HTTP MCP server, and a portable local agent skill.
Use the hosted instance, fork it, or self-host your own branded Markdown-to-PDF tool.
Deployed endpoint:
https://pdf-i-tt.vercel.app/mcp
LLM entry point:
https://pdf-i-tt.vercel.app/llms.txt
- Open-source Markdown-to-PDF generation under the MIT License.
- Remote MCP tool for agents and MCP clients.
- Direct Vercel Function API for apps and scripts.
- Browser editor with live preview and one-click PDF download.
- Portable skill at
skills/pdfitt-markdown-pdf. - Shared renderer across browser, API, and MCP workflows.
- GitHub Flavored Markdown parsing with
marked. - PDF generation with
pdfmake. - Support for headings, lists, task lists, blockquotes, code blocks, inline code, links, tables, horizontal rules, and image placeholders.
- Safer export behavior for raw HTML and script content.
- Filename derivation from the first H1 heading.
- 250,000-character Markdown input limit.
The full system documentation is available in both source and rendered form:
llms.txtAGENTS.mdSELF_HOSTING.mdCHANGELOG.mddocs/PDFiTT-System-Documentation.mddocs/PDFiTT-System-Documentation.pdf
If you are pointing an LLM at this repository, start with llms.txt.
npm install
npm run devBuild for production:
npm run buildQuality checks:
npm run lint
npm run build
npm auditcurl -X POST "https://pdf-i-tt.vercel.app/api/pdf" \
-H "Content-Type: application/json" \
--output document.pdf \
--data '{"markdown":"# Hello\n\nRendered by PDFiTT."}'Request JSON accepts one of:
markdownmarkdown_base64source_url
Optional:
filename
Connect any MCP client that supports remote Streamable HTTP servers to:
https://pdf-i-tt.vercel.app/mcp
The MCP server exposes:
render_markdown_pdf
get_setup_instructions
render_markdown_pdf returns JSON containing filename, mimeType, byteLength, and base64 PDF bytes.
get_setup_instructions returns generic MCP, Claude Code, OpenCode, Codex, local skill, script, and direct API setup instructions. A normal browser or curl GET to /mcp returns the same setup payload:
curl https://pdf-i-tt.vercel.app/mcpClaude Code remote HTTP setup:
claude mcp add --transport http pdfitt https://pdf-i-tt.vercel.app/mcpCodex remote MCP setup:
codex mcp add pdfitt --url https://pdf-i-tt.vercel.app/mcpOpenCode remote MCP setup:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"pdfitt": {
"type": "remote",
"url": "https://pdf-i-tt.vercel.app/mcp",
"enabled": true
}
}
}Merge that block into ~/.config/opencode/opencode.json for global use or opencode.json in a project.
PDFiTT is designed so other developers and teams can host their own PDF generation MCP.
- Fork this repository.
- Deploy it to Vercel.
- Set
PDFITT_PUBLIC_URLto your deployed origin, for examplehttps://your-pdf-tool.vercel.app. - Optionally set
PDFITT_ALLOWED_ORIGINSto restrict browser/API callers. - Connect MCP clients to
https://your-pdf-tool.vercel.app/mcp. - Use the direct API at
https://your-pdf-tool.vercel.app/api/pdf.
For local development:
npm install
npm run devFor a production check:
npm run lint
npm run buildSee SELF_HOSTING.md for a fuller deployment checklist and customization notes.
After deployment, replace every https://pdf-i-tt.vercel.app example with your own origin.
The portable skill lives at:
skills/pdfitt-markdown-pdf
Codex local skill setup:
mkdir -p "${CODEX_HOME:-$HOME/.codex}/skills"
cp -R skills/pdfitt-markdown-pdf "${CODEX_HOME:-$HOME/.codex}/skills/"Use it from Codex, OpenCode, or any agent runtime that supports local skills by copying that folder into the relevant skills directory. The included agents/openai.yaml and agents/opencode.json templates point at the hosted MCP endpoint.
Scripted render example:
node skills/pdfitt-markdown-pdf/scripts/render_pdf_via_mcp.mjs \
--mcp-url https://pdf-i-tt.vercel.app/mcp \
--markdown-file ./notes.md \
--out ./notes.pdfvercel.json rewrites /mcp to /api/mcp and configures 30-second function durations for both PDF and MCP rendering endpoints.
Relevant environment variables:
PDFITT_PUBLIC_URL: base URL used in generated setup instructions.PDFITT_ALLOWED_ORIGINS: comma-separated allowed origins for API and MCP requests.PDFITT_MCP_URL: local skill script fallback for the MCP endpoint URL.
MIT License. See LICENSE.