home / mcp / us law mcp server
Queries US federal and state statutes for cybersecurity, privacy, and breach notification across all jurisdictions.
Configuration
View docs{
"mcpServers": {
"ansvar-systems-us-law-mcp": {
"url": "https://us-law-mcp.vercel.app/mcp",
"headers": {
"US_LAW_DB_PATH": "data/database.db"
}
}
}
}You can access the US Law MCP Server to query, compare, and analyze US cybersecurity, privacy, and breach notification law across federal and state jurisdictions. It provides a searchable, AI-readable database of statutes and state requirements that you can connect to from Claude, Cursor, or any MCP-compatible client to perform fast, cross-state legal research and compliance checks.
Connect to the MCP server using any MCP client you prefer. You can use the hosted endpoint for quick, zero-setup access or run the server locally to self-host and customize your workflow. Once connected, you can perform full-text searches, retrieve specific provisions, compare breach notification timelines across states, validate citations, and check the currency of statutes in force.
Prerequisites you need before running the MCP server locally:
Clone the repository, install dependencies, build the database, ingest data, and run tests.
git clone https://github.com/Ansvar-Systems/US-law-mcp
cd US-law-mcp
npm install
npm run build:db && npm run ingest:all
npm run buildRun the MCP server in development mode to use the standard I/O based workflow.
npm run dev
# Optional: test with MCP Inspector
npx @anthropic/mcp-inspector node dist/index.jsIf you prefer to use a database path override, you can set the environment variable US_LAW_DB_PATH to point to your SQLite database file.
Data sources include the US Code and state statutes, with automated freshness checks. The server provides a set of tools for search, retrieval, state comparison, and validation. You can connect using HTTP to the hosted endpoint or run a local MCP server via the stdio workflow.
Security scanning is performed through CodeQL, Semgrep, Gitleaks, Trivy, and the OpenSSF Scorecard. Regular checks help ensure code quality and reduce exposure to vulnerabilities.
This tool is a research aid and not legal advice. State law coverage focuses on cybersecurity, privacy, and breach notification. Always verify critical citations against primary sources.
Content is sourced from authoritative publications, including the US Code and state legislative portals. Weekly checks refresh federal data and state amendments to keep the database current.
Development setup and local running steps are described in the project workflow. Follow the commands exactly to build, ingest, and run the MCP server locally.
After connecting, you can ask natural language questions such as: What does a specific statute say? How do breach notification timelines compare between jurisdictions? Which states require encryption of personal information?
The server supports configuration via environment variables. For example, US_LAW_DB_PATH overrides the default database location.
The MCP provides a suite of tools for searching and analyzing statutes and state requirements, including full-text search, provision retrieval, state comparisons, and citation validation.
Performs a full-text search across all federal and state provisions with BM25 ranking to surface relevant results quickly.
Retrieves the text of a specific provision by jurisdiction, law identifier, or section number for precise reference.
Lists all available jurisdictions with document and provision counts to understand coverage.
Compares requirements across states by category and subcategory to support cross-jurisdiction analysis.
Fetches classified requirements for a specific state, such as breach notification timelines, privacy rights, and cybersecurity obligations.
Validates a legal citation against the database to reduce the risk of references to outdated or incorrect provisions.
Checks whether a statute is currently in force, amended, repealed, or superseded.
Aggregates statute search results with state requirements for comprehensive legal research workflows.