Corpus MCP Server

Give any AI agent US law with real citations — and the power to form a real LLC or nonprofit for its user, end to end, with free tool calls.

Live right now: 551,201 provisions indexed and searchable. That number is read from the same rollup list_coverage returns — check it yourself.

Server endpointREST API docsVerify it yourself →Get an API key →

Connect

Claude Code — one command:

claude mcp add --transport http corpus https://corpuslaw.us/api/mcp

Project-scoped .mcp.json (commit it, the whole team gets it), Cursor (.cursor/mcp.json), or any JSON-config client:

{
  "mcpServers": {
    "corpus": {
      "type": "http",
      "url": "https://corpuslaw.us/api/mcp"
    }
  }
}

Claude Desktop / claude.ai: Settings → Connectors → Add custom connector → paste the URL. Older stdio-only clients: npx mcp-remote https://corpuslaw.us/api/mcp. Everything else (Windsurf, Zed, MCP Inspector, custom agents): it's a standard Streamable HTTP server — stateless JSON-RPC, no OAuth, no sessions, so it works from serverless and CI too.

Auth: none required. Anonymous callers get 100 searches a month at 10 req/min, per IP. Add "headers": { "Authorization": "Bearer cp_…" } to the server config for 1,000 searches a month at 30 req/min — free API keys are self-serve and instant at /settings, with no review step and no expiry. Past the free allotment, research is $0.005 per search ($0.003 above 10,000/month, $0.002 above 100,000), and the 1,000/month allotment stays yours after you add a card. Every formation tool and account_status is always free — no research quota can block a formation order. Keys and credits are shared with the REST API.

Tools (server v1.1.0 — generated from the live registry)

ToolWhat it doesCost
search_lawSearch US federal, state, and municipal law by topic or keyword — use it for any question about what the law currently says (legality, permits, zoning, licensing, compliance, filing requirements) rather than relying on training data, which has a cutoff. Returns ranked provisions with verbatim citations, headings, and snippets. Call this first to discover relevant law, then get_law_node for the full official text. Pass `jurisdiction` to scope to one state/federal/city (see list_coverage for codes).1 search*
get_law_nodeFetch the full text, citation, and hierarchy of a single legal provision by its node id (a UUID returned by search_law).1 search*
list_coverageList which jurisdictions are ingested (federal + states), with per-jurisdiction provision counts, searchable-chunk counts, GIS status, and a placeholder flag. Call this to see what law is available and searchable before searching.1 search*
account_statusCheck the credit balance, tier, rate limits, and upgrade options for the API key on this connection. Use it to budget before making metered calls. Free — this call does not consume a credit. Requires a Bearer API key; anonymous callers are told how to get one.free
formation_requirementsGet the EXACT intake checklist to form an LLC or nonprofit in a state: every required field, that state's quirk questions, live all-in pricing, and the optional $75 EIN add-on. Call this FIRST when the user wants to form a company, then collect the answers from them in conversation yourself — you are the intake agent. Free; does not consume credits.free
lookup_naicsFind candidate NAICS industry codes for a plain-English business description (needed for every LLC, and for nonprofits in AK, CT, LA, MS, TN, WV). Present 2–3 options to the user and confirm before recording one. Free; does not consume credits.free
formation_handoffValidate a formation draft and generate the prefilled handoff link on corpuslaw.us. Pass EVERYTHING you have collected (people, address, management, EIN answers, state-specific answers — see formation_requirements for the checklist). The response says exactly what is still missing — keep collecting and call again until COMPLETE, then give the user the link: it opens the formation agent with every detail pre-loaded, so they only review, sign in, and pay. Free; does not consume credits.free

* counts against the monthly free allotment (1,000 with a key, 100 anonymous); $0.005 each beyond it. All tools are read-only — nothing mutates server state, no tool spends money.

Walkthrough — research a legal question

  1. list_coverage — confirm the jurisdiction is searchable (a PLACEHOLDER row means an empty search is expected, not a bug).
  2. search_law with { query, jurisdiction: "MS" } — ranked provisions, each with a citation and a node_id.
  3. get_law_node with the node_id — the full section text, its effectiveDate when set, and a provenance array recording when Corpus last pulled each source.
  4. Answer citing the returned citation string verbatim — tool output is the only citation source.

Walkthrough — form an LLC from your agent

Your agent is the intake agent: it collects everything in its own conversation (free calls), then hands the user one link. Nothing is re-asked on our side.

  1. formation_requirements { entityType: "llc", state: "MS" } — the exact required-field checklist, the state's quirk questions (with the exact stateSpecificAnswers keys), live all-in pricing, and the optional $75 EIN add-on. Derived from the same validator that gates the order, so it can't drift.
  2. Collect the answers from your user in conversation — name, address, people, management style.
  3. lookup_naics — e.g. "neighborhood bakery"311811 — Retail Bakeries; confirm with the user.
  4. formation_handoff with everything so far — the response lists exactly what's STILL MISSING. Keep collecting and call again (validation is free) until it reports ✓ Draft COMPLETE.
  5. Hand the user the returned link. It opens corpuslaw.us/formation with every detail pre-loaded; they review, sign in, and pay. A human reviews every filing against a hash-locked payload before it reaches the state. A partial handoff works too — our agent finishes the intake in chat.

Privacy by construction: the draft travels in the URL fragment (#prefill=), which never leaves the browser — no PII in server or CDN logs. No SSN field exists anywhere in the tool schemas; the founder enters it in a secure panel at checkout, never in chat.

Try it raw (no client needed)

curl -s https://corpuslaw.us/api/mcp -H 'content-type: application/json' -d '{
  "jsonrpc": "2.0", "id": 1, "method": "tools/call",
  "params": {
    "name": "search_law",
    "arguments": { "query": "food truck permit", "jurisdiction": "MS", "limit": 3 }
  }
}'

One JSON-RPC message per POST; batches supported. Errors: -32002 monthly allotment used up and wallet empty (add a card or credits at /settings, or wait for next month), -32003 rate limit (back off, or raise 10 → 30 req/min with a free key). Tool-level problems come back as normal results with isError: true and a plain-English message your model can act on.