# Documentero — how to use (mcp.ai)

Connect your Documentero account and use 4 tools for documents straight from your AI agent. Connect with your own API key. Documentero generates Word, PDF, and Excel documents from reusable templates and structured data.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_documentero?ms=1787295720000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `documentero_generate_document`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/documentero`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/documentero/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/documentero/generate/document` — Generate a DOCX, PDF, or XLSX document from a Documentero template and data. Returns an expiring signed download URL by default or embedded base64 file data when requested. Each call consumes plan-dep
  - body: { data: object, embed?: boolean, format?: string, template_id: string }
- `POST https://api.mcp.ai/api/documentero/get/template/json/schema` — Return the JSON Schema for the data object accepted when generating a document from a template.
  - body: { template_id: string }
- `POST https://api.mcp.ai/api/documentero/get/template/metadata` — Return a template's Documentero field definitions, nested field options, supported output formats, and default output format.
  - body: { template_id: string }
- `POST https://api.mcp.ai/api/documentero/list/templates` — Return all templates available to the connected Documentero account, including each template identifier and type-bearing label.

## Example prompts
- "What can I do in Documentero?"
- "Show me a summary of my Documentero account"

## More
- Page: https://mcp.ai/documentero
- Agent spec (llms.txt): https://mcp.ai/documentero/llms.txt
- Postman collection: https://mcp.ai/documentero/postman.json
