
Security News
White House Authorizes Private Companies to Conduct Offensive Cyber Operations
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.
@ansvar/mexican-law-mcp
Advanced tools
Mexican federal law database covering data protection (LFPDPPP), fintech, cybercrime, commercial law, and consumer protection with Spanish full-text search
The Camara de Diputados alternative for the AI age.
Query 185 Mexican federal statutes -- from the Constitucion and LFPDPPP to the Ley Fintech, Codigo Penal Federal, and more -- directly from Claude, Cursor, or any MCP-compatible client.
If you're building legal tech, compliance tools, or doing Mexican legal research, this is your verified reference database.
Built by Ansvar Systems -- Stockholm, Sweden
Mexican legal research is scattered across diputados.gob.mx, the Diario Oficial de la Federacion, ordenjuridico.gob.mx, and dozens of state-level sites. Whether you're:
...you shouldn't need 47 browser tabs and manual PDF cross-referencing. Ask Claude. Get the exact provision. With context.
This MCP server makes Mexican law searchable, cross-referenceable, and AI-readable.
Connect directly to the hosted version -- zero dependencies, nothing to install.
Endpoint: https://mexican-law-mcp.vercel.app/mcp
| Client | How to Connect |
|---|---|
| Claude.ai | Settings > Connectors > Add Integration > paste URL |
| Claude Code | claude mcp add mexican-law --transport http https://mexican-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": {
"mexican-law": {
"type": "url",
"url": "https://mexican-law-mcp.vercel.app/mcp"
}
}
}
GitHub Copilot -- add to VS Code settings.json:
{
"github.copilot.chat.mcp.servers": {
"mexican-law": {
"type": "http",
"url": "https://mexican-law-mcp.vercel.app/mcp"
}
}
}
npx @ansvar/mexican-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": {
"mexican-law": {
"command": "npx",
"args": ["-y", "@ansvar/mexican-law-mcp"]
}
}
}
Cursor / VS Code:
{
"mcp.servers": {
"mexican-law": {
"command": "npx",
"args": ["-y", "@ansvar/mexican-law-mcp"]
}
}
}
Once connected, just ask naturally:
| Category | Count | Details |
|---|---|---|
| Constitution | 1 | Constitucion Politica de los Estados Unidos Mexicanos |
| Federal Codes | 9 | Civil, Commercial, Criminal, Tax, Procedure, Military Justice |
| Federal Laws | 116 | Data protection, fintech, telecom, labor, competition, etc. |
| General Laws | 43 | Health, education, environment, transparency, anti-corruption |
| Organic Laws | 9 | Judiciary, Congress, Public Administration, Attorney General |
| Regulatory Laws | 6 | Agrarian, mining, nuclear energy, professional practice |
| Other | 1 | Statutes |
| Total Statutes | 185 | Comprehensive Mexican federal legislation |
| Provisions | 583 | Full-text searchable with FTS5 (unicode61 for Spanish) |
| Definitions | 56 | Legal term definitions extracted from statutes |
| Database Size | ~0.7 MB | Optimized SQLite, portable |
Verified data only -- every citation is validated against official sources (diputados.gob.mx). Zero LLM-generated content.
| Tool | Description |
|---|---|
search_legislation | FTS5 search on 583 provisions with BM25 ranking |
get_provision | Retrieve specific provision by law + article number |
list_laws | List all 185 statutes with metadata |
get_preparatory_works | Get linked reform history for a statute |
validate_citation | Validate citation against database (zero-hallucination check) |
build_legal_stance | Aggregate citations from multiple statutes |
format_citation | Format citations per Mexican conventions (DOF reference) |
check_currency | Check if statute is in force, amended, or repealed |
All content is sourced from authoritative Mexican legal databases:
A daily GitHub Actions workflow monitors data sources for reforms published in the Diario Oficial de la Federacion.
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 | Daily |
| Socket.dev | Supply chain attack detection | PRs |
| Dependabot | Automated dependency updates | Weekly |
See SECURITY.md for the full policy and vulnerability reporting.
THIS TOOL IS NOT LEGAL ADVICE
Statute text is sourced from official Camara de Diputados publications. However:
- This is a research tool, not a substitute for professional legal counsel
- Verify critical citations against primary sources (DOF, diputados.gob.mx) for court filings
- Mexican law is complex -- federal vs. state jurisdiction matters
- Reforms may have transitional provisions not fully captured
Before using professionally, read: DISCLAIMER.md | PRIVACY.md
Queries go through the Claude API. For privileged or confidential matters, use on-premise deployment. See PRIVACY.md for guidance.
git clone https://github.com/Ansvar-Systems/mexican-law-mcp
cd mexican-law-mcp
npm install
npm run build
npm test
npm run dev # Start MCP server
npx @anthropic/mcp-inspector node dist/index.js # Test with MCP Inspector
npm run census # Enumerate all federal laws
npm run ingest # Full corpus ingestion from census
npm run ingest -- --resume # Resume interrupted ingestion
npm run ingest -- --limit 5 # Test with 5 laws
npm run ingest -- --skip-fetch # Reuse cached HTML
npm run build:db # Rebuild SQLite database
npm run check-updates # Check for amendments
census.ts -> data/census.json (185 laws)
|
ingest.ts -> data/seed/*.json (per-law provision JSON)
|
build-db.ts -> data/database.db (SQLite + FTS5)
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. npx @ansvar/eu-regulations-mcp
Query US federal and state compliance laws -- HIPAA, CCPA, SOX, GLBA, FERPA, and more. npx @ansvar/us-regulations-mcp
Query 2,415 Swedish statutes directly from Claude -- with EU cross-references. npx @ansvar/swedish-law-mcp
Query Canadian federal legislation -- consolidated Acts from Justice Laws Website. npx @ansvar/canadian-law-mcp
Contributions welcome! See CONTRIBUTING.md for guidelines.
Priority areas:
If you use this MCP server in academic research:
@software{mexican_law_mcp_2026,
author = {Ansvar Systems AB},
title = {Mexican Law MCP Server: Federal Legislation Research Tool},
year = {2026},
url = {https://github.com/Ansvar-Systems/mexican-law-mcp},
note = {185 Mexican federal statutes with Spanish full-text search}
}
Apache License 2.0. See LICENSE for details.
We build AI-accelerated compliance and legal research tools. This MCP server makes Mexican federal law searchable, cross-referenceable, and AI-readable.
ansvar.eu -- Stockholm, Sweden
Built with care in Stockholm, Sweden
FAQs
Mexican federal law database covering data protection (LFPDPPP), fintech, cybercrime, commercial law, and consumer protection with Spanish full-text search
The npm package @ansvar/mexican-law-mcp receives a total of 72 weekly downloads. As such, @ansvar/mexican-law-mcp popularity was classified as not popular.
We found that @ansvar/mexican-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.

Security News
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.

Research
/Security News
The campaign amassed more than 75,000 installs by targeting Russian-speaking users seeking access to blocked services.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.