- Home
- MCP servers
- US Law
US Law
- javascript
0
GitHub Stars
javascript
Language
3 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
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.
How to use
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.
How to install
Prerequisites you need before running the MCP server locally:
- Node.js and npm installed on your machine
- A working internet connection for dependencies and data ingestion
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 build
Run 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.js
If 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.
Additional configuration and notes
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 and reliability
Security scanning is performed through CodeQL, Semgrep, Gitleaks, Trivy, and the OpenSSF Scorecard. Regular checks help ensure code quality and reduce exposure to vulnerabilities.
Important disclaimers
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.
Data sources & freshness
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
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.
Example usage patterns
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?
Environment variables
The server supports configuration via environment variables. For example, US_LAW_DB_PATH overrides the default database location.
What’s included and tools
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.
Available tools
search_legislation
Performs a full-text search across all federal and state provisions with BM25 ranking to surface relevant results quickly.
get_provision
Retrieves the text of a specific provision by jurisdiction, law identifier, or section number for precise reference.
list_sources
Lists all available jurisdictions with document and provision counts to understand coverage.
compare_requirements
Compares requirements across states by category and subcategory to support cross-jurisdiction analysis.
get_state_requirements
Fetches classified requirements for a specific state, such as breach notification timelines, privacy rights, and cybersecurity obligations.
validate_citation
Validates a legal citation against the database to reduce the risk of references to outdated or incorrect provisions.
check_currency
Checks whether a statute is currently in force, amended, repealed, or superseded.
build_legal_stance
Aggregates statute search results with state requirements for comprehensive legal research workflows.