[{"data":1,"prerenderedAt":469},["ShallowReactive",2],{"guide-\u002Fdocs\u002Fguides\u002Fai-mcp\u002Fcursor":3,"guides-all":400},{"id":4,"title":5,"body":6,"category":390,"description":391,"extension":392,"icon":393,"meta":394,"navigation":395,"order":103,"path":396,"seo":397,"stem":398,"__hash__":399},"guides\u002Fdocs\u002Fguides\u002Fai-mcp\u002Fcursor.md","Cursor",{"type":7,"value":8,"toc":380},"minimark",[9,13,23,28,43,47,58,61,65,160,167,171,198,202,205,211,214,224,234,238,244,306,317,321,327,341,354,358,376],[10,11,5],"h1",{"id":12},"cursor",[14,15,16,22],"p",{},[17,18,5],"a",{"href":19,"rel":20},"https:\u002F\u002Fwww.cursor.com\u002F",[21],"nofollow"," has had native MCP support since late 2024. Setup is JSON-based and identical across platforms.",[24,25,27],"h2",{"id":26},"prerequisites","Prerequisites",[29,30,31,35],"ul",{},[32,33,34],"li",{},"Cursor 0.42 or later",[32,36,37,38,42],{},"A Transactional API token (",[39,40,41],"code",{},"tk_live_…",")",[24,44,46],{"id":45},"_1-open-the-mcp-config","1. Open the MCP config",[14,48,49,50,53,54,57],{},"Cursor stores MCP servers in ",[39,51,52],{},"~\u002F.cursor\u002Fmcp.json"," (global, used across all projects). To scope to one project, create ",[39,55,56],{},".cursor\u002Fmcp.json"," at the project root.",[14,59,60],{},"If the file doesn't exist, create it.",[24,62,64],{"id":63},"_2-add-the-transactional-server","2. Add the Transactional server",[66,67,72],"pre",{"className":68,"code":69,"language":70,"meta":71,"style":71},"language-json shiki shiki-themes github-light github-dark","{\n  \"mcpServers\": {\n    \"transactional\": {\n      \"url\": \"https:\u002F\u002Fmcp.transactional.dev\",\n      \"headers\": {\n        \"Authorization\": \"Bearer tk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\n      }\n    }\n  }\n}\n","json","",[39,73,74,83,93,101,117,125,136,142,148,154],{"__ignoreMap":71},[75,76,79],"span",{"class":77,"line":78},"line",1,[75,80,82],{"class":81},"sVt8B","{\n",[75,84,86,90],{"class":77,"line":85},2,[75,87,89],{"class":88},"sj4cs","  \"mcpServers\"",[75,91,92],{"class":81},": {\n",[75,94,96,99],{"class":77,"line":95},3,[75,97,98],{"class":88},"    \"transactional\"",[75,100,92],{"class":81},[75,102,104,107,110,114],{"class":77,"line":103},4,[75,105,106],{"class":88},"      \"url\"",[75,108,109],{"class":81},": ",[75,111,113],{"class":112},"sZZnC","\"https:\u002F\u002Fmcp.transactional.dev\"",[75,115,116],{"class":81},",\n",[75,118,120,123],{"class":77,"line":119},5,[75,121,122],{"class":88},"      \"headers\"",[75,124,92],{"class":81},[75,126,128,131,133],{"class":77,"line":127},6,[75,129,130],{"class":88},"        \"Authorization\"",[75,132,109],{"class":81},[75,134,135],{"class":112},"\"Bearer tk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\n",[75,137,139],{"class":77,"line":138},7,[75,140,141],{"class":81},"      }\n",[75,143,145],{"class":77,"line":144},8,[75,146,147],{"class":81},"    }\n",[75,149,151],{"class":77,"line":150},9,[75,152,153],{"class":81},"  }\n",[75,155,157],{"class":77,"line":156},10,[75,158,159],{"class":81},"}\n",[14,161,162,163,166],{},"If you already have other MCP servers, just add the ",[39,164,165],{},"transactional"," block alongside them.",[24,168,170],{"id":169},"_3-reload-cursor","3. Reload Cursor",[14,172,173,177,178,180,181,184,185,184,188,184,191,184,194,197],{},[174,175,176],"strong",{},"Settings → MCP"," and toggle the server off\u002Fon, or just restart Cursor entirely. You should see a green dot next to ",[39,179,165],{}," and the list of five tools (",[39,182,183],{},"list_documents",", ",[39,186,187],{},"get_document",[39,189,190],{},"generate_pdf",[39,192,193],{},"list_folders",[39,195,196],{},"get_usage",").",[24,199,201],{"id":200},"_4-use-it","4. Use it",[14,203,204],{},"Open the chat (Cmd-L) and try:",[206,207,208],"blockquote",{},[14,209,210],{},"\"List my Transactional documents.\"",[14,212,213],{},"Cursor will pop a tool-call card. Approve it, see the templates, then iterate:",[206,215,216],{},[14,217,218,219,223],{},"\"Generate a PDF using the ",[220,221,222],"em",{},"Invoice"," template, customer Acme Corp, amount 1280.50 €.\"",[14,225,226,227,230,231,233],{},"Cursor builds the ",[39,228,229],{},"variables"," object from your template's sample shape and calls ",[39,232,190],{},".",[24,235,237],{"id":236},"project-scoped-tip","Project-scoped tip",[14,239,240,241,243],{},"If your codebase has Transactional templates referenced by UUID, drop a ",[39,242,56],{}," at the project root so anyone cloning the repo gets the connector. Pull the token from an env var:",[66,245,247],{"className":68,"code":246,"language":70,"meta":71,"style":71},"{\n  \"mcpServers\": {\n    \"transactional\": {\n      \"url\": \"https:\u002F\u002Fmcp.transactional.dev\",\n      \"headers\": {\n        \"Authorization\": \"Bearer ${env:TRANSACTIONAL_API_TOKEN}\"\n      }\n    }\n  }\n}\n",[39,248,249,253,259,265,275,281,290,294,298,302],{"__ignoreMap":71},[75,250,251],{"class":77,"line":78},[75,252,82],{"class":81},[75,254,255,257],{"class":77,"line":85},[75,256,89],{"class":88},[75,258,92],{"class":81},[75,260,261,263],{"class":77,"line":95},[75,262,98],{"class":88},[75,264,92],{"class":81},[75,266,267,269,271,273],{"class":77,"line":103},[75,268,106],{"class":88},[75,270,109],{"class":81},[75,272,113],{"class":112},[75,274,116],{"class":81},[75,276,277,279],{"class":77,"line":119},[75,278,122],{"class":88},[75,280,92],{"class":81},[75,282,283,285,287],{"class":77,"line":127},[75,284,130],{"class":88},[75,286,109],{"class":81},[75,288,289],{"class":112},"\"Bearer ${env:TRANSACTIONAL_API_TOKEN}\"\n",[75,291,292],{"class":77,"line":138},[75,293,141],{"class":81},[75,295,296],{"class":77,"line":144},[75,297,147],{"class":81},[75,299,300],{"class":77,"line":150},[75,301,153],{"class":81},[75,303,304],{"class":77,"line":156},[75,305,159],{"class":81},[14,307,308,309,312,313,316],{},"Add ",[39,310,311],{},"TRANSACTIONAL_API_TOKEN=..."," to your shell's env or a ",[39,314,315],{},".env"," Cursor can pick up.",[24,318,320],{"id":319},"troubleshooting","Troubleshooting",[14,322,323,326],{},[174,324,325],{},"Red dot, \"Failed to start\""," — JSON syntax error. Open the Cursor MCP panel's \"Show logs\" to see the parser output.",[14,328,329,332,333,336,337,340],{},[174,330,331],{},"Tools list but every call hangs"," — Wrong URL. Should be ",[39,334,335],{},"https:\u002F\u002Fmcp.transactional.dev"," exactly — no trailing slash, no ",[39,338,339],{},"\u002Fv1\u002F"," path.",[14,342,343,349,350,353],{},[174,344,345,348],{},[39,346,347],{},"unauthorized"," on every call"," — Token revoked or missing the ",[39,351,352],{},"Bearer "," prefix.",[24,355,357],{"id":356},"next-steps","Next steps",[29,359,360,368],{},[32,361,362],{},[174,363,364],{},[17,365,367],{"href":366},"\u002Fdocs\u002Fguides\u002Fai-mcp\u002Fuse-from-ai#a-first-prompt-to-try","A first prompt to try →",[32,369,370],{},[174,371,372],{},[17,373,375],{"href":374},"\u002Fdocs\u002Fguides\u002Fai-mcp\u002Ftools-reference","MCP tools reference →",[377,378,379],"style",{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":71,"searchDepth":85,"depth":85,"links":381},[382,383,384,385,386,387,388,389],{"id":26,"depth":85,"text":27},{"id":45,"depth":85,"text":46},{"id":63,"depth":85,"text":64},{"id":169,"depth":85,"text":170},{"id":200,"depth":85,"text":201},{"id":236,"depth":85,"text":237},{"id":319,"depth":85,"text":320},{"id":356,"depth":85,"text":357},"ai-mcp","Wire Transactional into Cursor's MCP support so you can generate PDFs from inside your editor.","md","mouse-pointer-2",{},true,"\u002Fdocs\u002Fguides\u002Fai-mcp\u002Fcursor",{"title":5,"description":391},"docs\u002Fguides\u002Fai-mcp\u002Fcursor","VKzi5sHyzkCbLEJuI6hgcjiukF7rHit4WRAc0RF2dGc",[401,405,409,413,414,418,421,425,430,434,438,442,447,452,456,460,465],{"path":402,"title":403,"description":404,"category":390,"order":119},"\u002Fdocs\u002Fguides\u002Fai-mcp\u002Fchatgpt","ChatGPT (via Custom GPT Actions)","ChatGPT doesn't speak MCP natively yet — but you can give it the same powers through a Custom GPT pointed at the Transactional REST API.",{"path":406,"title":407,"description":408,"category":390,"order":95},"\u002Fdocs\u002Fguides\u002Fai-mcp\u002Fclaude-code","Claude Code (CLI)","Connect Transactional to Claude Code so it can read your templates and generate PDFs from your terminal.",{"path":410,"title":411,"description":412,"category":390,"order":85},"\u002Fdocs\u002Fguides\u002Fai-mcp\u002Fclaude-desktop","Claude Desktop","Connect Transactional to Claude Desktop on macOS or Windows so Claude can read your templates and generate PDFs.",{"path":396,"title":5,"description":391,"category":390,"order":103},{"path":415,"title":416,"description":417,"category":390,"order":127},"\u002Fdocs\u002Fguides\u002Fai-mcp\u002Fgemini","Gemini Code Assist \u002F Gemini CLI","Connect Transactional to Google's Gemini agents through their MCP support.",{"path":374,"title":419,"description":420,"category":390,"order":138},"MCP tools reference","Every tool the Transactional MCP server exposes, with arguments, return shapes, and a prompt that typically triggers each one.",{"path":422,"title":423,"description":424,"category":390,"order":78},"\u002Fdocs\u002Fguides\u002Fai-mcp\u002Fuse-from-ai","Use Transactional from your AI assistant","Connect Transactional to Claude, Cursor, ChatGPT, or Gemini via MCP so your assistant can read your templates and generate PDFs directly.",{"path":426,"title":427,"description":428,"category":429,"order":85},"\u002Fdocs\u002Fguides\u002Fauthoring\u002Fdesign-for-pdf","Designing templates that survive PDF rendering","PDFs are static — drop the animations, oversample your canvas charts, lean on vectors. The rules that make a template look sharp at print resolution.","authoring",{"path":431,"title":432,"description":433,"category":429,"order":78},"\u002Fdocs\u002Fguides\u002Fauthoring\u002Fhandlebars","Handlebars cheat sheet","The exact subset of Handlebars supported in Transactional templates — variables, conditionals, loops, and what NOT to reach for.",{"path":435,"title":436,"description":437,"category":429,"order":95},"\u002Fdocs\u002Fguides\u002Fauthoring\u002Fmodeling-variables","Modeling your variables","When to make something a variable vs. inline. Keep the API contract small, your templates portable, and your integration code boring.",{"path":439,"title":440,"description":441,"category":429,"order":103},"\u002Fdocs\u002Fguides\u002Fauthoring\u002Fworking-with-ai","Working with the AI assistant","Prompts and patterns to get good templates fast — what to ask, when to iterate, when to start over.",{"path":443,"title":444,"description":445,"category":446,"order":78},"\u002Fdocs\u002Fguides\u002Fgetting-started\u002Fquickstart","Quickstart — your first PDF in 5 minutes","Sign up, design a template, render your first PDF through the API. End-to-end in five minutes.","getting-started",{"path":448,"title":449,"description":450,"category":451,"order":78},"\u002Fdocs\u002Fguides\u002Fintegrations\u002Fnode-bun","Calling \u002Fv1\u002Fgenerate from Node.js & Bun","Production-grade integration using native fetch — retries, error handling, streaming the PDF to your storage.","integrations",{"path":453,"title":454,"description":455,"category":451,"order":85},"\u002Fdocs\u002Fguides\u002Fintegrations\u002Fphp-laravel","Calling \u002Fv1\u002Fgenerate from PHP & Laravel","cURL extension, Guzzle, or Laravel's HTTP client — render PDFs with retries and proper error handling.",{"path":457,"title":458,"description":459,"category":451,"order":95},"\u002Fdocs\u002Fguides\u002Fintegrations\u002Fpython","Calling \u002Fv1\u002Fgenerate from Python","urllib (stdlib), requests, or httpx with retry — render PDFs from Django, FastAPI, or any Python service.",{"path":461,"title":462,"description":463,"category":464,"order":78},"\u002Fdocs\u002Fguides\u002Foperations\u002Fmonitoring-usage","Monitoring usage & credits","Read the dashboard gauges, set sane alerts, and decide when to top up vs. upgrade.","operations",{"path":466,"title":467,"description":468,"category":464,"order":85},"\u002Fdocs\u002Fguides\u002Foperations\u002Fstoring-pdfs","Storing & serving the generated PDF","The \u002Fv1\u002Fgenerate URL is signed and short-lived. Patterns for keeping the PDF around — your bucket, your CDN, your DB.",1780347733846]