erp2pdf-studio MCP server
Commit Oct 27, 2026Lets AI agents build, translate, and preview Odoo PDF and email templates using the erp2pdf.com Template API.
Also known as c4pointer/erp2pdf-studio-mcp
- Stars
- 0
- Tools
- 30
- Downloads, 30 days
- —
- Latest version
- —
- Last commit
- Oct 27, 2026
- License
- MIT
What is erp2pdf-studio MCP?
erp2pdf-studio lets AI agents build, translate, and preview Odoo PDF and email templates using the erp2pdf.com Template API. It exposes 30 tools, such as list_models, get_fields, search_records.
Summary generated from the project's README
About erp2pdf-studio MCP server
Building and testing Odoo PDF and email templates through an AI agent is what this server enables. It provides a direct interface to the erp2pdf.com Template API, allowing developers to manage document layouts without using the manual Studio UI. The server works via stdio and requires an erp2pdf.com Pro plan or higher along with a dedicated API token that has the Template API permission enabled.
Users can interact with live Odoo data by connecting their database to their erp2pdf.com account, or they can work with bundled sample records. The toolset includes capabilities to discover Odoo models and fields, create templates from various starter styles like invoice or quotation, and validate layouts. It also supports advanced design tasks such as importing SVG files for path slots, managing shared header and footer parts, and translating both PDF and HTML email templates into multiple languages. Previews can be rendered as watermarked PDF, PNG, or HTML files to verify the visual output.
What you can do with it
- 1Generate branded quotation templatesAn agent can create a new sale order template using a specific starter style and add custom text slots.
- 2Automate multi-language document translationThe agent can identify translatable strings and apply new translations to both PDF and email templates in one workflow.
Written from the project's README. Every use case is checked against a quote from it.
erp2pdf-studio MCP tools 30
Detected from the READMElist_modelsget_fieldssearch_recordsget_sample_recordlist_templatesget_templatecreate_templateupdate_templatedelete_templateduplicate_templatevalidate_layoutget_values
Show all 30 toolsShow fewer tools
render_previewlist_starterscreate_from_starterpreview_starterget_capabilitiesimport_svglist_partscreate_partupdate_partdelete_partget_translationsset_translationslist_email_templatesget_email_templatecreate_email_templateupdate_email_templatedelete_email_templatepreview_email
Configuration
ERP2PDF_API_KEYERP2PDF_OUTPUT_DIR
Automated checks
Ran Nov 14, 2026Full report →Not verified yet. A server needs a score of 80, no serious finding, and enough data for us to check. How checks work · What to fix for more points
- Source repository linked and reachablec4pointer/erp2pdf-studio-mcp is public and reachablegithub.com/c4pointer/erp2pdf-studio-mcp ↗Pass
- Package names this repository as its sourceNot checked
- Build provenance (Sigstore attestation)Not checked
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-10-27github.com/c4pointer/erp2pdf-studio-mcp ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNot checked
- No critical advisory in the package or its dependenciesNot checked
- No hidden instructions to the model30 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNot checked
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHuberp2pdf-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
- Requirements
- Get an API token
- Install
- Configure your MCP client
- Environment variables
- Tools
- Example session
- Development
- Versioning and support
- License
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 agent 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-mcp
Or 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_studio
To pin a release, append its tag to the URL, for example
git+https://github.com/c4pointer/erp2pdf-studio-mcp@v0.4.1.
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-mcp
Add --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 |
|---|---|---|---|
ERP2PDF_API_KEY |
yes | - | API token from the erp2pdf.com cabinet, issued with "Allow Template API". |
ERP2PDF_BASE_URL |
no | https://erp2pdf.com |
Base URL of the erp2pdf.com deployment to talk to. |
ERP2PDF_OUTPUT_DIR |
no | ~/.cache/erp2pdf-studio-mcp (%LOCALAPPDATA%\erp2pdf-studio-mcp on Windows) |
Where render_preview saves PDF and PNG previews. Created if missing, readable only by you. |
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_models |
List the Odoo models a template can bind to (live from your Odoo when connected, else bundled samples). |
get_fields |
Fields of a model, plus dotted paths one relation deep (partner_id.name, order_line.price_subtotal). |
search_records |
Search real records in your Odoo to pick a record_id for values and previews (needs a connected Odoo). |
get_sample_record |
The record previews are rendered with, to show the data shape. |
PDF templates
| Tool | What it does |
|---|---|
list_templates |
List the account's templates (id, name, bound model, slot count). |
get_template |
Get one template with its full layout and mapping. |
create_template |
Create a template from a Studio layout; it is validated first and nothing is saved on errors. |
update_template |
Replace the layout, or edit in place: upsert or delete slots, set top-level keys. |
delete_template |
Delete a template. |
duplicate_template |
Copy a template. |
validate_layout |
Validate a layout without saving, optionally evaluating every expression against a record. |
get_values |
What every {{ }} expression prints for one record, per slot and per table row. |
render_preview |
Render a watermarked preview as PDF or PNG (saved to ERP2PDF_OUTPUT_DIR) or HTML (returned inline). A PNG also comes back as an image the agent can look at. |
list_starters |
List the starter layouts (blank, quotation, invoice, purchase, product) and the styles each comes in. |
create_from_starter |
Create a template from a starter in a style (classic, folder, wave, diagonal, sidebar, bigtotal, light, boxed, striped, bubble, elegant) and a palette/font preset. |
preview_starter |
Look at a starter style in a palette and font pairing before creating anything (an image of page 1 on sample data). |
Design
| Tool | What it does |
|---|---|
get_capabilities |
Everything a layout can hold: kinds and keys with allowed values (tables of order lines, typed grid tables, chart blocks, sections of grouped blocks), gradients, free vector path slots, page background, theme, bundled fonts, limits, ready path recipes (folder tab, wave, chevron, hexagon, ...). |
import_svg |
Turn an SVG (markup or a local file) into a path slot: paths with fills, gradients and strokes; text and images are listed as dropped. |
Header and footer parts
| Tool | What it does |
|---|---|
list_parts |
List the shared header and footer parts. |
create_part |
Create a header or footer part. |
update_part |
Update a part; every template that uses it changes with it. |
delete_part |
Delete a part (refused while templates use it, unless force=true). |
Translations (PDF and email templates)
| Tool | What it does |
|---|---|
get_translations |
Every translatable string with its translation, status and glossary suggestions per language. |
set_translations |
Translate many languages in one call: merge or replace, add or remove languages, fill from the glossary. |
Email templates
| Tool | What it does |
|---|---|
list_email_templates |
List the HTML email templates sent from Odoo by the erp2pdf.com connector. |
get_email_template |
Get one email template: subject, body, translations and the fields it reads. |
create_email_template |
Create an email template, optionally attaching a PDF template. |
update_email_template |
Change an email template; only the fields given change. |
delete_email_template |
Delete an email template. |
preview_email |
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, returns its path and shows the image to the agent.
Make our invoice bold: a dark wave across the top in our brand blue, our logo from logo.svg, the total set large.
get_capabilities()shows the keys, gradients, fonts and path recipes.create_from_starter("invoice", "Invoice (wave)", style="wave").update_template(id, layout_set={"theme": {"primary": "#0b3d91", ...}})recolours every block that refers to the theme.import_svg(path="logo.svg", w=120, h=40), thenupdate_template(id, upsert_slots=[{"id": "logo", "kind": "path", ...}]).render_preview(template_id=id, output="png"): the agent looks at the page and adjusts until it reads well.
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 -q
The 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).
erp2pdf-studio MCP questions
What tools does erp2pdf-studio MCP provide?
It exposes 30 tools, including list_models, get_fields, search_records, get_sample_record, list_templates.
Can I use my existing Odoo connector token?
No, you must use a dedicated API token issued with 'Allow Template API' enabled. Reusing the Odoo connector token will result in a 403 token_scope error.
Does rendering previews cost credits?
No, previews that carry a PREVIEW watermark do not cost any credits.