MCP Hub
Back to servers

mexican-law-mcp

Mexican legislation via MCP — full-text search across statutes and provisions

Registry
Updated
Feb 22, 2026

Quick Install

npx -y @ansvar/mexican-law-mcp

Mexican Law MCP

npm License CI MCP Registry OpenSSF Scorecard

A Model Context Protocol (MCP) server providing comprehensive access to Mexican federal legislation, including data protection (LFPDPPP), fintech regulation, cybercrime, commercial law, and consumer protection with Spanish full-text search.

Deployment Tier

MEDIUM -- dual tier, free database bundled in npm package.

TierPlatformDatabaseContent
FreeVercel (Hobby) / npm (stdio)Core federal laws (~120-200 MB)Key federal legislation (LFPDPPP, Ley Fintech, Codigo Penal Federal, Ley General de Sociedades Mercantiles, Codigo de Comercio, Ley Federal de Proteccion al Consumidor), FTS search, EU/international cross-references
ProfessionalAzure Container Apps / Docker / LocalFull database (~500 MB - 1 GB)+ All federal laws and reglamentos, INAI resolutions and guidelines, NOM standards, state-level key legislation

Key Legislation Covered

LawYearSignificance
LFPDPPP2010Ley Federal de Proteccion de Datos Personales en Posesion de los Particulares; comprehensive private-sector data protection law
Ley General de Proteccion de Datos (Public Sector)2017Data protection for public sector entities (Sujetos Obligados)
Ley Fintech2018Ley para Regular las Instituciones de Tecnologia Financiera; one of the most comprehensive fintech regulatory frameworks in Latin America
Codigo Penal FederalVariousCybercrime provisions (Articles 211bis 1-7) covering unauthorized access to computer systems
Ley General de Sociedades MercantilesVariousCommercial companies law governing incorporation and corporate governance
Codigo de ComercioVariousCommercial code governing electronic commerce and commercial transactions
Ley Federal de Proteccion al ConsumidorVariousConsumer protection law administered by PROFECO
Constitution of Mexico1917 (amended)Article 16 establishes the right to privacy and data protection as a fundamental right

Regulatory Context

  • Data Protection Regulator: INAI (Instituto Nacional de Transparencia, Acceso a la Informacion y Proteccion de Datos Personales), a constitutional autonomous body
  • INAI oversees both data protection (LFPDPPP) and freedom of information/transparency
  • INAI has faced political pressure since 2023, with proposals to merge or dissolve it as part of broader autonomous body reforms; some commissioner positions have been vacant
  • Mexico has two separate DPA laws: LFPDPPP (2010) for private sector and Ley General (2017) for public sector
  • Mexico is a member of APEC CBPR (Cross-Border Privacy Rules), OECD, and has USMCA/T-MEC trade agreement with data flow provisions
  • Mexico is a civil law jurisdiction; the DOF (Diario Oficial de la Federacion) is the official gazette

Data Sources

SourceAuthorityMethodUpdate FrequencyLicenseCoverage
Camara de DiputadosCamara de Diputados del H. Congreso de la UnionHTML/PDF ScrapeOn changeGovernment Public DataAll federal laws with consolidated reform texts
Orden Juridico NacionalSecretaria de GobernacionHTML ScrapeOn changeGovernment Public DataConstitution, federal laws, regulations, international treaties
INAIINAIHTML ScrapeOn changeGovernment Public DataLFPDPPP implementing regulations, guidelines, sanction resolutions

Full provenance metadata: sources.yml

Installation

npm install -g @ansvar/mexican-law-mcp

Usage

As stdio MCP server

mexican-law-mcp

In Claude Desktop / MCP client configuration

{
  "mcpServers": {
    "mexican-law": {
      "command": "npx",
      "args": ["-y", "@ansvar/mexican-law-mcp"]
    }
  }
}

Vercel Streamable HTTP (ChatGPT / Claude.ai)

Once deployed, the public endpoint will be available at:

https://mexican-law-mcp.vercel.app/api/mcp

Available Tools

ToolDescriptionFree TierProfessional
get_provisionRetrieve a specific article from a Mexican federal lawYesYes
search_legislationFull-text search across all federal legislation (Spanish)YesYes
list_lawsList all available laws with metadataYesYes
get_law_structureGet table of contents / structure of a lawYesYes
get_provision_eu_basisCross-reference Mexican law to EU/international equivalentsYesYes
search_regulationsSearch federal regulations (reglamentos) and NOM standardsNo (upgrade)Yes
get_inai_guidanceRetrieve INAI guidelines and resolutionsNo (upgrade)Yes

Development

# Install dependencies
npm install

# Build
npm run build

# Run tests
npm test

# Run contract tests
npm run test:contract

# Run all validation
npm run validate

# Build database from sources
npm run build:db

# Build free-tier database
npm run build:db:free

# Start server
npm start

Contract Tests

This MCP includes 12 golden contract tests covering:

  • 4 article retrieval tests (LFPDPPP, Ley Fintech, Codigo Penal Federal, Ley General de Sociedades)
  • 3 search tests (datos personales, ciberdelito, comercio electronico)
  • 2 citation roundtrip tests (diputados.gob.mx / DOF references)
  • 1 cross-reference test (LFPDPPP to GDPR/EU Directive)
  • 2 negative tests (non-existent law, malformed article)

Run with: npm run test:contract

Security

See SECURITY.md for vulnerability disclosure policy.

Report data errors: Open an issue

Related Documents

License

Apache-2.0 -- see LICENSE


Built by Ansvar Systems -- Cybersecurity compliance through AI-powered analysis.

Reviews

No reviews yet

Sign in to write a review