MCP · Claude Code · Cursor

Track AI laws inside Claude Code and Cursor with MCP

AI Law Tracker ships a remote MCP server over Streamable HTTP. Point Claude Code or Cursor at one URL and your assistant can search real AI-regulation records, pull compliance deadlines, and cite the official source URL — instead of guessing at statutes from training data.

Published · AI Law Tracker Editorial Team

Get a free keyAPI docs

What the connector actually exposes

The MCP server is a thin, read-oriented shell over the same versioned /v1 API the rest of these guides use. Every tool maps one-to-one onto a real endpoint, and all tier gating, quota and data-quality rules stay server-side — the connector only carries your key through and hands the JSON back.

The server is stateless and tools-only: it advertises the tools capability and nothing else. There are no resources and no prompts, so a client that asks for them gets an empty list rather than a surprise.

  • Endpoint: https://ai-law-tracker.com/mcp (the legacy alias https://ai-law-tracker.com/api/mcp stays live forever).
  • Transport: Streamable HTTP, one JSON-RPC 2.0 message per POST. The server never opens a server-initiated SSE stream — a GET returns 405 by design.
  • Server name: ai-law-tracker. Latest protocol version spoken: 2025-11-25 (2025-06-18, 2025-03-26 and 2024-11-05 are also accepted).
  • Auth: optional. No key = the anonymous tier. Add your key as the X-API-Key header (or Authorization: Bearer <key>) to move onto your own tier.
  • Discovery: the server card is published at /.well-known/mcp/server-card.json and /mcp/server-card.

Step 1 — grab a free key (optional, but do it)

The connector works with no key at all: an anonymous caller gets a real, low-quota tier rather than a 401. That is fine for a first look, but the anonymous list cap is 5 records with a trimmed field set, and the MCP endpoint additionally rate-limits unauthenticated traffic per IP.

A free key raises you to 60 requests/minute and 2,000 requests/day, and — this is the part that matters — returns the COMPLETE record envelope (summary, source, dates, in_force) with up to 25 rows per page. Filters and sorting are honoured at every tier.

Terminal — mint a free key by email
curl -X POST "https://ai-law-tracker.com/api/v1/keys" \
  -H "Content-Type: application/json" \
  -d '{"email":"you@company.com"}'
Example response (201) — the key is shown once
{
  "api_version": "v1",
  "key": "alt_free_9f3c…",
  "key_prefix": "alt_free_9f3c",
  "tier": "free",
  "email": "you@company.com",
  "note": "Copy your key now — it is shown once on this screen. We also emailed it to you…",
  "docs": "https://ai-law-tracker.com/developers"
}
The plaintext key is returned once and emailed once. It is never recoverable afterwards — store it in your secret manager before you close the terminal. You can also use the form on /developers, or ask the assistant to call the create_free_key tool.

Step 2 — add it to Claude Code

The one-liner registers the remote server for your user scope and attaches the key header. Swap the placeholder for your real key.

Terminal — Claude Code CLI
claude mcp add --transport http ai-law-tracker https://ai-law-tracker.com/mcp \
  --header "X-API-Key: alt_free_your_key_here"
Alternative — commit a project-scoped .mcp.json
{
  "mcpServers": {
    "ai-law-tracker": {
      "type": "http",
      "url": "https://ai-law-tracker.com/mcp",
      "headers": {
        "X-API-Key": "alt_free_your_key_here"
      }
    }
  }
}
If you commit .mcp.json to a shared repo, put the key in an environment variable your team already manages rather than in the file. The server treats a missing key as anonymous, so a teammate without the secret still gets working (if smaller) results instead of a hard failure.

Step 3 — add it to Cursor

Cursor reads ~/.cursor/mcp.json for a global server and .cursor/mcp.json inside a project for a repo-scoped one. The remote-server block is the same shape in both.

~/.cursor/mcp.json (or .cursor/mcp.json in the project)
{
  "mcpServers": {
    "ai-law-tracker": {
      "url": "https://ai-law-tracker.com/mcp",
      "headers": {
        "X-API-Key": "alt_free_your_key_here"
      }
    }
  }
}

Step 4 — verify the connection without leaving the terminal

The server is stateless, so tools/list answers on its own without a prior handshake. That makes a one-line curl the fastest way to prove the URL and the key are both right before you blame the editor.

Terminal — list the tools
curl -s "https://ai-law-tracker.com/mcp" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: alt_free_your_key_here" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
Terminal — call one tool end to end
curl -s "https://ai-law-tracker.com/mcp" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: alt_free_your_key_here" \
  -d '{
    "jsonrpc": "2.0",
    "id": 2,
    "method": "tools/call",
    "params": {
      "name": "search_ai_laws",
      "arguments": { "q": "facial recognition", "limit": 5 }
    }
  }'
Example tool result (shape)
{
  "jsonrpc": "2.0",
  "id": 2,
  "result": {
    "content": [
      { "type": "text", "text": "{ \"api_version\": \"v1\", \"query\": \"facial recognition\", \"data\": [ … ], \"meta\": { … } }" }
    ]
  }
}
Tool results are the /v1 JSON verbatim, inside a text block. On a non-2xx the result carries isError: true, so a 403 upgrade hint or a 400 validation message reaches the model as a problem rather than as data.

Step 5 — prompts that actually use the data

