Generate PDF/DOCX/XLSX/PPTX from templates+JSON. Convert Office/HTML/MD to PDF. Universal templating
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
Official Carbone MCP server β Turn AI assistants into document automation experts. Generate professional PDFs, invoices, reports, and more using natural language.
Give Claude, ChatGPT, and other AI assistants the power to:
{d.field} tagsGet your free API key at account.carbone.io.
All stdio-compatible MCP clients use the same config:
| Client | Config file |
|---|---|
| Claude Desktop (macOS) | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Claude Desktop (Windows) | %APPDATA%\Claude\claude_desktop_config.json |
| Cursor (global) | ~/.cursor/mcp.json |
| Cursor (project) | .cursor/mcp.json |
| Claude Code | claude mcp add carbone-mcp -e CARBONE_API_KEY=your_key -- npx -y carbone-mcp |
VS Code uses
{ "mcp": { "servers": { ... } } }instead of{ "mcpServers": { ... } }β the inner config block is identical.
After adding the config, restart your client and try: "What can Carbone do?"
Connect directly to the hosted endpoint. Supported by VS Code, Cursor, Claude Code, and other clients that support streamable HTTP transport.
Authentication: The HTTP endpoint currently requires a Carbone API key passed as a Bearer token in the
Authorizationheader. OAuth2 support (for Claude Desktop, Mistral, ChatGPT, Gemini, and other clients) is planned for a future release.Cursor uses
{ "mcpServers": { ... } }instead of{ "mcp": { "servers": { ... } } }β the inner config block is identical.Claude Desktop does not support HTTP Bearer token authentication β use the stdio option above instead.
Connect your MCP client to http://your-host:3000 using the HTTP config above (replace the URL).
Docker Compose β see compose.yml:
Claude Desktop with Docker (stdio) β Claude Desktop does not support HTTP transport; use the stdio mode instead:
If you run Carbone on-premise, point the MCP server at your instance β no API key required:
Required (stdio mode, cloud API):
CARBONE_API_KEY β Your Carbone API key (get one free β). Not required when CARBONE_BASE_URL points to your own on-premise server, or when running in HTTP mode (clients supply their own key via Authorization: Bearer).| Variable | Default | Description |
|---|---|---|
CARBONE_BASE_URL | https://api.carbone.io | Override for self-hosted or staging environments. When set to a custom URL, CARBONE_API_KEY is not required. |
CARBONE_TIMEOUT | 60000 | Request timeout in milliseconds (max: 60000) |
CARBONE_MAX_FILE_BYTES | 104857600 | Maximum size (bytes) for a resolved input file β path, URL, or base64 (100 MB default) |
MCP_TRANSPORT | stdio | Transport mode: stdio (default, for AI clients) or http (for self-hosted deployments) |
MCP_PORT | 3000 | HTTP server port (only used when MCP_TRANSPORT=http) |
MCP_PATH | / | HTTP endpoint path (only used when MCP_TRANSPORT=http) |
MCP_MAX_BODY_BYTES | 62914560 | Maximum request body size in bytes (60 MB default, matching Carbone Cloud limit) |
CARBONE_REQUIRE_CLIENT_AUTH_HEADER | false | HTTP mode only β require Authorization: Bearer <key> on every request. Leave false only if you intend a shared-key server: with a server-level CARBONE_API_KEY set, requests that carry no Bearer key fall back to it, so anyone who can reach the port can spend that Carbone account. Set to true to require each client to bring its own key. Irrelevant when no server key is set (e.g. on-premise) |
CARBONE_ALLOW_PRIVATE_NETWORK | false | Allow user-supplied URLs (templates, data, β¦) to resolve to private/internal addresses. Off by default to block SSRF (cloud metadata, localhost, RFC1918). Enable only on a trusted deployment with internal template hosts |
| Tool | Description | Docs |
|---|---|---|
convert_document | Convert documents between 100+ formats without storing a template | β |
render_document | Generate documents from templates by merging with JSON data | β |
| Tool | Description | Docs |
|---|---|---|
list_templates | Browse your template library with filtering by category or search (tags are returned per template but not filterable server-side) | β |
list_categories | List all template categories in your account | β |
list_tags | List all tags used across your templates | β |
upload_template | Store reusable templates with versioning, categorization, and metadata | β |
update_template_metadata | Rename, categorize, tag, deploy, or expire template versions | β |
delete_template | Soft-delete templates (marked for removal, gone after ~24h) | β |
download_template | Download original template files (DOCX, XLSX, PDF, etc.) | β |
| Tool | Description | Docs |
|---|---|---|
get_api_status | Check Carbone API health and current version | |
get_capabilities | View all supported formats, features, and examples |
π Full API Reference β β Detailed parameters, schemas, and examples
By default, a generated or converted file is returned based on its type and transport:
| Output | stdio (local clients) | HTTP (remote / self-hosted) |
|---|---|---|
| Text β HTML, TXT, CSV, MD, XML | inline text | inline text |
| Inline images β PNG, JPG, GIF, WEBP | inline image | inline image |
| Everything else β PDF, Office, ZIP, SVGβ¦ | saved to a temp file, path returned | returned as a download attachment |
Three optional parameters on convert_document and render_document (and outputPath / asAttachment on download_template) override this:
| Parameter | Effect |
|---|---|
outputPath | stdio only β save the output to this local path instead of returning it inline (rejected in HTTP mode) |
asAttachment | return the bytes as a downloadable attachment for any format, instead of inline |
returnLink | return Carbone's public one-time download URL instead of the file β short-lived and consumed by the first download, so hand it to the user rather than fetching it yourself (works in stdio and HTTP) |
Claude Desktop: it cannot render inline binary attachments (it mishandles them as images). For PDFs and Office files, rely on the default stdio temp-file path, or use
returnLinkto get a download URL.
Test and debug the server interactively:
Or from a local build:
Open http://localhost:5173 to view all tools, test calls, and inspect request/response JSON β no AI inference needed.
Look for:
Carbone MCP Server v1.x.x started (stdio)When running in HTTP mode, the server exposes a health endpoint:
The carbone field shows backend connectivity:
{ "version": "..." } β reachable and authenticated{ "error": "unauthorized", "message": "..." } β reachable but no/invalid API key{ "error": "unreachable", "message": "..." } β network error, timeout, or unexpected responseβ οΈ File and URL inputs (SSRF / local files)
Tools accept a local path, an HTTPS URL, or base64 for file / template and the by-reference JSON params (data, complement, β¦). Two guards apply:
169.254.169.254), CGNAT or reserved addresses β and every redirect hop is re-checked. Set CARBONE_ALLOW_PRIVATE_NETWORK=true only on a trusted deployment that needs internal template hosts.β οΈ Sharing a server-level API key (HTTP mode)
If you set CARBONE_API_KEY on an HTTP server and leave CARBONE_REQUIRE_CLIENT_AUTH_HEADER=false (the default), requests without a Bearer key fall back to that key β anyone who can reach the port can spend that Carbone account. Set it to true to require each client to bring its own key, or only expose the port on a trusted network. (Not applicable when no server key is set, e.g. on-premise Carbone without authentication.)
β οΈ Prompt Injection Connecting an AI assistant to any external service carries inherent risks. A malicious document or template could contain instructions that trick the AI into performing unintended actions (e.g. exfiltrating data, deleting templates). Always review what your AI client is about to do before confirming tool calls.
β οΈ API Key Protection
CARBONE_API_KEY to version controlβ οΈ Template Safety
β οΈ Data Privacy
CARBONE_BASE_URL to point to a self-hosted instance for maximum controlDesign templates in Word, Excel, LibreOffice, or HTML with {d.field} tags:
Guides & best practices:
| Category | Formats |
|---|---|
| Documents | PDF, DOCX, XLSX, PPTX, ODT, ODS, ODP, ODG, RTF, EPUB |
| Images | PNG, JPG, WEBP, SVG, TIFF, BMP, GIF |
| Web / Text | HTML, TXT, CSV, MD, XML |
Full conversion matrix: carbone.io/documentation
We welcome contributions:
See CONTRIBUTING.md for guidelines.
Apache 2.0 β see LICENSE
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/carbone-mcp)<a href="https://allmcps.com/mcp/carbone-mcp"><img src="https://allmcps.com/api/badge/carbone-mcp?style=directory" alt="Carbone MCP on AllMCPs" /></a>