Skip to main content
Glama

Remittances API + MCP

CI

Open API and MCP server for remittance flows between the United States and Mexico: $62.5B received in 2025, broken down by 32 Mexican states, 2,488 municipalities and 51 US states of origin, quarterly from 2013.

No API key. No rate limit worth mentioning. JSON or CSV.

Data powers remittances.mx; docs live at remittances.mx/dashboard/api.

Use it from an AI agent (MCP)

src/server.mjs is a Model Context Protocol server: one dependency-free Node script speaking JSON-RPC over stdio.

git clone https://github.com/jp-pietrini/remittances-api-mcp.git
cd remittances-api-mcp
claude mcp add remittances -- node "$(pwd)/src/server.mjs"

Or for Claude Desktop, in claude_desktop_config.json:

{
  "mcpServers": {
    "remittances": {
      "command": "node",
      "args": ["/absolute/path/to/remittances-api-mcp/src/server.mjs"]
    }
  }
}

Then ask things like "which Mexican municipalities received the most remittances in 2025?" or "chart quarterly remittances since 2019".

Tools

Tool

Returns

get_coverage

Periods available, counts, sources, endpoint list

get_national_totals

National series, yearly or quarterly

get_mexico_states

State ranking for one period

get_mexico_state_timeseries

One state (or all) over time

get_mexico_municipalities

Municipal ranking for one year

get_us_states

US sending states, with Mexican-born population

Point the server at another deployment with REMITTANCES_API_BASE:

REMITTANCES_API_BASE=http://localhost:3000 node src/server.mjs

Check it works:

npm run smoke

Troubleshooting

  • Tool returns Invalid arguments: the server checks arguments before calling the API. year is required for the state, municipality and US tools and must be an integer; quarter must be Q1-Q4.

  • Request to ... failed: the API was unreachable or took longer than 30 seconds. Check your network, or REMITTANCES_API_BASE if you set it.

  • Server not listed in your client: confirm the path to src/server.mjs is absolute and that node --version is 18 or newer, then run npm run smoke.

  • A state name returns nothing: use the exact name from get_mexico_states (for example Michoacán de Ocampo).

Related MCP server: mcp-inegi

Use it from code (REST)

curl "https://remittances.mx/api/v1/meta"
curl "https://remittances.mx/api/v1/mexico/states?year=2025"
curl "https://remittances.mx/api/v1/mexico/municipalities?year=2025&state=Jalisco&limit=10"
curl "https://remittances.mx/api/v1/us/states?year=2024&format=csv"
import pandas as pd

df = pd.read_csv(
    "https://remittances.mx/api/v1/national?freq=quarterly&format=csv"
)

Endpoint

Parameters

GET /api/v1/meta

format

GET /api/v1/national

freq=yearly|quarterly, format

GET /api/v1/mexico/states

year (required), quarter, format

GET /api/v1/mexico/states/timeseries

state, freq, format

GET /api/v1/mexico/municipalities

year (required), state, limit, offset, format

GET /api/v1/us/states

year (required), quarter, format

Runnable examples live in examples/: quickstart.sh (curl), quickstart.mjs (Node 18+, no dependencies) and quickstart.py (pandas).

Full description in api/openapi.yaml. Every endpoint accepts format=csv and sends permissive CORS headers, so a browser or notebook can call it directly.

Run the API yourself

api/nextjs/ holds the reference implementation: Next.js App Router route handlers plus the loading and formatting helpers they share. Drop them into a Next.js project as

src/lib/api-data.ts
src/app/api/v1/meta/route.ts
src/app/api/v1/national/route.ts
src/app/api/v1/mexico/states/route.ts
src/app/api/v1/mexico/states/timeseries/route.ts
src/app/api/v1/mexico/municipalities/route.ts
src/app/api/v1/us/states/route.ts

and supply the source JSON in public/data/ (mexico_remittances.json, mexico_muni_remittances.json, mexico_muni_names.json, us_remittances.json, mexican_born_population.json). The handlers import those files, so there is no database and no filesystem access at request time.

Data and caveats

