AI-native developer access

MCP integration for Codex, Claude, ChatGPT, 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 account workflows.

Fastest setup

Give your agent one instruction

Paste this into Codex or Claude Code. It installs the MCP connection and starts the document flow with you.

Open https://legalpolicygenerator.com/developers and install Legal Policy Generator MCP. Start the setup with me: 1. Complete sign-in by asking for my email and one-time code. 2. Ask whether I need a Privacy Policy or Terms of Service. 3. Inspect this codebase for relevant product, account, data, analytics, advertising, payment, provider, and jurisdiction facts. 4. Ask only for required details you cannot verify. 5. Create my private draft and give me the review link.

Then paste it into your current agent chat.

You provide your email and one-time sign-in code when asked. The agent gathers facts, creates the private draft, and returns its review link.

What agents can do

Standard MCP instructions, prompts, resources, and tools help Codex, Claude, ChatGPT, IDE agents, and other compatible clients recognize Privacy Policy, privacy notice, Terms of Service, and Terms and Conditions tasks. Agents can inspect exact questionnaire steps, validate submitted answers, create private drafts, return review links, and finalize only with server-confirmed entitlement.

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.

Manual setup fallback

Use these only when your agent cannot configure its own client.

Codex commands

Codex adds the remote server and opens native OAuth account authorization. Codex app, CLI, and IDE clients on the same host share this MCP configuration.

codex mcp add legal_policy_generator --url https://legalpolicygenerator.com/mcp
codex mcp login legal_policy_generator

Configuration file alternative

[mcp_servers.legal_policy_generator]
url = "https://legalpolicygenerator.com/mcp"
auth = "oauth"
default_tools_approval_mode = "writes"
tool_timeout_sec = 60
enabled = true
Claude Code command

Run the native command, start Claude Code, open /mcp, and choose Authenticate. Claude discovers the authorization server and opens the secure email-code flow. No client ID, secret, callback port, or bearer token is entered manually.

claude mcp add --transport http --scope user legal-policy-generator https://legalpolicygenerator.com/mcp
ChatGPT on supported plugin surfaces

Where ChatGPT Work exposes developer mode and Plugins, enable developer mode in Settings, then register https://legalpolicygenerator.com/mcp in the Plugins interface. Workspace policy and product availability can control access. OAuth opens the same secure account authorization flow.

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

Native account authorization

The MCP endpoint uses native OAuth 2.1 authorization. The client discovers authentication automatically, opens the secure account page, asks for the user's email, verifies the 8-digit one-time code, and stores and refreshes tokens in its own protected credential storage. Never ask the user to create, copy, paste, display, log, or commit a bearer token.

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.

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 entitlement state, exact price, and a direct website purchase link. The link carries a hashed-at-rest, one-use browser handoff valid for one hour. Opening it issues secure session cookies and immediately redirects to the clean review URL, so no session token appears in the URL. Agents recommend the $5 monthly subscription by default and offer the one-time price as an alternative. Active members continue without another payment request. Setting publish and confirm to true creates the immutable hosted document only after validation and entitlement checks succeed.

Protocol and security

Endpoint supports MCP protocol versions 2025-11-25, 2025-06-18, and 2025-03-26 over stateless JSON responses. OAuth 2.1 discovery, exact redirect matching, dynamic client registration, PKCE S256, single-use authorization codes, rotating refresh tokens, hashed credentials, origin checks, body limits, rate limits, UUID ownership, validation, and entitlement checks run on the server. Secrets and questionnaire bodies are excluded from logs.

MCP specification, Codex MCP documentation, and Claude Code MCP documentation define client behavior.

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