MCP (Model Context Protocol) is an open standard that allows AI assistants like ChatGPT and Claude to use external tools directly. Instead of copying and pasting data manually, the assistant can query live services during a conversation.
Tlaloc provides an MCP server that connects these assistants with official Mexican data sources: CURP from the National Population Registry (RENAPO), RFC from Mexico's tax authority (SAT), postal codes from SEPOMEX, phone number records from the Federal Telecommunications Institute (IFT), and SPEI payment receipts from Banco de Mexico.
This guide walks you through the entire setup process, from creating your account to making your first query.
What you can do with the MCP server
Once configured, your AI assistant will be able to perform the following queries directly within the conversation:
- Look up postal codes across all of Mexico, including neighborhoods, municipalities, and states from the official SEPOMEX catalog.
- Validate CURP against the official RENAPO registry to confirm that a population key is authentic and current.
- Verify RFC against SAT records to confirm a taxpayer is registered and active.
- Check which carrier owns a phone number using IFT's official records.
- Verify SPEI bank transfers by querying the Electronic Payment Receipt (CEP) directly from Banco de Mexico.
- Request CFDI invoices from businesses registered in Tlaloc's invoicing catalog.
All of this happens within the conversation. You simply describe what you need in plain language, and the AI handles the query for you.
Step 1: Create your account
Start by creating an account on the Tlaloc platform. Visit console.tlaloc.sh and sign up with your email address and a password. Your account is activated immediately.
Step 2: Add funds
Each query has a small cost that is deducted from your account balance. To add funds:
- Log in to the console and go to the "Billing" section.
- You'll find the bank details for making a deposit via SPEI transfer.
- Make the transfer from your online banking.
- Return to the Billing section and click "Register deposit".
- Fill in the transfer details: tracking number (clave de rastreo), sending bank, date, and amount.
Your balance will be credited once the Tlaloc team verifies the deposit.
Step 3: Generate an API Key
The API key is the credential that identifies your account when the AI assistant makes queries. To generate one:
- In the console, go to the "Mexico API" section.
- Click "Create Key".
- Enter a descriptive name (for example, "ChatGPT MCP" or "Claude work").
- Copy the API key displayed on screen.
Important: The API key is only shown once. Copy it and store it somewhere safe before closing the window. If you lose it, you'll need to create a new one.
Your API key will have the format tlmx_... followed by a string of characters.
Step 4: Set up in ChatGPT
To use the Tlaloc MCP server inside ChatGPT:
- Open ChatGPT and go to Settings.
- Find the "Connectors" or "Tools" section (the name may vary depending on your version).
- Click "Add connector".
- For the server URL, enter:
https://api.tlaloc.sh/mx/mcp - In the authentication section, add the header:
Authorization: Bearer tlmx_YOUR_API_KEY - Save the configuration.
That's it. From now on, ChatGPT can use Tlaloc's tools in any conversation. Just ask it something like "validate this CURP" or "look up postal code 06600" and the assistant will make the query automatically.
Step 5: Set up in Claude Code
If you use Claude Code as your development assistant, add the following configuration to your .claude/settings.toml file (or your project's configuration file):
[mcp.mexico-api]
transport = "http"
url = "https://api.tlaloc.sh/mx/mcp"
headers = { Authorization = "Bearer tlmx_YOUR_API_KEY" }
Replace tlmx_YOUR_API_KEY with your actual API key. Claude Code will automatically detect the MCP server the next time you start a session.
Step 6: Set up via OpenAI Responses API
If you're a developer looking to integrate Tlaloc's tools into your own application using the OpenAI API, you can include the MCP server as a tool in your request:
{
"type": "mcp",
"server_label": "mexico_api",
"server_url": "https://api.tlaloc.sh/mx/mcp",
"require_approval": "never",
"headers": {
"Authorization": "Bearer tlmx_YOUR_API_KEY"
}
}
Add this block inside the tools array of your Responses API call. The model will be able to invoke any of the available tools from the MCP server automatically.
Available tools
The Tlaloc MCP server includes the following tools. Each one has a per-query cost that is deducted from your balance:
| Tool | Description | Cost |
|---|---|---|
| consultar_codigo_postal | Look up postal codes from the SEPOMEX catalog | $0.01 MXN |
| consultar_telefono | Look up phone numbers in the IFT registry | $0.01 MXN |
| consultar_curp | Validate or look up CURP against RENAPO | $0.25 MXN |
| validar_rfc | Validate RFC against SAT | $0.10 MXN |
| descargar_cep | Download the full Electronic Payment Receipt from Banxico | $0.10 MXN |
| consultar_cep | Quick status check for a CEP | $0.10 MXN |
| listar_instituciones_cep | List available banks for CEP queries | Free |
| buscar_catalogo_facturaxme | Search the invoicing business catalog | Free |
| crear_solicitud_factura | Request a CFDI invoice | $1.00 MXN |
| listar_solicitudes_factura | List your invoice requests | Free |
| consultar_solicitud_factura | Check the status of a request | Free |
| actualizar_solicitud_factura | Update an existing request | Free |
Next steps
Now that your MCP server is set up, check out these related guides:
- Learn how to validate SPEI transfers with the Electronic Payment Receipt — a practical guide to verifying payments against Banco de Mexico's official records.
- Automate payment validation with AI — combine the MCP server with an AI assistant to verify payments from receipt images.