# Craftmypdf — how to use (mcp.ai)

Connect your Craftmypdf account and use 12 tools for documents straight from your AI agent. Connect with your own API key. CraftMyPDF is a web-based platform that enables users to design and generate customizable PDF documents using pre-designed templates and dynamic data.

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

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

### Endpoints
- `POST https://api.mcp.ai/api/craftmypdf/add/text/to/pdf` — Tool to add text annotations to a PDF including page numbers, watermarks, and custom text at specified positions. Supports dynamic variables like {{pageNumber}} and {{totalPages}} for automatic page n
  - body: { url: string, expiration?: integer, output_file?: string, textSettings: object[], cloud_storage?: integer }
- `POST https://api.mcp.ai/api/craftmypdf/add/watermark` — Tool to add a text watermark to a PDF with customizable font, size, color, opacity, and rotation. Use when you need to overlay watermark text (e.g., CONFIDENTIAL, DRAFT) on PDF documents. For more adv
  - body: { url: string, text: string, opacity?: number, rotation?: integer, font_size?: integer, hex_color?: string, expiration?: integer, font_family?: string, output_file?: string, cloud_storage?: integer, postaction_s3_bucket?: string, postaction_s3_filekey?: string }
- `POST https://api.mcp.ai/api/craftmypdf/create/editor/session` — Tool to create an embeddable editor session URL for a template. Use when you need to embed the PDF editor for a specific template.
  - body: { backURL?: string, canSave?: boolean, jsonMode?: integer, canPreview?: boolean, expiration?: integer, canEditJSON?: boolean, canShowData?: boolean, canShowHelp?: boolean, template_id: string, canCreatePDF?: boolean, canShowHeader?: boolean, canShowLayers?: boolean, canViewSettings?: boolean, canShowExpressionDoc?: boolean, canShowPropertyPanel?: boolean, canShowPropertyBinding?: boolean }
- `POST https://api.mcp.ai/api/craftmypdf/create/pdf/async2` — Tool to create a PDF file asynchronously with JSON data and template. Returns immediately with a transaction reference and makes an HTTP/HTTPS GET callback to webhook_url when the PDF is generated. Us
  - body: { data: object|string, version?: string, expiration?: integer, template_id: string, webhook_url?: string, cloud_storage?: integer, resize_format?: string, resize_images?: boolean, resize_max_width?: integer, resize_max_height?: integer, image_resample_res?: integer, postaction_s3_bucket?: string, postaction_s3_filekey?: string }
- `POST https://api.mcp.ai/api/craftmypdf/create/pdf/parallel` — Tool to create multiple PDF files in parallel from templates with JSON data. Processes multiple PDF generation requests concurrently for improved performance. Optionally merges all generated PDFs into
  - body: { merge?: boolean, requests: object[], merge_expiration?: integer }
- `POST https://api.mcp.ai/api/craftmypdf/get/account/info` — Tool to retrieve account information including subscription and usage details. Use when you need to check quota limits, template usage, or account creation date.
- `POST https://api.mcp.ai/api/craftmypdf/get/pdf/info` — Tool to retrieve information about a PDF file including metadata, page count, and other properties. Use when you need to analyze PDF file structure or extract metadata without downloading the entire f
  - body: { url: string }
- `POST https://api.mcp.ai/api/craftmypdf/list/templates` — Tool to retrieve a paginated list of PDF templates. Use when you need to browse available templates before generating a PDF.
  - body: { limit?: integer, offset?: integer, group_name?: string }
- `POST https://api.mcp.ai/api/craftmypdf/list/transactions` — Tool to retrieve a paginated list of API transactions. Use when you need to view transaction history with pagination support.
  - body: { limit?: integer, offset?: integer }
- `POST https://api.mcp.ai/api/craftmypdf/merge/pdfs` — Tool to merge multiple PDF files from URLs into a single PDF document. Use when you need to combine multiple PDF files into one consolidated document. The API fetches PDFs from the provided URLs and m
  - body: { urls: string[], expiration?: integer, output_file?: string, cloud_storage?: integer, postaction_s3_bucket?: string, postaction_s3_filekey?: string }
- `POST https://api.mcp.ai/api/craftmypdf/query/template/usage` — Tool to retrieve usage statistics for specified templates within a date range. Use when you need to track PDF generation counts and credit consumption for specific templates.
  - body: { end_date?: string, start_date?: string, template_ids: string }
- `POST https://api.mcp.ai/api/craftmypdf/update/pdf/fields` — Tool to update fillable fields in a PDF document such as text fields, checkboxes, and dropdowns. Use when you need to programmatically fill out PDF forms by updating field values. The PDF must contain
  - body: { url: string, fields: object[], expiration?: integer, output_file?: string, cloud_storage?: integer }

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

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