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
{
"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.
list_document_types
Search and paginate the qualified catalogue. Filters include ISO country code, category and free text. Results include the exact payable price.
get_requirements
Returns the selected template interview: fields, types, options, conditions and any encoded legal rules.
generate_document
Validates submitted answers, creates a draft and returns a free watermarked PDF preview with its exact price.
purchase_document
Creates or reuses the secure payment order for a draft. The final document is sent by email after payment.
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.