ai-orders-agent
Provides tools for querying the AI Court Orders dataset via OpenAI's function calling (ChatGPT Actions), enabling search, filter, and retrieval operations.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ai-orders-agentsearch orders requiring AI disclosure in California courts"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ai-orders-agent

*The live deployment at ai-orders-agent.vercel.app.*
Agent-facing service for the AI Court Orders dataset — one Vercel project that exposes the same queries four ways:
Chat (
/chat) — a hosted chat UI; ask in plain English, no setup. A funded, rate-limited LLM (OpenRouter DeepSeek by default) answers by calling the dataset tools (see Chat below).MCP (
/api/mcp) — add as a custom connector in Claude Desktop / claude.ai, or any MCP client.OpenAPI (
/openapi.json) — import into a ChatGPT GPT (Actions) or any function-calling LLM.REST/JSON (
/api/*) — call directly from code or the browser.
It is read-only and stateless: it live-fetches the dataset the AI-orders-explorer repo publishes (that repo owns the data pipeline, the human web explorer, and the Claude-Code skill — this one is purely the agent surface) and caches it in memory.
Data source
Set ORDERS_DATA_BASE to where the dataset (explorer_data.json and
bar_opinions.json) is published. Defaults to the live published copy at
https://legalhack.io/data (943 records). See .env.example.
Related MCP server: CourtAPI MCP Server
Endpoints
| full-text search + filters |
| filter without a text query |
| one record · its PDF/links |
| distinct values + counts (honors all search/list filters) |
| summary · state-bar opinions |
| MCP endpoint · OpenAPI spec |
| hosted chat UI · streaming chat backend |
Filters (search/list/facets): judge (title-insensitive), court (alias-aware: sdny/S.D.N.Y./full name),
state, type, consequence, ai_type, applies_to (multi-value), source, jurisdiction,
tag, requires, date_from, date_to, has_pdf, has_link.
requires=<key> matches records whose reqs[key] is set — disclose (~128), certify_if_ai (~106),
verify, prohibited, certify_all, proprietary — answering "which courts require AI disclosure / a
certification?". Because facets honors every filter, facets?field=court&consequence=sanctions_attorney
ranks courts by attorney-sanction count and facets?field=court&requires=disclose ranks them by disclosure
requirements. The compact projection includes summary.
Chat
/chat is a streaming chat UI. The backend (POST /api/chat) runs a bounded
tool-calling loop: an LLM answers questions by calling the same dataset
operations the MCP/REST surfaces use (tool definitions are shared via
lib/tools.ts, so the surfaces never drift). It is read-only — the tools only
search and read the public dataset.
Provider. Default is OpenRouter (CHAT_PROVIDER=openrouter) on a cheap
DeepSeek model. Set CHAT_PROVIDER=anthropic or openai to switch; each reads
its own server-only key. Keys never reach the browser.
Rate limiting. The funded path is protected by three independent limits —
per-IP burst, per-IP daily cap, and a global daily kill-switch — backed by
Upstash Redis. Set UPSTASH_REDIS_REST_URL and
UPSTASH_REDIS_REST_TOKEN for the public deploy. Without Upstash, limiting
falls back to a best-effort in-memory limiter that is not durable across Vercel
invocations — fine for local dev, not safe for a public funded endpoint.
See .env.example for all chat/rate-limit variables.
Run / deploy
npm install
npm run dev # http://localhost:3000 (try /chat, /api/stats, /openapi.json, /api/mcp)
npm test # query-logic parity tests
vercel deploy # or push to a Vercel-connected GitHub repoConnect it
Claude (Desktop or claude.ai): add a custom connector pointing at
https://<your-deploy>/api/mcp.ChatGPT: create a GPT → Actions → import
https://<your-deploy>/openapi.json.Other LLMs / code: call the REST endpoints, or use the OpenAPI spec for function-calling.
Query behavior (court aliasing, title-insensitive judge match, multi-value
applies_to, facet placeholder handling) mirrors the explorer's orders CLI.
License
MIT — see LICENSE.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP Server providing AI agents access to over 3 million US court decisions via CourtListener and EU legislation via EUR-Lex, with tools for searching cases, citations, judges, and court information.Last updated6MIT

CourtAPI MCP Serverofficial
Alicense-qualityCmaintenanceSearch and retrieve US federal court cases, dockets, claims, and documents via PACER — directly from Claude and other MCP-compatible AI assistants.Last updated54MIT- Flicense-qualityDmaintenanceProvides AI assistants with up-to-date legal documents from official sources, enabling accurate legal information retrieval and analysis.Last updated14
- Flicense-qualityDmaintenanceEnables querying and retrieving Italian civil court rulings, decrees, and orders from the Ministry of Justice's database via natural language, using CIE authentication.Last updated
Related MCP Connectors
Connect AI to millions of laws and court cases with the Lawstronaut MCP.
A paid remote MCP for AI SDK data query MCP, built to return verdicts, receipts, usage logs, and aud
MCP for CourtListener: US federal and state opinions, dockets, judges, plus eCFR regulations.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/legalrealist/ai-orders-agent'
If you have feedback or need assistance with the MCP directory API, please join our Discord server