Skip to content

jonashertner/openclimatelaw

Repository files navigation

OpenClimateLaw

A citation-safe MCP server that gives AI assistants grounded access to the world's climate litigation (the Sabin Center's Climate Litigation Database + the Climate Rights Database) and legislation (Climate Change Laws of the World, by Climate Policy Radar) — so they can quote and cite climate cases and laws without fabricating either.

  • Endpoint: https://mcp.openclimatelaw.org/mcp — MCP over Streamable HTTP, no authentication
  • Docs & full connection guide: https://openclimatelaw.org
  • 19 tools · 5,027 cases · 81,345 court documents · 5,347 climate laws · open source (MIT)

Research preview — not yet endorsed by the upstream data sources. Please test freely, but don't promote it as a public service or cite results in production work.

Connect in 30 seconds

Two endpoints, one server, no authentication — both serve the same 19 tools: Streamable HTTP https://mcp.openclimatelaw.org/mcp (claude.ai, ChatGPT developer mode, Gemini CLI, Cursor, the SDKs) and SSE https://mcp.openclimatelaw.org/sse (ChatGPT Deep Research).

claude.ai (Free / Pro / Max / Team / Enterprise) Customize → Connectors → click + → enter a name and the URL https://mcp.openclimatelaw.org/mcpAdd. (Connectors moved from Settings to Customize.)

ChatGPT (developer mode — Plus / Pro / Team / Enterprise) Settings → Apps & ConnectorsAdvanced settings → enable Developer modeCreate a connector with https://mcp.openclimatelaw.org/mcp, Authentication None. (Deep Research flows use the /sse URL instead.)

Gemini — via the Gemini CLI (the consumer app at gemini.google.com can't add custom connectors):

gemini mcp add --transport http openclimatelaw https://mcp.openclimatelaw.org/mcp

Claude Code

claude mcp add openclimatelaw https://mcp.openclimatelaw.org/mcp --transport http

Claude Desktop — add to claude_desktop_config.json (via mcp-remote):

{ "mcpServers": { "openclimatelaw": {
    "command": "npx", "args": ["-y", "mcp-remote", "https://mcp.openclimatelaw.org/mcp"]
} } }

Cursor / Continue / Cline / Zed / VS Code Copilot and any other MCP client: add the URL above as a Streamable-HTTP server. Per-client steps (Anthropic API, OpenAI Agents/Responses SDK, Copilot CLI, Vertex AI): https://openclimatelaw.org.

Then ask your assistant:

"Find Urgenda v. Netherlands, cite it in en/sabin format, and quote one sentence from its summary verbatim — verify the quote first."

What it does

19 tools, citation-safe by contract:

  • Discoverysearch_cases, get_case, find_cases_by_law, get_case_doctrine
  • Verbatim retrieval & pinpointget_document_text, find_relevant_passage, get_passage
  • Legislationsearch_statutes, get_statute
  • Citation graphfind_citations, find_cited_by, find_related_cases
  • Citation safetycite, check_claim_support, attest_response, verify_grounding
  • Aggregatesget_statistics
  • ChatGPT compatibilitysearch, fetch (the read-only contract ChatGPT connectors require)

Anti-hallucination contract

The server enforces, in tool design and in its instructions, that an assistant cannot:

  • Fabricate a citationcite(case_id, lang, format) returns a verbatim citation_string; agents must call it rather than construct citations from training data.
  • Fabricate a quotecheck_claim_support(quote, source_id, source_kind) verifies a quotation appears verbatim in a case_summary, document_text, or citation_string.
  • Smuggle either past reviewattest_response(draft_text, retrieved_ids) scans a draft for citation-shaped strings (US/UK/EU/AU/CA/IE/ZA/IN/CJEU formats) and unverified quotes, and verify_grounding is an LLM judge for fabricated case names and unsupported holdings.

Verifiability over veracity: an unverifiable answer cannot be checked; a verifiable one always can.

Local development

Prerequisites: Docker, uv.

docker compose up -d postgres                    # 1. Postgres + pgvector
uv sync                                          # 2. Python deps
uv run yoyo apply --batch \
    --database "postgresql+psycopg://openclimate:dev@localhost:5432/openclimate" \
    migrations                                   # 3. migrations
uv run pytest -q                                 # 4. tests
docker compose up -d --build && curl http://localhost:8000/health   # 5. run server + DB

Data sources & licence

Centred on the Sabin Center's Climate Litigation Database (CC-BY 4.0), with metadata references to the Climate Rights Database and a legislation layer from Climate Policy Radar's Climate Change Laws of the World (CC-BY). Every citation_string carries upstream attribution. Server code: MIT.

See docs/ for the design specs, demo materials, and the data-quality reports shared with the upstream sources.

About

Public MCP server for climate litigation and law

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors