AI-native developer access

MCP integration for Codex and AI agents

Legal Policy Generator exposes a production Streamable HTTP MCP endpoint for agent-readable documentation, exact questionnaire inspection, deterministic validation, public-document retrieval, and authenticated operator workflows.

What agents can do

Public tools search and fetch product documentation, return each live questionnaire step, validate factual answers without storage, and read published policies or Terms. Configured operator access adds private draft storage, owned-document reads, and entitlement-checked finalization.

Deterministic, not model-written

Agents help collect and submit facts. Repository-owned versioned clauses, server validation, pricing, ownership, entitlement, rendering, and publication remain authoritative. Runtime AI does not write legal clauses. Output is automated wording, not legal advice or a compliance guarantee.

Connect Codex

Use project or user Codex configuration. Public tools work without a token. Operator tools appear only when server and client share the configured bearer token.

[mcp_servers.legal_policy_generator]
url = "https://legalpolicygenerator.com/mcp"
bearer_token_env_var = "MCP_ACCESS_TOKEN"
default_tools_approval_mode = "writes"
tool_timeout_sec = 60
enabled = true

MCP endpoint: https://legalpolicygenerator.com/mcp. Agent index: llms.txt. Complete agent context: llms-full.txt.

Recommended workflow

  1. Search or fetch current product documentation.
  2. Inspect questionnaire steps using actual known facts.
  3. Validate complete answers and resolve every issue.
  4. Save an authenticated draft for browser review.
  5. Finalize only after explicit approval and server-confirmed entitlement.

Protocol and security

Endpoint supports MCP protocol versions 2025-11-25, 2025-06-18, and 2025-03-26 over stateless JSON responses. Inputs are bounded and untrusted. Origin checks, body limits, rate limits, bearer verification, UUID ownership, validation, and entitlement checks run on server. Secrets and questionnaire bodies are excluded from logs.

MCP specification and Codex documentation define client behavior.

Boundary: Agents must never invent customer facts, legal applicability, processor use, payment status, or publication authority.

Dedicated one-call document tools

Authenticated agents can call create_privacy_policy or create_terms_of_service with factual answers. Each tool creates an owned draft and returns review links by default. Setting publish and confirm to true creates the immutable hosted document only after validation and entitlement checks succeed.