# Docmosis — how to use (mcp.ai)

Connect your Docmosis account and use 17 tools for documents straight from your AI agent. Connect with your own API key. Docmosis generates PDF and Word documents from templates, letting developers merge data fields to produce reports, invoices, or letters quickly.

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

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

### Endpoints
- `POST https://api.mcp.ai/api/docmosis/delete/image` — Tool to delete one or more stored images. Use when you need to remove images; ensure imageName(s) are valid before use.
  - body: { accessKey?: string, imageName: string[] }
- `POST https://api.mcp.ai/api/docmosis/delete/template` — Tool to delete one or more templates from the environment. Use when you need to remove templates; multiple templates can be deleted in a single request.
  - body: { accessKey?: string, templateName: string[] }
- `POST https://api.mcp.ai/api/docmosis/environment/ready` — Tool to verify environment readiness. Use when ensuring the environment is active and within quota before rendering documents.
  - body: { accessKey: string }
- `POST https://api.mcp.ai/api/docmosis/environment/summary` — Tool to retrieve environment summary. Use when you need status, plan, and quota details of your Docmosis environment after authentication.
  - body: { accessKey: string }
- `POST https://api.mcp.ai/api/docmosis/get/api/key` — Tool to extract the Docmosis API access key from connection metadata. Use before other Docmosis API calls to retrieve the Bearer token from the Authorization header.
- `POST https://api.mcp.ai/api/docmosis/get/batch/upload/status` — Tool to check the status of a template batch upload job. Use when monitoring batch upload progress or checking if a batch upload has completed.
  - body: { userJobId: string }
- `POST https://api.mcp.ai/api/docmosis/get/image` — Tool to download one or more images. Use when you need to retrieve stored image files by name. If multiple names provided, images are returned in a zip archive.
  - body: { accessKey?: string, imageName: string[] }
- `POST https://api.mcp.ai/api/docmosis/get/render/queue` — Tool to get current render queue status and utilization. Use when monitoring queue capacity before scheduling rendering tasks.
  - body: { accessKey?: string }
- `POST https://api.mcp.ai/api/docmosis/get/render/tags` — Tool to retrieve statistics on renders tagged with user-defined phrases. Returns page counts and document counts aggregated monthly. Use when reporting activity of user groups or features.
  - body: { tags: string, year?: integer, month?: integer, nMonths?: integer, padBlanks?: string }
- `POST https://api.mcp.ai/api/docmosis/get/sample/data` — Tool to generate sample data for a Docmosis template based on its structure. Creates placeholder values that can be used for testing renders. Returns data in JSON or XML format.
  - body: { format?: string, stringify?: string, template_name: string }
- `POST https://api.mcp.ai/api/docmosis/get/template` — Tool to retrieve originally uploaded templates. Use when you need to download template files by name. If multiple names provided (up to 100), templates are returned in a zip archive.
  - body: { accessKey?: string, templateName: string[] }
- `POST https://api.mcp.ai/api/docmosis/get/template/details` — Tool to retrieve metadata for an uploaded template. Returns name, size, MD5 hash, last modified date, and error status. Use after uploading a template to verify it was stored correctly or to check if 
  - body: { accessKey?: string, stringify?: string, templateName: string }
- `POST https://api.mcp.ai/api/docmosis/get/template/structure` — Tool to retrieve a template's parsed structure: fields, repeats, conditions, images, and refs. Use after uploading a template to inspect its JSON structure.
  - body: { stringify?: boolean, access_key?: string, template_name: string }
- `POST https://api.mcp.ai/api/docmosis/list/images` — Tool to list available stock images. Use when you need to retrieve image names optionally filtered by folder.
  - body: { folder?: string, accessKey?: string, includeSubFolders?: boolean }
- `POST https://api.mcp.ai/api/docmosis/list/templates` — Tool to list all templates available in the environment. Use when you need to retrieve template names, optionally filtered by folder with pagination support.
  - body: { folder?: string, paging?: string|boolean, pageSize?: string|integer, accessKey?: string, pageToken?: string, includeDetail?: string|boolean, includeSubFolders?: string|boolean }
- `POST https://api.mcp.ai/api/docmosis/ping` — Tool to check connectivity to Docmosis Cloud services. Use when validating that the service endpoint is reachable before other operations.
- `POST https://api.mcp.ai/api/docmosis/ping/docmosis/service` — Tool to check that Docmosis Cloud services are online and at least one server is listening. Use for diagnostics and monitoring to verify service availability.

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

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