# Contractbook — how to use (mcp.ai)

Connect your Contractbook account and use 9 tools for documents straight from your AI agent. Connect with your own API key. Contractbook is a contract lifecycle management platform for creating, organizing, sharing, sending, and signing contracts.

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

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

### Endpoints
- `POST https://api.mcp.ai/api/contractbook/create/document/from/template` — Create a draft document from a Contractbook template, optionally overriding its document fields; this does not send the draft for signature.
  - body: { tags?: string[], title?: string, message?: string, parties?: object[], language?: string, attachments?: object[], data_fields?: object[], template_id: string, dynamic_tables?: object[], to_be_signed_by?: string, company_logo_url?: string, signing_order_mode?: string, attachments_signed_separately?: boolean }
- `POST https://api.mcp.ai/api/contractbook/delete/document` — Permanently destroy a Contractbook document with no restore option. Signed documents cannot be deleted through this API; Contractbook rejects signed or otherwise undeletable documents rather than repo
  - body: { document_id: string }
- `POST https://api.mcp.ai/api/contractbook/get/document` — Get the full current Contractbook document, including the version required for a safe update.
  - body: { document_id: string }
- `POST https://api.mcp.ai/api/contractbook/get/document/pdf/link` — Get a short-lived PDF download URL for a document, or a not-ready message when Contractbook is still generating it.
  - body: { document_id: string }
- `POST https://api.mcp.ai/api/contractbook/get/template` — Get a template's full fields, parties, attachments, and signing configuration before creating a draft from it.
  - body: { template_id: string }
- `POST https://api.mcp.ai/api/contractbook/list/automations` — List Contractbook automations for one trigger type; this only discovers automations and does not run them.
  - body: { trigger_type: string }
- `POST https://api.mcp.ai/api/contractbook/list/documents` — Search and filter documents visible to the connected Contractbook account, returning one page and a cursor for continuation.
  - body: { full?: boolean, tags?: string[], owned?: boolean, title?: string, cursor?: string, states?: string[], contexts?: string[], page_size?: integer, sort_column?: string, workspace_id?: string, signed_before?: string, document_types?: string[], sort_direction?: string, updated_before?: string, signed_at_or_after?: string, updated_at_or_after?: string, integration_object_id?: string }
- `POST https://api.mcp.ai/api/contractbook/list/templates` — List all Contractbook templates visible to the connected account for choosing a template ID.
  - body: { exclude_spaces?: boolean }
- `POST https://api.mcp.ai/api/contractbook/update/document` — Update selected fields of a draft or stored contract using its current version; supplied collection fields replace their complete existing collections.
  - body: { tags?: string[], title?: string, message?: string, parties?: object[], version: string, language?: string, attachments?: object[], data_fields?: object[], document_id: string, dynamic_tables?: object[], to_be_signed_by?: string, company_logo_url?: string, signing_order_mode?: string, attachments_signed_separately?: boolean }

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

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