lexmex-mcp-server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@lexmex-mcp-serverConsulta el artículo 1 de la Constitución Mexicana"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
lexmex-mcp-server
Servidor MCP oficial de LexMex — inteligencia jurídica sobre legislación federal mexicana (316 leyes indexadas, citas verificadas contra el DOF).
Endpoint público: https://lex-mex.xyz/mcp
Qué es este repo
Este repo contiene el código fuente real y sin modificar del servidor MCP de producción de LexMex y de su capa de autenticación OAuth 2.0 + PKCE (RFC 6749, RFC 7591, RFC 8414, RFC 9728). Se publica para que cualquiera pueda auditar exactamente cómo se maneja la autenticación y qué hace cada tool antes de conectar su cliente MCP.
Lo que es real (código de producción, sin cambios):
mcp_service.py— el proceso que sirve el protocolo MCP (Resource Server)mcp_agentic.py— definición del servidor y las tools (consultar_ley_mexicana,consultar_precios,ver_catalogo_leyes,como_obtener_acceso)mcp_auth_provider.py— implementación deOAuthAuthorizationServerProviderdel SDKmcpmcp_oauth_routes.py— pantalla de consentimiento humano + introspección interna de tokensdb/mcp_oauth.py— capa de datos (clientes registrados, códigos de autorización, PKCE)
Lo que es un stub documentado (no es el código real): config.py, auth/, agentic_routes.py (salvo una función pública) y db/usuarios.py. Son las dependencias hacia el backend privado de LexMex — el sistema de usuarios, planes de suscripción y validación de sesión, con ~2200 líneas de lógica y RLS de Postgres que no se publican. Cada stub trae un docstring explicando qué reemplaza. Sin ellos, este repo no arranca de forma standalone — es intencional: el servidor MCP real siempre corre contra el backend de producción, nunca de forma aislada.
Related MCP server: Law7 MCP
Arquitectura — dos servidores, dos roles
Cliente MCP (Claude, VS Code, etc.)
│
│ HTTPS
▼
┌─────────────────────┐ ┌──────────────────────────┐
│ LexMex (app.py) │ HTTP │ lexmex-mcp │
│ Authorization │◄───────►│ (mcp_service.py) │
│ Server │ privada │ Resource Server │
│ /authorize /token │ │ /mcp │
│ /register /revoke │ │ │
│ /mcp-oauth/consent │ │ Verifica cada Bearer token │
│ /mcp-oauth/introspect│ │ vía introspección HTTP │
└─────────────────────┘ └──────────────────────────┘El Authorization Server (no incluido en este repo — vive en el backend principal) maneja login, consentimiento y emite tokens.
El Resource Server (
mcp_service.py, este repo) nunca toca Postgres directamente — verifica cada token preguntándole al AS por red privada.El access token emitido es la API key real de LexMex — no hay un tipo de credencial paralelo que auditar (ver el docstring de
mcp_auth_provider.py).
Flujo de autenticación
Un cliente MCP se registra dinámicamente (
POST /register, RFC 7591).Redirige al humano a
/authorizecon PKCE (code_challenge, S256).El humano ve una pantalla de consentimiento (
mcp_oauth_routes.py), inicia sesión si hace falta, y aprueba o rechaza.El cliente canjea el
codepor unaccess_tokenenPOST /token.Cada llamada MCP subsecuente lleva ese token en
Authorization: Bearer—mcp_service.pylo valida vía introspección antes de ejecutar cualquier tool.
Privacidad y retención de datos
Los códigos de autorización expiran en 2 minutos y son de un solo uso (ver
db/mcp_oauth.py, canje atómico anti-replay).Las API keys nunca se guardan en texto plano — solo su hash SHA-256.
mcp_service.pyno persiste nada — es un proceso sin estado más allá de la sesión MCP activa en memoria.
Licencia
Código publicado con fines de auditoría y transparencia. No es software libre de uso general — es el servidor de producción de un servicio comercial (LexMex).
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityCmaintenanceEnables AI assistants to search and analyze legal documents from multiple jurisdictions including US federal and state law, case law, EU regulations, UK legislation, Canadian law, Congress bills, SEC filings, and FDA data through free government APIs.Last updated5MIT
- Flicense-qualityDmaintenanceProvides AI assistants with up-to-date legal documents from official sources, enabling accurate legal information retrieval and analysis.Last updated13
- Alicense-qualityFmaintenanceEnables querying and searching Romanian legislation, including statutes, provisions, and EU law integration, directly from AI clients.Last updated555Apache 2.0

LexAPI MCPofficial
AlicenseAqualityBmaintenanceEnables querying EU legal documents, case law, and citation graphs through natural language using the LexAPI.Last updated102043MIT
Related MCP Connectors
Verified, citable German & EU law for any LLM. Daily updates from official sources, hosted in DE.
Official Mexican data for AI agents: CURP, RFC, CFDI, postal codes, phone, SPEI/CEP, DOF, geocoding.
Legal research: US primary law, Indian case law (31M+ judgments), and citation graph traversal.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Volpsmx/lexmex-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server