Source

Used for

Banco de México (via the DataMexico cube)

Remittances by Mexican state and municipality

Banco de México SIE

Remittances by US state of origin

US Census Bureau (ACS)

Mexican-born population by state

CONAPO

Migration intensity

INEGI (ENIGH, Census, ICMM)

Household demographics and income

  • All amounts are current USD.

  • Mexican state and municipal series run to 2026-Q2. US state-of-origin series run to 2025-Q3: they come from a different Banco de México product and lag, so the two sides of the corridor can end on different periods.

  • Municipal figures are annual only.

  • The most recent calendar year is partial until all four quarters publish. Check get_coverage before computing year-over-year changes.

  • Banco de México revises past quarters; totals shift slightly between pulls.

Citation

Pietrini, J.P. US-Mexico Remittances Dashboard. Available at remittances.mx.

Please also credit Banco de México, INEGI, CONAPO and the US Census Bureau.

License

MIT. See LICENSE.

Available Tools

6 tools
get_coverageA

Coverage of the US-Mexico remittances dataset: first and last quarter available, state and municipality counts, sources, and the list of API endpoints. Call this first to learn which periods can be requested.

Inputs: no named parameters.

get_mexico_municipalitiesA

Remittances received by Mexican municipality for one year, ranked by amount. Filter to one state with state, and page through results with limit and offset. Municipal data is annual only.

Inputs: year (required), limit, state, offset.

get_mexico_statesA

Remittances received by each of the 32 Mexican states for one period, ranked by amount. Pass a year for the annual total, or a year plus quarter (Q1-Q4) for one quarter.

Inputs: year (required), quarter.

get_mexico_state_timeseriesA

Full remittance time series for one Mexican state (or every state when state is omitted). Use the exact state name from get_mexico_states, e.g. "Michoacán de Ocampo".

Inputs: freq, state.

get_national_totalsA

Total remittances received by Mexico per period, in USD. Use freq=quarterly for the quarterly series or freq=yearly for annual totals (the most recent year may be partial).

Inputs: freq.

get_us_statesB

Remittances sent from each US state for one period, with the Mexican-born population of that state. The US-origin series lags the Mexican series by a quarter or two.

Inputs: year (required), quarter.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 6 tools

    Disambiguation5/5

    Each tool targets a distinct geographic level or query mode: coverage metadata, national totals, state period rankings, state time series, municipality rankings, and US state rankings. There is no meaningful overlap between them, and the descriptions clearly differentiate one-period snapshots from time series.

    Naming Consistency5/5

    All tools follow the same get_<domain>_<resource> pattern with snake_case and a consistent verb prefix. Names like get_mexico_states, get_mexico_state_timeseries, and get_us_states are predictable and readable.

    Tool Count5/5

    Six tools is a well-scoped size for a remittances dataset API. Each tool covers a meaningful queryable view without redundancy or bloat.

    Completeness5/5

    The tool set covers the dataset's major queryable dimensions: national totals, Mexican states, Mexican state time series, municipalities, US states, and coverage metadata. This gives agents a complete picture of the available data with no obvious dead ends.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Enables access to Bank of Mexico (Banxico) economic data including real-time and historical USD/MXN exchange rates, inflation data, interest rates, and other financial indicators. Supports querying current rates, historical data with date ranges, and economic metadata through natural language.
      9
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Provides access to Mexico's INEGI (national statistics office) indicators API, enabling AI agents to query statistical data through natural language or direct tool calls.
      88 npm
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Provides AI assistants with live, authenticated access to official Mexican data sources including CURP, RFC, postal codes, phone numbers, SPEI payments, CFDI status, DOF semantic search, and geocoding via INEGI/INE.
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables AI agents to validate Mexican RFC, CURP, CLABE and NSS identifiers with real check digits, parse CFDI 4.0 invoices with labelled SAT catalogue codes and verified totals, and query the SAT's public status service to see whether an invoice is still valid. It also generates coherent test people and companies, all read-only and without API keys, certificates or PAC contracts.
      9
      108 npm
      1
      MIT