> ## Documentation Index
> Fetch the complete documentation index at: https://docs.autype.com/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP Server Overview

> Connect any MCP-compatible AI agent or IDE to Autype

The Autype MCP server implements the [Model Context Protocol](https://modelcontextprotocol.io) (MCP 2025-03-26) over Streamable HTTP. It exposes Autype's document generation capabilities as tools that any compatible AI agent or IDE can call directly — no custom code required.

## What is MCP?

The Model Context Protocol (MCP) is an open standard that allows AI agents and applications to access external tools and data sources. Think of it as a universal API that AI assistants understand natively.

With the Autype MCP server, your AI agent can:

* **Generate documents** from a full document JSON or Extended Markdown and receive a download URL
* **Build documents iteratively** — create a session, add sections one by one, then render
* **List projects** — browse your Autype projects and documents
* **Read the document schema** — the agent can inspect the full JSON schema as a resource to construct valid documents

## Prerequisites

* An Autype account with an API key ([Dashboard → Settings → API Keys](https://app.autype.com))

<Note>
  The Autype MCP server is available at `https://mcp.autype.com/mcp/`. No installation required — just point your MCP client to this URL and pass your API key.
</Note>

## Supported clients

<CardGroup cols={2}>
  <Card title="Claude Desktop" icon="message-square" href="/automation/integrations/mcp/claude-desktop">
    Connect Autype to Claude Desktop app for macOS and Windows.
  </Card>

  <Card title="Claude Code (CLI)" icon="terminal" href="/automation/integrations/mcp/claude-code">
    Use Autype with Claude's command-line interface.
  </Card>

  <Card title="Cursor" icon="code" href="/automation/integrations/mcp/cursor">
    Integrate Autype into the Cursor AI-powered code editor.
  </Card>

  <Card title="Windsurf" icon="wind" href="/automation/integrations/mcp/windsurf">
    Connect Autype to Windsurf IDE with Cascade.
  </Card>

  <Card title="VS Code (Copilot)" icon="code-2" href="/automation/integrations/mcp/vscode">
    Use Autype with GitHub Copilot in Visual Studio Code.
  </Card>

  <Card title="MCP Inspector" icon="search" href="/automation/integrations/mcp/inspector">
    Test and debug the Autype MCP server with the official inspector tool.
  </Card>
</CardGroup>

## Available tools

### Render tools

| Tool                | Description                                                                                                                                                                                                                                     |
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `render_document`   | Render a complete document JSON to PDF/DOCX/ODT. Takes a `config` object (with `document`, `sections`, and optionally `defaults`, `variables`, `abbreviations`, `citations`). Waits for completion and returns a download URL.                  |
| `render_markdown`   | Render Extended Markdown to PDF/DOCX/ODT. Takes `content` (markdown string) and `document` (settings with `type`, `size`, etc.) as separate top-level parameters, plus optional `defaults`, `variables`, `abbreviations`, `citations`, `style`. |
| `render_get_status` | Poll for render job status by job ID. Returns status, download URL (when completed), format, credit cost, and timestamps.                                                                                                                       |
| `render_list_jobs`  | List render jobs with pagination (`page`, `limit`) and optional `status` filter ("PENDING", "PROCESSING", "COMPLETED", "FAILED").                                                                                                               |

### Document builder tools

| Tool                       | Description                                                                                                                                                                                          |
| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `builder_create_session`   | Create a new session. Accepts `document_type` ("pdf"/"docx"/"odt"), `size` ("A4"/"A3"/"A5"/"Letter"/"Legal"/"Tabloid"), `orientation`, `title`, and margin settings. Returns a `sessionId`.          |
| `builder_get_session`      | Get the full document JSON config and section count for a session.                                                                                                                                   |
| `builder_list_sessions`    | List all active builder sessions.                                                                                                                                                                    |
| `builder_update_document`  | Update document-level settings (type, size, orientation, title, author, filename, margins). Only provided fields are changed.                                                                        |
| `builder_update_defaults`  | Set or merge global defaults: `fontFamily`, `fontSize`, `color`, `lineHeight`, `spacing`, `styles`, `header`, `footer`.                                                                              |
| `builder_set_variables`    | Set or merge template variables for `\{\{varName\}\}` substitution. Values can be strings, number objects, image objects, list objects, or table objects.                                            |
| `builder_add_section`      | Add a section with `type` ("flow"/"page") and `content` array. Supports all element types: headings, text, images, tables, lists, code, math, charts, QR codes, page breaks, spacers, TOC, and more. |
| `builder_update_section`   | Replace a section at a given index with a new section object.                                                                                                                                        |
| `builder_remove_section`   | Remove a section by index.                                                                                                                                                                           |
| `builder_reorder_sections` | Reorder sections by providing a permutation of current indices.                                                                                                                                      |
| `builder_render`           | Render the session to the configured output format. Waits for completion and returns a download URL.                                                                                                 |
| `builder_delete_session`   | Delete a session and free its memory.                                                                                                                                                                |

### Other tools

| Tool            | Description                                                                                                   |
| --------------- | ------------------------------------------------------------------------------------------------------------- |
| `projects_list` | List projects with pagination (`page`, `limit`). Each project contains document IDs for persistent rendering. |

## Schema resources

The MCP server exposes the Autype document schema as readable resources. Your AI agent can read these to understand the exact structure before constructing a document:

| Resource URI                         | Description                                                               |
| ------------------------------------ | ------------------------------------------------------------------------- |
| `autype://schemas/document`          | Full document JSON schema (sections, elements, defaults, variables, etc.) |
| `autype://schemas/defaults`          | Defaults schema (fonts, colors, spacing, header/footer)                   |
| `autype://schemas/document-settings` | Document settings (page size, orientation, margins, output format)        |
| `autype://schemas/variables`         | Template variables for text substitution                                  |
| `autype://schemas/abbreviations`     | Abbreviation entries for automatic expansion                              |
| `autype://schemas/citations`         | Citation entries and bibliography configuration                           |

## Example prompts

Once connected, you can ask your AI agent naturally:

> *"Generate a two-page PDF invoice for client Acme GmbH, total €2,400, due 2026-03-15. Include a line items table."*

> *"Convert this markdown report to a PDF with A4 size and 3cm margins."*

> *"Create a DOCX contract template with \{\{client\_name}}, \{\{start\_date}}, and \{\{monthly\_fee}} variables."*

> *"List my recent render jobs and download the latest completed one."*
