@pressa/mcp
This server compiles LaTeX source into a publication-quality PDF over HTTP, returning a PDF URL, page count and compile time.
Compile LaTeX to PDF — pass complete LaTeX (with
\documentclassand\begin{document}...\end{document}); the agent must generate the LaTeX itself, not pass raw text, markdown or JSON.Useful when no local TeX installation exists — ideal for typeset documents: invoices, contracts, reports, letters, CVs, certificates, academic papers.
Choose a compiler —
pdflatex(default),xelatex, orlualatex(Pro/Business only; otherwisecompiler_not_available).Include images/assets — send a filename → base64 map via
assets(PNG, JPG, JPEG, PDF, SVG) and reference them with\includegraphics.Reuse stored assets — save brand files once with
save_asset, then inject them per compile viause_stored_assetsinstead of re-sending bytes.Runs keyless on the anonymous tier — pdflatex only, up to 3 pages, no image assets, a small number of compilations per day; a free API key raises limits.
Over-limit documents still return a PDF preview —
preview: true,total_pages,plan_required, plus awarningto relay.Self-correcting errors — invalid LaTeX returns
not_latex_sourcewith requirements and an example template; asset problems return structured errors (invalid_asset_filename,invalid_asset_format,assets_too_large,too_many_assets,asset_name_collision).Not a PDF utility — it cannot convert HTML to PDF, merge/split/compress PDFs, or extract text.
Note: the README also documents template, render, and usage tools, but only
compileis registered in this schema.
Provides LaTeX compilation capabilities via Pressa, turning LaTeX source into publication-quality PDFs. Supports multiple compilers such as pdflatex, xelatex, and lualatex, along with templates, reusable assets, structured compilation error diagnosis, and usage limits.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@@pressa/mcp Compile this LaTeX into a PDF"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@pressa/mcp
MCP (Model Context Protocol) server for Pressa - LaTeX in, publication-quality PDF out. This server lets AI assistants compile documents through a standardized interface.
No API key required to start. Add the server, ask for a PDF, get one. A key raises the limits later.
Setup
Add this to your MCP client configuration (e.g. Claude Desktop, Cursor):
{
"mcpServers": {
"pressa": {
"command": "npx",
"args": ["-y", "@pressa/mcp"]
}
}
}That is the whole configuration. The server starts in anonymous mode and
exposes the compile tool and the public template gallery, which work with no
credentials: 3 successful PDFs per day, and failed attempts do not count
against that, so an assistant can iterate on its LaTeX for free.
To unlock the rest, add a key:
{
"mcpServers": {
"pressa": {
"command": "npx",
"args": ["-y", "@pressa/mcp"],
"env": {
"PRESSA_API_KEY": "pressa_your_key_here"
}
}
}
}Get a free key at pressa.dev. Takes about 30 seconds, no credit card. It raises the limit to 50 compilations per month and registers the template, asset and render tools.
Related MCP server: GoLatex MCP Server
Hosted server (no install)
The same tools are also served over Streamable HTTP at
https://api.pressa.dev/mcp, so a client that supports remote MCP servers
needs no Node.js and no local process:
claude mcp add --transport http pressa https://api.pressa.dev/mcpKeyless, it exposes compile and the public template gallery
(list_public_templates, get_public_template, render_public_template). Send
an Authorization: Bearer <key> header to register the template, asset and
render tools as well.
Environment Variables
Variable | Required | Default | Description |
| No | - | Pressa API key (starts with |
| No |
| API base URL |
Anonymous mode
With no PRESSA_API_KEY set, the server starts anyway rather than refusing to
run, and registers only the tools that work without an account: compile,
list_public_templates, get_public_template and render_public_template.
Tools that need an account are not registered at all, because a tool that
cannot succeed is worse than an absent one.
Anonymous limits: pdflatex only, up to 3 pages, 30 KB of source, no image assets, and PDF links that expire after 1 hour.
Error handling
Compilation failures return a structured diagnosis rather than a raw TeX log:
the error class, the offending command, and a concrete suggested fix (often a
missing \usepackage). An assistant is expected to apply the fix and retry on
its own instead of showing the user a compiler log.
Tools
compile
Compile LaTeX source code into a PDF.
Input:
Parameter | Type | Required | Description |
| string | Yes | Complete LaTeX source code. Must contain |
| string | No |
|
Each plan has limits on pages per document, LaTeX source size, PDF output size, and compile timeout. If a compile exceeds your plan's page limit, the document does not count against your monthly quota and the MCP response includes the limit and an upgrade URL. Non-LaTeX input is rejected with a structured requirements list and an example_template so the LLM can self-correct without user intervention.
Output (success):
{
"job_id": "ffc2bd62-3b67-45d6-be14-b529c4b9489f",
"pdf_url": "https://api.pressa.dev/api/v1/pdfs/ffc2bd62...?sig=xxx&exp=xxx",
"expires_at": "2026-04-09T20:44:55Z",
"pages": 1,
"compilation_time_ms": 359,
"usage": {
"plan": "free",
"compilations_this_month": 9,
"monthly_limit": 50
}
}Output (error): Compilation log and error line number.
list_public_templates, get_public_template, render_public_template
Pressa's public document templates (pressa.dev/templates): invoices, purchase orders, packing slips, delivery notes, receipts, reports, certificates, resumes and cover letters. No key needed.
list_public_templates: every template with a summary, a preview image URL and its colours. Designs of one document (document, e.g. five resume designs) take the same data.get_public_template(template: slug): the fields (JSON schema), sample data and filling instructions.render_public_template(template: slug,data: object shaped like the sample, optionalcolor): fills the template and returnspdf_url. A field that is missing or of the wrong type comes back as a list to fix, at no cost.
Each template also has plain instructions for assistants at https://pressa.dev/templates/<slug>/agent.md.
usage
Get current API usage statistics.
Input: None.
Output:
{
"user": {
"email": "user@example.com",
"username": "user",
"plan": "free"
},
"usage": {
"compilations_this_month": 9,
"monthly_limit": 50,
"remaining": 41,
"resets_at": "2026-04-30T23:59:59Z"
},
"api_key": {
"prefix": "pressa_a",
"name": "my-key",
"total_requests": 15,
"last_used_at": "2026-04-08T20:44:55Z"
}
}save_template
Save or update a LaTeX template by name. Paid plans only. Upserts: a second call with the same name overwrites the first.
Parameter | Type | Required | Description |
| string | Yes | Template name (max 100 chars). Unique per user. |
| string | For a new template | Full LaTeX source for the template body. May be omitted when converting the saved source with |
| string | No | Short human-readable summary (max 500 chars). Shown in |
| string | No | Agent playbook (prose markdown, max 50000 chars). Describes how to fill the template - defaults, workflow rules, edge cases, conditional logic. Optional but recommended for templates with dynamic parts. See note below. |
| string | No |
|
description vs instructions: description is the one-line UI summary ("Standard Toptal monthly invoice"). instructions is the longer playbook your AI agent reads alongside the LaTeX when filling the template ("Ask the user only for total amount; date is today; invoice number format YYYYMMDD-N where N is sequential count for the calendar year; for EU clients add VAT line"). They are different fields.
Raw LaTeX vs placeholder templates: a raw LaTeX template is compiled exactly as saved. A placeholder template is filled with JSON data by render, so the layout never changes. A source containing Liquid placeholders sent without placeholder_engine is refused with liquid_placeholders_in_v1_template, because raw LaTeX would print the braces literally in the PDF. If a placeholder save returns liquid_syntax_error, wrap the literal LaTeX that Liquid misreads (usually a comment right after a brace, \foo{%) in {% raw %}...{% endraw %}.
list_templates
List the user's saved templates. Does not include latex_content or instructions to keep the response small.
Input: None.
Each item in the returned array carries id, name, description, updated_at, latex_size_bytes, and has_instructions (boolean). Use the has_instructions flag to decide whether a follow-up get_template call will return a useful playbook.
get_template
Fetch a single template by ID or name. Returns the full latex_content plus instructions (if any) in one round trip - your agent gets the layout and the playbook together.
Parameter | Type | Required | Description |
| string | Yes | Numeric ID or URL-safe template name. |
delete_template
Delete a template by ID or name.
Parameter | Type | Required | Description |
| string | Yes | Numeric ID or URL-safe template name. |
Development
npm install
npm run build
npm startLicense
MIT
Available Tools
4 toolscompileAInspect
Compile LaTeX source into a PDF. Returns a PDF URL, page count and compile time.
USE THIS WHEN: you have LaTeX source (or a \documentclass) and no local pdflatex / TeX Live installation to run it with. This is that missing compiler, available over HTTP. Also use it whenever the user asks for a document where typesetting matters - an invoice, contract, report, letter, CV, certificate, or academic paper - since you can write the LaTeX yourself and compile it here.
DO NOT USE THIS TO: convert HTML to PDF, merge, split or compress existing PDF files, or extract text from a PDF. This compiles LaTeX source and nothing else.
NO API KEY IS CONFIGURED, so this runs on the anonymous tier: pdflatex or xelatex, up to 3 pages, no image assets, and a small number of compilations per day. It works right now - use it. If the server reports the daily allowance is used up, tell the user they can get a free key at https://pressa.dev/users/sign_up in about 30 seconds with no credit card, then set PRESSA_API_KEY and restart this server.
If a document is over the plan's page or size limit, the response still contains a PDF: preview: true, the first pages the plan allows, total_pages, and plan_required naming the plan that covers the whole document. Show the user the preview and relay warning; never drop pages silently.
IMPORTANT: This tool compiles LaTeX, NOT plain text. You (the AI agent) must generate complete, valid LaTeX source yourself before calling this tool. Do not pass user-provided plain text, markdown, JSON, or raw file contents directly - convert them to LaTeX first. Do not ask the user to write LaTeX; that is your job.
A minimal valid document is: \documentclass{article}\begin{document}\end{document}. Always include a documentclass declaration. Always wrap content in \begin{document}...\end{document}. Always escape these characters in body text: % becomes %, & becomes &, $ becomes $, # becomes #, _ becomes _, { becomes {, } becomes }, backslash becomes \textbackslash{}.
IMAGES & BINARY ASSETS: Reference a file in the LaTeX by filename via \includegraphics{logo.png} (remember \usepackage{graphicx}). To get a file the user gives you (photo, logo, signature) to the server, call create_asset_upload: the bytes go by a link, never through you. Then pass use_stored_assets: ["name"] on this and every future compile. The assets parameter (filename => base64 you write out) is only for small one-off files, about 30 KB at most: each KB is about 1,400 characters of output and one wrong character corrupts the file.
If the input is not valid LaTeX, the API returns a not_latex_source error with the exact requirements and an example template. Read that response, fix your LaTeX, and retry. Do not bounce back to the user.
Inputs: latex (required), assets, compiler, use_stored_assets.
get_public_templateARead-onlyIdempotentInspect
Get a public template's fields (JSON schema), sample data, filling instructions and LaTeX source. Read the instructions before collecting data from the user. To make the PDF, pass the data to render_public_template; to change the layout itself, edit the source and use compile. Works without an API key.
Inputs: template (required).
list_public_templatesARead-onlyIdempotentInspect
List Pressa's public, professionally designed document templates (invoices, purchase orders, packing slips, delivery notes, receipts, reports, certificates, resumes, CVs, cover letters), each with a one-line summary, a preview image URL and the colours it comes in. Several designs of one document (document, e.g. five resume designs) take the same data. Use this when the user wants one of these documents and has no layout of their own, or asks to see designs to choose from. Works without an API key.
Inputs: no named parameters.
render_public_templateAInspect
Fill a public template with the user's data and return a PDF link. Data must match the template's schema (see get_public_template); a missing field comes back as a list of what to ask for, and costs nothing. The designs of one document take the same data (the five resume designs, as do the packing slip and the delivery note), so switching design is the same call with a different slug, and color prints a design in another of its colours. Works without an API key within the daily free limit.
Inputs: data (required), template (required), color.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
The four tools have reasonably clear boundaries: list/get/render form a template pipeline and compile handles raw LaTeX. The only mild overlap is compile vs render_public_template, both producing PDFs, though descriptions distinguish them (own LaTeX source vs filling a template). The compile description, however, tells the agent to call `create_asset_upload`, a tool that does not exist, which injects confusion into the set.
Three tools follow a clear verb_object pattern scoped to templates (list_public_templates, get_public_template, render_public_template). `compile` is a bare verb that deviates from the pattern, but it is unambiguous for its distinct LaTeX-compilation role.
Four tools is a lean, well-scoped surface for a LaTeX/PDF template service covering discovery, schema retrieval, rendering, and raw compilation. It is slightly thin given that the compile description references an asset-upload tool that is not present.
The template lifecycle (list → get schema → render) plus raw compile is covered, but compile explicitly instructs calling `create_asset_upload` for user-supplied images, and no such tool exists, leaving a hard dead end. There is also no way to manage or list stored assets across calls.
Maintenance
Related MCP Connectors
Compile and check LaTeX to PDF from any AI agent: errors, fixes and quota via Octree.
A hosted LaTeX editor your assistant can actually use. Search 1,019 free templates, create and edit projects, and compile them to PDF on a real TeX Live farm, getting back the PDF or the compile log when a build fails. Thirteen tools behind OAuth 2.1, with nothing to install and nothing to run locally.
Persistent AI LaTeX workspace: edit and compile multi-file projects, export publication-ready PDFs.
Write, compile and share Typst documents (papers, slides, drawings) from any AI agent.
Related MCP Servers
- AlicenseBqualityCmaintenanceEnables AI assistants to convert LaTeX source code into professionally formatted PDF documents with comprehensive error handling and local file generation capabilities.12MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to read, write, and compile LaTeX projects locally, view PDF pages as images, and manage project files, with live updates reflected in a web-based editor.-
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to read, edit, upload, compile, and manage projects in a self-hosted Overleaf Community Edition via MCP, while also providing a git remote for cloning and pushing changes.1MIT
- AlicenseNot gradedqualityCmaintenanceEnables a writer and their AI tools to edit, compile, and manage self-hosted LaTeX projects through authenticated MCP tools, with revision-safe edits, file history, and isolated TeX compilation.MIT