erp2pdf-studio-mcp
Connects to an Odoo database linked to the erp2pdf.com account to discover models and their fields (including dotted relation paths like partner_id.name), search real records to pick a record_id for previews, and fetch sample records to show data shapes when building and testing PDF and email templates.
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., "@erp2pdf-studio-mcpbuild an invoice PDF template for account.move and preview it"
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.
erp2pdf-studio-mcp
An MCP server (stdio) that lets an AI agent build and test PDF templates on erp2pdf.com without the Studio UI. The agent can discover the Odoo models and fields, create a template from a starter or from scratch, validate it, see what every expression prints for a real record, render a watermarked preview (PDF, PNG or HTML), write the HTML email templates Odoo sends, and translate both kinds of template into any language.
Each tool maps 1:1 onto an endpoint of the erp2pdf.com Template API
(/api/v1/studio/*). The layout format, the expression language, error codes
and rate limits are documented at
erp2pdf.com/api-docs#template-api;
a compact, agent-friendly summary is at
erp2pdf.com/llms.txt.
Contents
Related MCP server: ERPipe
Requirements
Python 3.10 or newer (or
uv, which can fetch a suitable Python for you).An erp2pdf.com account on the Pro plan or higher. Other plans get
402 upgrade_requiredfrom the Template API.A dedicated API token issued with Allow Template API ticked (see below). Never reuse the Odoo connector's token.
To work with live Odoo data (
search_records, real sample records), an Odoo database connected to your erp2pdf.com account. Without it the API falls back to bundled sample records.
Get an API token
Sign in at erp2pdf.com and open the cabinet: API tokens (
https://erp2pdf.com/cabinet-tokens) -> New token.Name it after the agent (for example "Claude") and tick Allow Template API (AI agents, MCP). Only tokens issued with that box ticked can call the Template API.
Copy the token: it is shown once. Put it in your MCP client configuration (below), not in a repository.
Never reuse the Odoo connector's token. It is stored in Odoo's settings,
has no Template API scope, and every tool call would fail with
403 token_scope. A dedicated token can also be revoked at any time without
breaking your Odoo connection.
The server sends the token only as an Authorization: Bearer <token> header,
and only to ERP2PDF_BASE_URL.
Install
Run it without a permanent install, with
uvx:
uvx --from git+https://github.com/c4pointer/erp2pdf-studio-mcp erp2pdf-studio-mcpOr install it with pip (in a virtual environment, or with pipx):
pip install git+https://github.com/c4pointer/erp2pdf-studio-mcp
erp2pdf-studio-mcp # or: python -m erp2pdf_studioTo pin a release, append its tag to the URL, for example
git+https://github.com/c4pointer/erp2pdf-studio-mcp@v0.2.0.
Dependencies: mcp 2.3.0 (the official MCP
Python SDK) and httpx.
The server speaks MCP over stdio and is started by your MCP client; you do not
run it by hand. Started without ERP2PDF_API_KEY, it prints
erp2pdf-studio-mcp: ERP2PDF_API_KEY is not set to stderr and exits with
status 2.
Configure your MCP client
Replace <token> with the token from the cabinet.
Claude Desktop
Settings -> Developer -> Edit config opens claude_desktop_config.json:
{
"mcpServers": {
"erp2pdf-studio": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/c4pointer/erp2pdf-studio-mcp",
"erp2pdf-studio-mcp"
],
"env": {
"ERP2PDF_API_KEY": "<token>",
"ERP2PDF_OUTPUT_DIR": "/Users/you/Desktop/erp2pdf"
}
}
}
}Restart Claude Desktop after saving. If uvx is not on the PATH Claude
Desktop sees, use its absolute path (which uvx), or install the package with
pip and set "command" to the absolute path of erp2pdf-studio-mcp.
Claude Code
claude mcp add erp2pdf-studio \
-e ERP2PDF_API_KEY=<token> \
-- uvx --from git+https://github.com/c4pointer/erp2pdf-studio-mcp erp2pdf-studio-mcpAdd --scope user to make it available in every project. For a project-level
.mcp.json, use the same mcpServers block as for Claude Desktop and keep
the token out of version control: write "ERP2PDF_API_KEY": "${ERP2PDF_API_KEY}"
and Claude Code takes the value from your environment.
Cursor
.cursor/mcp.json in the project (or ~/.cursor/mcp.json for all projects):
{
"mcpServers": {
"erp2pdf-studio": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/c4pointer/erp2pdf-studio-mcp",
"erp2pdf-studio-mcp"
],
"env": {
"ERP2PDF_API_KEY": "<token>"
}
}
}
}Any other MCP client that can start a stdio server works the same way:
command uvx, the arguments above, and the environment variables below.
Environment variables
Variable | Required | Default | Description |
| yes | - | API token from the erp2pdf.com cabinet, issued with "Allow Template API". |
| no |
| Base URL of the erp2pdf.com deployment to talk to. |
| no |
| Where |
Tools
Every tool returns JSON text. A failed call is an MCP tool error whose text is
JSON {status, code, message, errors?, warnings?}; for an invalid layout,
errors lists {path, code, message} so the agent can fix the exact slot.
Previews carry a PREVIEW watermark and cost no credits.
Odoo data
Tool | What it does |
| List the Odoo models a template can bind to (live from your Odoo when connected, else bundled samples). |
| Fields of a model, plus dotted paths one relation deep ( |
| Search real records in your Odoo to pick a |
| The record previews are rendered with, to show the data shape. |
PDF templates
Tool | What it does |
| List the account's templates (id, name, bound model, slot count). |
| Get one template with its full layout and mapping. |
| Create a template from a Studio layout; it is validated first and nothing is saved on errors. |
| Replace the layout, or edit in place: upsert or delete slots, set top-level keys. |
| Delete a template. |
| Copy a template. |
| Validate a layout without saving, optionally evaluating every expression against a record. |
| What every |
| Render a watermarked preview as PDF or PNG (saved to |
| List the starter layouts: blank, quotation, invoice, purchase, product. |
| Create a template from a starter, with the account's shared header and footer. |
Header and footer parts
Tool | What it does |
| List the shared header and footer parts. |
| Create a header or footer part. |
| Update a part; every template that uses it changes with it. |
| Delete a part (refused while templates use it, unless |
Translations (PDF and email templates)
Tool | What it does |
| Every translatable string with its translation, status and glossary suggestions per language. |
| Translate many languages in one call: merge or replace, add or remove languages, fill from the glossary. |
Email templates
Tool | What it does |
| List the HTML email templates sent from Odoo by the erp2pdf.com connector. |
| Get one email template: subject, body, translations and the fields it reads. |
| Create an email template, optionally attaching a PDF template. |
| Change an email template; only the fields given change. |
| Delete an email template. |
| Render a saved or draft email for one record, in a given language and timezone. |
get_values, render_preview and preview_email take language (for
example de_DE), which picks translations and the date presets, and
timezone (an IANA name such as Europe/Berlin), where datetimes print.
The full parameter list of each tool is in its MCP schema, which your client shows to the agent.
Example session
Make me a quotation template for sale.order with our customer reference under the address, check it and show me page 1.
What the agent does:
get_fields("sale.order")findsclient_order_ref.create_from_starter("quotation", "Quotation (AI)")creates the template with a line table, totals and the shared header and footer.update_template(id, upsert_slots=[...])adds a text slot under the partner address.validate_layout(...)andget_values(template_id=id)confirm that every expression prints what it should.render_preview(template_id=id, output="png")saves page 1 and returns its path.
Translate it into German and French, and the quotation email too.
get_translations(id)lists the strings, with glossary suggestions.set_translations(id, fill_from_glossary=["de", "fr"]), thenset_translations(id, translations={"de": {...}, "fr": {...}})for the rest. A string with values (Quotation {{ name }}) keeps its{{ }}.render_preview(template_id=id, output="png", language="de_DE").get_translations(email_id, kind="email"), thenset_translations(email_id, kind="email", ...), thenpreview_email(email_id, language="fr_FR").
Development
git clone https://github.com/c4pointer/erp2pdf-studio-mcp
cd erp2pdf-studio-mcp
python -m venv .venv
. .venv/bin/activate
pip install -e ".[test,dev]"
ruff check .
pytest -qThe tests mock the HTTP layer with httpx.MockTransport and drive the server
through the SDK's list_tools / call_tool; they need no token and no
network. To try a local change in an MCP client, point the client's
"command" at .venv/bin/erp2pdf-studio-mcp.
Code layout:
erp2pdf_studio/client.py- HTTP client, one method per Template API endpoint; validates model names and ids before they become URL path segments.erp2pdf_studio/tools.py- the MCP tools (plain async methods, testable without the SDK).erp2pdf_studio/server.py- registers the tools on the MCP server and runs it over stdio.
See CONTRIBUTING.md before opening a pull request.
Versioning and support
The project follows Semantic Versioning. While it is
0.x, a minor version may change tool parameters; every change is listed in
CHANGELOG.md. Releases are tagged vX.Y.Z.
Bugs and feature requests: GitHub issues.
Account, plan or token questions: hello@erp2pdf.com.
Security issues: see SECURITY.md. Never post a token in an issue.
License
MIT. Copyright (c) 2026 Oleg Zubak (erp2pdf.com).
This server cannot be deployed
Maintenance
Related MCP Connectors
Render PDFs from templates you design once: list templates, check the data shape, preview, render.
Render HTML, URLs, and templates to PDF. AI drafts templates and fixes them from logs.
Send transactional pdfs for AI agents via SMTP. Templates included.
- pdfs.buildOAuthbuild.pdfs
Design, publish and render PDF templates with Typst. Full template lifecycle over MCP.
Related MCP Servers
AlicenseNot gradedqualityDmaintenanceEnables AI assistants to generate PDF documents from templates or raw HTML using natural language, with tools for template creation, PDF generation, and utility operations.6 npm1MIT
ERPipeofficial
AlicenseNot gradedqualityBmaintenanceEnables AI agents to interact with Odoo ERP through natural language, providing tools and prompts for data operations and record management.MIT- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to generate PDFs from templates using dynamic data, manage async PDF jobs, list templates, and check account credits and transaction history through natural language.28 npmMIT
- FlicenseNot gradedqualityCmaintenanceEnables AI assistants to interact with Odoo ERP via the external API. It supports listing models, describing schemas, searching, aggregating, creating, updating, deleting records, and invoking business methods, with a configurable permission matrix for safety.-