
Research
/Security News
Popular npm Packages in the keyv and Cacheable Namespaces Compromised in Active Supply Chain Attack
Popular npm packages keyv and cacheable compromised.
@ansvar/us-law-mcp
Advanced tools
US federal and state cybersecurity/privacy law MCP server with cross-state comparison
The US Code alternative for the AI age.
Query 93 US federal and state statutes across all 50 states + DC + key US territories -- from CFAA and HIPAA to California's CCPA/CPRA, New York's SHIELD Act, and Texas TDPSA -- directly from Claude, Cursor, or any MCP-compatible client.
If you're building legal tech, compliance tools, or doing US cybersecurity/privacy research, this is your verified reference database.
Built by Ansvar Systems -- Stockholm, Sweden
US cybersecurity and privacy law is fragmented across 50+ jurisdictions. Whether you're:
...you shouldn't need to navigate dozens of state legislature websites and manually cross-reference PDFs. Ask Claude. Get the exact provision. Compare across states.
This MCP server makes US cybersecurity, privacy, and breach notification law searchable, comparable, and AI-readable.
Connect directly to the hosted version -- zero dependencies, nothing to install.
Endpoint: https://us-law-mcp.vercel.app/mcp
| Client | How to Connect |
|---|---|
| Claude.ai | Settings > Connectors > Add Integration > paste URL |
| Claude Code | claude mcp add us-law --transport http https://us-law-mcp.vercel.app/mcp |
| Claude Desktop | Add to config (see below) |
| GitHub Copilot | Add to VS Code settings (see below) |
Claude Desktop -- add to claude_desktop_config.json:
{
"mcpServers": {
"us-law": {
"type": "url",
"url": "https://us-law-mcp.vercel.app/mcp"
}
}
}
GitHub Copilot -- add to VS Code settings.json:
{
"github.copilot.chat.mcp.servers": {
"us-law": {
"type": "http",
"url": "https://us-law-mcp.vercel.app/mcp"
}
}
}
npx @ansvar/us-law-mcp
Claude Desktop -- add to claude_desktop_config.json:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"us-law": {
"command": "npx",
"args": ["-y", "@ansvar/us-law-mcp"]
}
}
}
Cursor / VS Code:
{
"mcp.servers": {
"us-law": {
"command": "npx",
"args": ["-y", "@ansvar/us-law-mcp"]
}
}
}
Once connected, just ask naturally:
| Category | Count | Details |
|---|---|---|
| Federal Statutes | 15 laws | CFAA, HIPAA, ECPA, GLBA, COPPA, FISMA, CISA, FTC Act, and more |
| State Statutes | 78 laws | All 50 states + DC + Guam/Puerto Rico/US Virgin Islands: breach notification, privacy, cybersecurity |
| Provisions | 484 sections | Full-text searchable with FTS5 |
| State Requirements | 145 classified | Breach notification, privacy rights, cybersecurity obligations |
| Requirement Categories | 20 types | Timeline, scope, penalties, rights, obligations |
| Jurisdictions | 55 | Federal + 50 states + DC + Guam/Puerto Rico/US Virgin Islands |
| Database Size | ~3 MB | Optimized SQLite, portable |
| Weekly Updates | Automated | Freshness checks against uscode.house.gov |
No LLM-generated statute text -- provisions are fetched from published legal sources and stored verbatim for retrieval/search.
| Tool | Description |
|---|---|
search_legislation | FTS5 search across all federal and state provisions with BM25 ranking |
get_provision | Retrieve specific provision by jurisdiction, law identifier, or section number |
list_sources | List all available jurisdictions with document and provision counts |
compare_requirements | Compare requirements across states by category and subcategory |
get_state_requirements | Get classified requirements for a specific state (breach notification, privacy rights, etc.) |
validate_citation | Validate a legal citation against the database (zero-hallucination check) |
check_currency | Check if a statute is currently in force, amended, repealed, or superseded |
build_legal_stance | Aggregate statute search + state requirements for comprehensive legal research |
The killer feature. compare_requirements lets you instantly compare how different states handle the same legal requirement:
compare_requirements(category: "breach_notification", subcategory: "timeline", jurisdictions: ["US-CA", "US-NY", "US-TX"])
Returns structured data with notification deadlines, scope, and penalties for each state -- the kind of research that normally takes hours of manual cross-referencing.
55 jurisdictions: US Federal + all 50 states + DC + Guam/Puerto Rico/US Virgin Islands
US-FED US-AL US-AK US-AZ US-AR US-CA US-CO US-CT US-DE US-DC US-FL US-GA US-GU US-HI US-ID US-IL US-IN US-IA US-KS US-KY US-LA US-ME US-MD US-MA US-MI US-MN US-MS US-MO US-MT US-NE US-NV US-NH US-NJ US-NM US-NY US-NC US-ND US-OH US-OK US-OR US-PA US-PR US-RI US-SC US-SD US-TN US-TX US-UT US-VT US-VA US-VI US-WA US-WV US-WI US-WY
All content is sourced from authoritative legal publications:
A weekly GitHub Actions workflow monitors US Code release points, refreshes federal data, rebuilds the database, runs tests, and opens a PR when changes are detected.
| Source | Check | Method |
|---|---|---|
| US Code releases | uscode.house.gov release points | Release-link digest change detection |
| Public laws | congress.gov/public-laws | Manual review triggered |
| State amendments | State legislature portals | Periodic manual review |
This project uses multiple layers of automated security scanning:
| Scanner | What It Does | Schedule |
|---|---|---|
| CodeQL | Static analysis for security vulnerabilities | Weekly + PRs |
| Semgrep | SAST scanning (OWASP top 10, secrets, TypeScript) | Every push |
| Gitleaks | Secret detection across git history | Every push |
| Trivy | CVE scanning on filesystem and npm dependencies | Weekly |
| OSSF Scorecard | OpenSSF best practices scoring | Weekly |
See SECURITY.md for the full policy and vulnerability reporting.
THIS TOOL IS NOT LEGAL ADVICE
Statute text is sourced from official/legal publications. However:
- This is a research tool, not a substitute for professional legal counsel
- State law coverage focuses on cybersecurity, privacy, and breach notification -- it does not cover all areas of law
- Verify critical citations against primary sources for court filings
- State laws change frequently -- always confirm currency against official state sources
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
npm test
npm run dev # Start MCP server (stdio)
npx @anthropic/mcp-inspector node dist/index.js # Test with MCP Inspector
| Variable | Default | Description |
|---|---|---|
US_LAW_DB_PATH | data/database.db (relative to dist) | Custom path to the SQLite database file |
npm run fetch:federal # Fetch federal statutes from uscode.house.gov
npm run fetch:states # Fetch state statutes
npm run build:db # Rebuild SQLite database
npm run ingest:all # Ingest all seed data (federal + states + classify)
npm run build:db:free # Build free-tier database (no case law/regulatory guidance)
npm test # Run unit tests
npm run test:contract # Run golden contract tests
npm run validate # Lint + test + contract tests
This server is part of Ansvar's Compliance Suite -- MCP servers that work together for end-to-end compliance coverage:
Query 49 EU regulations directly from Claude -- GDPR, AI Act, DORA, NIS2, MiFID II, eIDAS, and more. Full regulatory text with article-level search. npx @ansvar/eu-regulations-mcp
Query US federal compliance frameworks -- HIPAA, SOX, GLBA, FERPA, and more. npx @ansvar/us-regulations-mcp
Query 717 Swedish statutes directly from Claude -- DSL, BrB, ABL, MB, and more. Full provision text with EU cross-references. npx @ansvar/swedish-law-mcp
Query UNECE R155/R156 and ISO 21434 -- Automotive cybersecurity compliance. npx @ansvar/automotive-cybersecurity-mcp
Offline-capable sanctions screening -- OFAC, EU, UN sanctions lists. pip install ansvar-sanctions-mcp
Contributions welcome! Priority areas:
Apache License 2.0. See LICENSE for details.
We build AI-accelerated compliance and legal research tools. This MCP server started because comparing breach notification requirements across 50 states shouldn't require a week of manual research.
So we're open-sourcing it. Multi-state compliance shouldn't be this hard.
ansvar.eu -- Stockholm, Sweden
Built with care in Stockholm, Sweden
FAQs
US federal and state cybersecurity/privacy law MCP server with cross-state comparison
We found that @ansvar/us-law-mcp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Popular npm packages keyv and cacheable compromised.

Security News
A misconfiguration gave three Anthropic models internet access, and one, believing it was in a simulation, shipped a credential-stealing package to PyPI.

Security News
/Company News
Socket has joined the new Composer and Packagist sponsorship program as a launch sponsor, supporting the team that keeps PHP's package ecosystem secure.