CLCaptain.Legal MCP
Connect

Official MCP server / API

Developer reference

Captain.Legal exposes a standards-based MCP endpoint. A client can discover the tools and schemas at runtime; this page documents the intended sequence and the boundaries that integrations must preserve.

01

Transport and discovery

The server uses MCP Streamable HTTP. Initialize a session on the endpoint, keep the returned session identifier, and send standard MCP requests over the same URL.

  • Endpoint: https://mcp.captain.legal/connect/
  • Transport: Streamable HTTP
  • Authentication: none for catalogue and preview
  • Protocol schemas: returned by tools/list

02

Minimal client configuration

mcp.json
{
  "mcpServers": {
    "captain-legal": {
      "type": "streamable-http",
      "url": "https://mcp.captain.legal/connect/"
    }
  }
}

03

Tool reference

Call the tools in order. Schemas returned by the server remain the source of truth for required fields.

01

list_document_types

Search and paginate the qualified catalogue. Filters include ISO country code, category and free text. Results include the exact payable price.

02

get_requirements

Returns the selected template interview: fields, types, options, conditions and any encoded legal rules.

03

generate_document

Validates submitted answers, creates a draft and returns a free watermarked PDF preview with its exact price.

04

purchase_document

Creates or reuses the secure payment order for a draft. The final document is sent by email after payment.

05

get_document_status

Checks payment and delivery state using the private status token returned by the purchase tool.

04

Recommended lifecycle

Search first, then load requirements. Ask only questions defined by the interview and preserve the field identifiers. Generate after every required active field has an answer. Never purchase without explicit user confirmation.

05

Errors and retries

Tool errors use stable machine-readable codes and a human message. Correct validation errors before retrying. Retry transient upstream failures with backoff; do not retry payment creation in a loop. Order creation is idempotent for a draft.

06

Security boundaries

Never expose the status token unless the user explicitly asks for it. Do not collect payment details in chat. Preview and payment URLs are signed and expire. Respect the country returned by the selected document type rather than inferring another jurisdiction.