# Docugenerate — how to use (mcp.ai)

Connect your Docugenerate account and use 9 tools for documents straight from your AI agent. Connect with your own API key. DocuGenerate simplifies document generation by converting Word templates and JSON data into professional PDF files with ease. It supports automation of contracts, invoices, letters, certificates, and more, catering to both developers and non-developers. With an intuitive REST API and no-code integrations, it ensures seamless functionality for any scale.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_docugenerate?ms=1787296020000`
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. `docugenerate_delete_document`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/docugenerate`
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/docugenerate/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/docugenerate/delete/document` — Tool to delete a document by ID. Permanently removes the document from storage. Use when you need to clean up generated documents or remove outdated files from DocuGenerate.
  - body: { id: string }
- `POST https://api.mcp.ai/api/docugenerate/delete/template` — Tool to permanently delete a template by ID. Removes the template and all associated versions from storage. Use when a template is no longer needed.
  - body: { id: string }
- `POST https://api.mcp.ai/api/docugenerate/document/generate` — Tool to generate document(s) from a template by merging JSON data or uploading a data file. Use when you need to programmatically produce one or more documents and receive metadata including a downloa
  - body: { data?: object|object[], file?: object, name?: string, attach?: string|string[], merge_with?: string|string[], page_break?: boolean, output_name?: string, single_file?: boolean, template_id: string, output_format?: string }
- `POST https://api.mcp.ai/api/docugenerate/document/update` — Update a document's name/title in DocuGenerate. Use this to rename an existing document after it has been generated. Requires a valid document ID (obtained from document generation or listing) and the
  - body: { id: string, name: string }
- `POST https://api.mcp.ai/api/docugenerate/get/document` — Tool to retrieve a specific document by ID. Returns document metadata including name, format, template_id, and download URL. Use when you need to fetch details about an existing generated document.
  - body: { id: string }
- `POST https://api.mcp.ai/api/docugenerate/get/template` — Tool to retrieve a specific template by ID. Returns template metadata including name, format, region, and configuration settings.
  - body: { id: string }
- `POST https://api.mcp.ai/api/docugenerate/list/documents` — Tool to list all documents generated from a template. Results are ordered by created time in descending order. Use when you need to retrieve a list of previously generated documents for a specific tem
  - body: { template_id: string }
- `POST https://api.mcp.ai/api/docugenerate/template/get/or/list` — Tool to retrieve or list existing templates. Use when needing template IDs and metadata before making updates or generating documents.
  - body: { page?: integer, per_page?: integer }
- `POST https://api.mcp.ai/api/docugenerate/template/update` — Tool to update a template’s file and settings. Use after confirming the template ID and desired inputs.
  - body: { id: string, file?: object, name?: string, region?: string, versioning_enabled?: boolean }

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

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