Lawstronaut MCP
Connect lawstronaut to Claude, ChatGPT, Cursor, and any AI agent that speaks the Model Context Protocol. Connect your AI to 50+ million laws and court cases!
Authentication . Setup · Tools
What is this?
Lawstronaut is the infrastructure layer that connects AI agents and software to millions of legal documents across 150+ jurisdictions, structured legal data, continuously updated, and ready to use via MCP.
Authentication
Production MCP server: https://mcp.lawstronaut.com
Transport: MCP over Streamable HTTP (POST /).
Public server card (tool listing, no auth):
https://mcp.lawstronaut.com/.well-known/mcp/server-card.json
Lawstronaut MCP supports Bearer token and OAuth 2.0 (client_id + client_secret). A paid subscription is required.
Get client ID, secret, or bearer token
- Visit lawstronaut.com and purchase a subscription.
- Log in to the developer portal.
- Open MCP server access from the Home menu.
- Create a client ID + client secret (OAuth) or a bearer token.
Option A — Bearer token
Use the bearer token from MCP server access:
Authorization: Bearer <your-token>
Set it in your environment:
export LAWSTRONAUT_MCP_BEARER_TOKEN="your-token-here"
Example configs: cursor-mcp.json, vscode-mcp.json, claude-code.mcp.json.
Option B — OAuth 2.0 (client_id + client_secret)
Use the client_id and client_secret created under MCP server access in the developer portal.
Flow: response_type=code → redirect with code → exchange at /oauth/token with grant_type=authorization_code, client_id, client_secret, code, and redirect_uri.
Clients that support MCP OAuth discovery only need the server URL — they handle the flow using your registered client_id / client_secret.
Example configs: cursor-mcp-oauth.json, vscode-mcp-oauth.json.
Setup
Pick your client, paste the config, and authenticate with your lawstronaut account. Most clients open a browser window for OAuth the first time an agent uses a lawstronaut tools.
Cursor
Bearer token
- Copy
cursor-mcp.jsonto.cursor/mcp.json(project) or~/.cursor/mcp.json(global). - Export
LAWSTRONAUT_MCP_BEARER_TOKEN. - Restart Cursor. Check Output → MCP Logs if connection fails.
OAuth
- Copy
cursor-mcp-oauth.jsonto.cursor/mcp.json. - Complete the OAuth sign-in when Cursor prompts you (uses your registered
client_id/client_secret).
Docs: Cursor MCP.
VS Code (GitHub Copilot agent / MCP)
Bearer token
- Copy
vscode-mcp.jsonto.vscode/mcp.json, or merge into your user MCP config. - Run MCP: List Servers and enter your bearer token when prompted.
OAuth
- Copy
vscode-mcp-oauth.jsonto.vscode/mcp.json. - Sign in through VS Code when prompted.
Docs: MCP configuration reference.
Claude Code (CLI)
Bearer token — CLI
export LAWSTRONAUT_MCP_BEARER_TOKEN="your-token-here"
claude mcp add --transport http lawstronaut-mcp https://mcp.lawstronaut.com \
--header "Authorization: Bearer $LAWSTRONAUT_MCP_BEARER_TOKEN"
Bearer token — project file
Copy claude-code.mcp.json to .mcp.json in your project root.
OAuth
Add the server URL only and complete OAuth when prompted:
claude mcp add --transport http lawstronaut-mcp https://mcp.lawstronaut.com
Docs: Connect Claude Code to tools via MCP.
Claude Desktop (Anthropic app)
Claude Desktop is oriented toward stdio MCP servers. For this HTTP server, use Cursor, VS Code, or Claude Code, or any host that supports remote Streamable HTTP MCP.
Go to Customize, Connectors, click "+", Add Custom Connector, and fill the dialog:
Other hosts (Continue, Zed, custom agents, etc.)
Any client that supports MCP Streamable HTTP can connect with:
- URL:
https://mcp.lawstronaut.com - Bearer:
Authorization: Bearer <token> - OAuth: use discovery at
/.well-known/oauth-authorization-serverwith yourclient_id/client_secret
Tools
-
list_jurisdictions - List all jurisdictions (countries/states) in the Lawstronaut corpus — call first to get valid ISO codes for other tools
-
list_domains - List legal domains with optional name filter and pagination
domain: Filter domains by name (string, optional)limit: Number of results to return (number, optional)offset: Number of results to skip (number, optional)
-
list_subdomains - List subdomains for a domain ID — filter by name, paginate results
domain_id: Filter by Domain ID (string, required)subdomain: Filter subdomains by name (string, optional)limit: Number of results to return (number, optional)offset: Number of results to skip (number, optional)
-
list_categories - List legal categories for a subdomain — filter by name, paginate results
subdomain_id: Filter by Subdomain ID (string, optional)category_name: Filter categories by name (string, optional)limit: Number of results to return (number, optional)offset: Number of results to skip (number, optional)
-
list_subcategories - List subcategories for a category ID — filter by name, paginate results
category_id: Filter by Category ID (string, required)subcategory_name: Filter subcategories by name (string, optional)limit: Number of results to return (number, optional)offset: Number of results to skip (number, optional)
-
list_law_types - List law types for a subcategory ID — filter by name, paginate results
subcategory_id: Filter by Subcategory ID (string, required)law_type: Filter law types by name (string, optional)limit: Number of results to return (number, optional)offset: Number of results to skip (number, optional)
-
list_portals - List legal portals for a jurisdiction — filter by name, language, or tag
iso: Filter by Jurisdiction ISO code (e.g. 'US') (string, required)
All tools are read-only. OAuth tokens are issued with scope mcp:tools:read. Tool listing is public; tool calls require authentication.