Mexican legislation via MCP — full-text search across statutes and provisions
Mexican legislation via MCP — full-text search across statutes and provisions
Valid MCP server (2 strong, 2 medium validity signals). 1 known CVE in dependencies (0 critical, 1 high severity) Package registry verified. Imported from the Official MCP Registry. Trust signals: trusted author (138/139 approved).
4 files analyzed · 2 issues found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
This plugin requests these system permissions. Most are normal for its category.
Add this to your MCP configuration file:
{
"mcpServers": {
"eu-ansvar-mexican-law-mcp": {
"args": [
"-y",
"@ansvar/mexican-law-mcp"
],
"command": "npx"
}
}
}From the project's GitHub README.
The DOF (Diario Oficial de la Federación) alternative for the AI age.
Consulte 317 leyes federales mexicanas -- desde la LFPDPPP (Ley Federal de Protección de Datos Personales en Posesión de los Particulares) y el Código Penal Federal hasta el Código Civil Federal, la Ley Federal del Trabajo, y más -- directamente desde Claude, Cursor o cualquier cliente compatible con MCP.
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
La investigación jurídica federal mexicana está dispersa entre dof.gob.mx, diputados.gob.mx, ordenjuridico.gob.mx, y las publicaciones de la Cámara de Diputados. Ya sea que usted sea:
...no debería necesitar docenas de pestañas en el navegador y búsqueda manual de PDFs. Pregúntele a Claude. Obtenga la disposición exacta. Con contexto.
Este servidor MCP hace que el derecho mexicano sea consultable, referenciable y legible por IA.
Connect directly to the hosted version -- zero dependencies, nothing to install.
Endpoint: https://mcp.ansvar.eu/law-mx/mcp
| Client | How to Connect |
|---|---|
| Claude.ai | Settings > Connectors > Add Integration > paste URL |
| Claude Code | claude mcp add mexican-law --transport http https://mcp.ansvar.eu/law-mx/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://mcp.ansvar.eu/law-mx/mcp"
}
}
}
GitHub Copilot -- add to VS Code settings.json:
{
"github.copilot.chat.mcp.servers": {
"mexican-law": {
"type": "http",
"url": "https://mcp.ansvar.eu/law-mx/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"]
}
}
}
Una vez conectado, pregunte naturalmente:
| Category | Count | Details |
|---|---|---|
| Federal Laws | 317 laws | Comprehensive Mexican federal legislation |
| Provisions | 45,179 sections | Full-text searchable with FTS5 |
| Agency Guidance | 73,287 documents | INAI, COFECE, CNBV regulatory guidance |
| Database Size | ~0.7 MB | Optimized SQLite, portable |
| Language | Spanish | Official language of Mexican federal law |
| Freshness Checks | Automated | Drift detection against DOF and Cámara de Diputados |
| Law | Description |
|---|---|
| LFPDPPP | Ley Federal de Protección de Datos Personales en Posesión de los Particulares |
| Código Penal Federal | Federal Criminal Code |
| Código Civil Federal | Federal Civil Code |
| Ley Federal del Trabajo (LFT) | Federal Labour Law |
| LFPC (Ley Federal de Protección al Consumidor) | Federal Consumer Protection Law |
| Ley FinTech (Ley para Regular las ITF) | Financial Technology Law |
| Ley Federal de Telecomunicaciones y Radiodifusión (LFTR) | Telecommunications Law |
| Ley General de Protección de Datos Personales en Posesión de Sujetos Obligados | Public sector data protection |
Verified data only -- every citation is validated against official sources (dof.gob.mx, diputados.gob.mx). Zero LLM-generated content.
Verbatim Source Text (No LLM Processing):
Smart Context Management:
Technical Architecture:
DOF / Cámara de Diputados --> Parse --> SQLite --> FTS5 snippet() --> MCP response
^ ^
Provision parser Verbatim database query
| Enfoque Tradicional | Este Servidor MCP |
|---|---|
| Buscar en dof.gob.mx por nombre de ley | Buscar en español: "protección datos personales consentimiento" |
| Navegar manualmente en códigos de varios artículos | Obtener la disposición exacta con contexto |
| Referencias cruzadas manuales entre leyes | build_legal_stance agrega de múltiples fuentes |
| "¿Esta ley sigue en vigor?" -- verificar manualmente | Herramienta check_currency -- respuesta en segundos |
| Comparar con estándares OCDE -- buscar manualmente | get_eu_basis -- marcos internacionales vinculados al instante |
| Sin API, sin integración | Protocolo MCP -- nativo para IA |
Tradicional: Buscar en diputados.gob.mx --> Descargar PDF --> Ctrl+F en español --> Referencias cruzadas con otra ley --> Verificar lineamientos del INAI --> Repetir
Este MCP: "¿Cuáles son las bases legales para el tratamiento de datos personales bajo la LFPDPPP y cómo se comparan con los estándares de la OCDE?" --> Listo.
| Tool | Description |
|---|---|
search_legislation | FTS5 full-text search across 45,179 provisions with BM25 ranking. Supports Spanish full-text queries |
get_provision | Retrieve specific provision by law name + article number |
check_currency | Check if a law is in force, amended, or repealed |
validate_citation | Validate citation against database -- zero-hallucination check |
build_legal_stance | Aggregate citations from multiple laws for a legal topic |
format_citation | Format citations per Mexican conventions (full/short/pinpoint) |
list_sources | List all available laws with metadata, coverage scope, and data provenance |
about | Server info, capabilities, dataset statistics, and coverage summary |
| Tool | Description |
|---|---|
get_eu_basis | Get international frameworks (USMCA, OECD, OAS) that a Mexican law aligns with |
get_mexican_implementations | Find Mexican laws implementing a specific international instrument |
search_eu_implementations | Search international documents with Mexican implementation counts |
get_provision_eu_basis | Get international law references for a specific provision |
validate_eu_compliance | Check alignment status of Mexican laws against international frameworks |
Mexico is not an EU member state. Mexican law aligns with international frameworks through:
The international bridge tools allow you to explore these alignment relationships -- checking which Mexican provisions correspond to USMCA, OECD, or international data protection principles, and vice versa.
Note: International cross-references reflect alignment and treaty obligation relationships. Mexico adopts its own legislative approach, and the tools help identify where Mexican and international law address the same domains.
All content is sourced from authoritative Mexican legal databases:
| Field | Value |
|---|---|
| Authority | Cámara de Diputados del H. Congreso de la Unión |
| Language | Spanish |
| Coverage | 317 federal laws across all legislative areas |
| Agency Guidance | 73,287 INAI, COFECE, CNBV regulatory documents |
| Last ingested | 2026-02-28 |
A GitHub Actions workflow monitors all data sources:
| Check | Method |
|---|---|
| Law amendments | Drift detection against known provision anchors |
| New laws | Comparison against Cámara de Diputados index |
| Repealed laws | Status change detection |
Verified data only -- every citation is validated against official sources. Zero LLM-generated content.
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 the Cámara de Diputados and the Diario Oficial de la Federación. However:
- This is a research tool, not a substitute for professional legal counsel
- Court case coverage is not included -- do not rely solely on this for case law (jurisprudencia) research
- Verify critical citations against primary sources (dof.gob.mx) for official proceedings
- International cross-references reflect alignment relationships, not formal transposition
- State-level legislation is not included -- this covers federal Acts only
- For professional legal advice in Mexico, consult a member of the Ilustre y Nacional Colegio de Abogados de México (INCAM) or the Barra Mexicana - Colegio de Abogados
Before using professionally, read: DISCLAIMER.md | SECURITY.md
Queries go through the Claude API. For privileged or confidential matters, use on-premise deployment.
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 ingest # Ingest laws from DOF/Cámara de Diputados
npm run build:db # Rebuild SQLite database
npm run check-updates # Check for amendments and new laws
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 261 security frameworks -- ISO 27001, NIST CSF, SOC 2, CIS Controls, SCF, and more. npx @ansvar/security-controls-mcp
Offline-capable sanctions screening -- OFAC, EU, UN sanctions lists. pip install ansvar-sanctions-mcp
70+ national law MCPs covering Australia, Brazil, Canada, China, Denmark, Finland, France, Germany, Ghana, Iceland, India, Ireland, Israel, Italy, Japan, Kenya, Netherlands, Nigeria, Norway, Singapore, Slovenia, South Korea, Sweden, Switzerland, Thailand, UAE, UK, and more.
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: AI-Powered Legal Research Tool},
year = {2026},
url = {https://github.com/Ansvar-Systems/mexican-law-mcp},
note = {317 Mexican federal laws with 45,179 provisions and 73,287 agency guidance documents}
}
Apache License 2.0. See LICENSE for details.
We build AI-accelerated compliance and legal research tools for the global market. This MCP server started as our internal reference tool for Mexican legal research -- turns out everyone building compliance tools for the Latin American market has the same research frustrations.
So we're open-sourcing it. Navigating 317 federal laws across the DOF and Cámara de Diputados shouldn't take hours.
ansvar.eu -- Stockholm, Sweden
Be the first to review this server!
by Modelcontextprotocol · Developer Tools
Read, search, and manipulate Git repositories programmatically
by Toleno · Developer Tools
Toleno Network MCP Server — Manage your Toleno mining account with Claude AI using natural language.
by mcp-marketplace · Developer Tools
Create, build, and publish Python MCP servers to PyPI — conversationally.
by Microsoft · Content & Media
Convert files (PDF, Word, Excel, images, audio) to Markdown for LLM consumption
by mcp-marketplace · Developer Tools
Scaffold, build, and publish TypeScript MCP servers to npm — conversationally
by mcp-marketplace · Finance
Free stock data and market news for any MCP-compatible AI assistant.