MCP tools only help if the model reaches for them. These phrasings reliably route to the right tool because they name the thing the tool returns.

  • “Search AI Law Tracker for state laws about automated hiring decisions and give me each one’s official_url.” → search_ai_laws
  • “List the upcoming AI compliance deadlines for California and quote the raw source text for each.” → get_ai_deadlines
  • “What jurisdictions does AI Law Tracker cover, with record counts?” → list_jurisdictions / list_us_states / list_countries
  • “Pull the source links behind record <id> and tell me which are primary .gov sources.” → get_law_sources
  • “Show me the change timeline for this record.” → get_law_history (Developer tier and above)

What the connector will not do

  • It is not legal advice. Every tool description says so, and the server instructions tell the model to verify against each record’s official_url.
  • It does not invent records. When a tier cannot see a paid surface, the tool returns the real 403 body with its upgrade hint rather than a fabricated answer — get_law_history, list_recent_changes and list_law_feed are Developer-and-above; get_ai_obligations and assess_ai_compliance are Pro-and-above.
  • It never negotiates OAuth. There is deliberately no OAuth metadata: an anonymous caller gets a real low-quota tier, so the server never returns 401 and never triggers a discovery dance.

The tools, and the endpoint behind each

Every tool is a thin proxy onto a real /v1 endpoint — tier gating, quota and data quality stay server-side.

search_ai_lawsGET /v1/searchFull-text search over title + summary. `q` required.
list_ai_lawsGET /v1/lawsBrowse with scope, jurisdiction, status, in_force, updated_since, sort, pagination.
get_ai_lawGET /v1/laws/{id}One record by uuid.
get_law_sourcesGET /v1/laws/{id}/sourcesTiered primary/secondary source URLs behind a record.
get_law_citationsGET /v1/laws/{id}/citationsIdentifier, audited alternate names, suggested citation.
get_law_historyGET /v1/laws/{id}/historyPer-record change timeline. Developer+.
list_recent_changesGET /v1/changesUnified changelog; poll with `since`. Developer+.
list_law_feedGET /v1/feedLean stream of significant changes. Developer+.
list_ai_law_newsGET /v1/newsHeadline + excerpt + publisher + source URL.
get_ai_deadlinesGET /v1/deadlinesEffective / compliance date calendar. Free at every tier.
list_jurisdictionsGET /v1/jurisdictionsEvery covered jurisdiction with record counts.
list_us_statesGET /v1/statesUS state jurisdictions with counts.
list_countriesGET /v1/countriesNational (global-scope) jurisdictions with counts.
list_categoriesGET /v1/categoriesrecord_type + scope facet distributions.
list_sectorsGET /v1/sectorsValid sector slugs for the interpreted layer.
get_sector_detailGET /v1/sectors/{sector}One sector: overview plus derived obligations and penalties.
list_billsGET /v1/billsCurated landmark-bill index.
get_billGET /v1/bills/{slug}One landmark bill: sources, citations, cross-links.
get_ai_obligationsGET /v1/obligationsDerived duties for a jurisdiction/sector. Pro+ for the full list.
get_ai_penaltiesGET /v1/penaltiesPenalty and enforcement dataset. Developer+ for the full list.
assess_ai_compliancePOST /v1/assessProfile → applicable obligations + a reproducible 1–10 risk score. Pro+.
generate_compliance_reportPOST /v1/reportThe source-grounded compliance PDF. Pro+.
get_api_statusGET /v1/healthLiveness + backend status.
create_free_keyPOST /v1/keysMint a free-tier key by email, from inside the assistant.
start_checkoutPOST /v1/checkoutHosted checkout link for a paid plan.

FAQ

Do I need an API key to use the MCP server?

No. Without a key you get the anonymous tier — real data, low quotas, a 5-record list cap and a trimmed field set. A free key raises you to 60 req/min, 2,000 req/day, the full record envelope and a 25-record page. Paid tiers unlock the change feed, per-record history, webhooks and the interpreted obligations layer.

Which URL do I configure, /mcp or /api/mcp?

Use https://ai-law-tracker.com/mcp. It is the canonical short path that connector UIs and directories expect. https://ai-law-tracker.com/api/mcp is the original route and keeps working forever — both share one implementation, so they cannot diverge.

Does the server support SSE or session state?

No. It is stateless Streamable HTTP: one JSON-RPC message per POST, one JSON body back. A GET returns 405 with an explicit message, because the server never pushes server-initiated messages. JSON-RPC batching is also rejected — send one message per request.

Can the assistant hallucinate a law through this connector?

The connector cannot fabricate records: every tool result is the /v1 JSON verbatim, and gated responses come back as real 403 bodies flagged with isError. What a model does with that JSON is still a model behaviour question — the guide on grounding an agent covers the citation discipline that keeps answers anchored to official_url.

Keep going

🗺️ Fetch a state’s AI laws with the API📡 Catch effective-date changes with webhooks🗓️ Build an AI compliance deadline calendar Ground an AI agent in real AI-law data📦 The dataset →🗓️ AI law deadlines →💳 Plans & limits →

Data by AI Law Tracker, licensed CC BY 4.0 — attribution required: “Data by AI Law Tracker (CC BY 4.0) — https://ai-law-tracker.com”. AI Law Tracker provides informational data, not legal advice. Verify every record against its official source before relying on it.