Skip to main content
Glama

Remittances API + MCP

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

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

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.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full behavioral burden. It clearly discloses that the tool returns coverage metadata (periods, counts, sources, endpoint list), which implies a read-only, informational operation. It doesn't explicitly state side effects or auth requirements, but for a metadata discovery tool those are largely unnecessary; the disclosure is solid.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences with zero wasted words. The first sentence enumerates the returned contents, the second provides actionable usage guidance, with the key instruction ('Call this first') placed at the end of the sentence in a natural, prominent position.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a no-parameter, no-output-schema metadata tool, the description is fully complete: it tells exactly what information will be returned and when to call. An agent has everything needed to invoke it correctly; no missing information would cause misinvocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There are zero parameters and the schema is empty, so the baseline of 4 applies; the description correctly avoids inventing parameter details that don't exist. No additional semantic help is needed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly defines the tool's purpose as returning coverage metadata for the US-Mexico remittances dataset, specifying exact contents (time range, counts, sources, endpoints). It distinguishes itself from sibling tools by being the meta-level overview endpoint, so an agent can tell it apart without opening schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit when-to-use guidance: 'Call this first to learn which periods can be requested.' This unambiguously instructs the agent to invoke this tool before other data-retrieval siblings, making the usage context clear with minimal effort.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
yearYesCalendar year, e.g. 2025
limitNo
stateNoRestrict to one state
offsetNo

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It discloses important behavioral traits: results are ranked by amount, data is annual only, and pagination is supported through limit and offset. It does not describe response shape or edge cases, but for a read-only list tool the main behavior is well covered.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences front-load the main operation and then add filtering, pagination, and granularity guidance. Every sentence earns its place with no filler or repetition of schema details.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a relatively simple read tool, the description covers scope, ranking, annual granularity, state filtering, and pagination. It lacks an explicit pointer to sibling tools for state-level or national comparisons, and sort direction is only implicit, but the core calling context is sufficiently complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already documents year and state, so the description adds value mainly by explaining limit and offset as pagination mechanisms and reinforcing that state restricts to one state. It does not explicitly tie the 'year' concept to the year parameter or explain defaults, but it compensates reasonably for the 50% schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: 'Remittances received by Mexican municipality for one year, ranked by amount.' This clearly identifies the tool's scope and distinguishes it from siblings like get_mexico_state_timeseries and get_national_totals by emphasizing 'one year' and 'municipal data is annual only.'

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives clear context for use: annual municipal-level data, optional state filtering, and pagination using limit and offset. However, it does not explicitly name sibling alternatives or state when not to use this tool versus get_mexico_states or get_coverage, so it stops short of full routing guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
yearYesCalendar year, e.g. 2025
quarterNo

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the transparency burden and does reasonably well: it discloses the data granularity (32 states), the aggregation mode (one period), and the ordering (ranked by amount). It omits units and exact return columns, but those are minor for a read-only data fetch.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences with no filler. The main scope is front-loaded, and the parameter usage follows immediately in natural language.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple two-parameter tool without an output schema, the description covers what the data is, the period options, and the output ordering. It could have explicitly referenced get_mexico_state_timeseries as the alternative for multi-period requests, but this is not a major gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 50%, and the description compensates by explaining how year and quarter combine: year alone gives annual totals, year plus Q1-Q4 gives a single quarter. This adds interaction semantics beyond the schema's type and enum fields.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: remittances received by each of the 32 Mexican states for a period. It also notes the output is ranked by amount, which clearly distinguishes it from siblings like get_us_states and get_mexico_state_timeseries.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives concrete instructions: pass only a year for the annual total, or a year plus quarter for a quarterly total. It does not explicitly name sibling alternatives or exclusions, but the one-period scope is clear enough context for choosing this tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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".

ParametersJSON Schema
NameRequiredDescriptionDefault
freqNoquarterly
stateNoMexican state name; omit for all states

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the burden. It usefully discloses that omitting state returns all state series and that the series is 'full'. However, it does not describe output shape, units, time range, or error behavior, though the operation appears benign and read-only.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences with no filler. The core behavior is front-loaded, and the second sentence provides a necessary prerequisite and concrete example. Every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with two optional parameters and no output schema, the description covers the key behavioral rule (state omitted = all states) and the critical naming prerequisite. It does not describe the return series structure, but this is a simple read operation where the main invocation guidance is otherwise complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 50%, but the description adds valuable meaning beyond the schema for the state parameter: use the exact state name from get_mexico_states, with 'Michoacán de Ocampo' as an example for accents and spelling. The freq parameter is left to its name and enum values, which is minimally sufficient.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: retrieving the full remittance time series for a Mexican state, or every state when state is omitted. This clearly distinguishes the tool from siblings like get_national_totals and get_mexico_municipalities by geography and aggregation level, while also pointing to get_mexico_states for naming.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear context: use this tool for a single state, or all states when state is omitted. It also provides an explicit actionable instruction to use the exact state name from get_mexico_states, including an example. It does not explicitly say when not to use the tool or route to national/municipal alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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).

ParametersJSON Schema
NameRequiredDescriptionDefault
freqNoyearly

TDQS

A4.3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It adds the useful note that the most recent year may be partial, which is a behavioral trait. However, it does not disclose the return format (e.g., single value vs time series) or any other operational details. Minimal but not misleading.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, no filler. The purpose is stated first, then usage guidance. Every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with one optional parameter and no output schema, the description covers the essential purpose, parameter semantics, and a data-quality caveat. It omits the exact return structure (e.g., whether it's a single number or a list), but given the simplicity, it is nearly complete. A minor gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has only one parameter 'freq' with enum values but no descriptions. The description explains what each enum value means (quarterly series vs annual totals) and adds the partial-year nuance, fully compensating for the 0% schema description coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool returns total remittances received by Mexico per period in USD. It names the specific resource (national totals) and differentiates from siblings like get_mexico_states (state-level) and get_us_states (US states).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly tells when to use freq=quarterly vs yearly and notes the partial-year caveat. However, it does not explicitly say 'use this tool for national totals, not for states,' but the name and scope make that obvious. Slight lack of explicit alternative routing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
yearYesCalendar year, e.g. 2024
quarterNo

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the burden. It discloses a key behavioral trait: the US-origin series lags the Mexican series by a quarter or two. It does not mention data availability, whether the tool returns both series, or any limitations. The lag disclosure is valuable but incomplete for a data-retrieval tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, no fluff. The core data scope is front-loaded, and the lag note is a useful addition. It earns a 4 because it is concise and informative, though it could be slightly more structured with explicit parameter guidance.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple 2-parameter tool with no output schema, the description is adequate but has gaps: it doesn't state whether the tool returns data for all states at once, whether the population is a separate field, or how the lag affects the requested period. The sibling tools suggest a family of related data tools, so a bit more context on the US-state scope would help.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 50%: 'year' is described as 'Calendar year, e.g. 2024', but 'quarter' has no description beyond its enum. The description adds context about the data (remittances and population) but does not explain how the parameters interact, e.g., whether quarter is optional and what happens if omitted. Baseline 3 is appropriate because the schema covers half the parameters and the description adds some context.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('get') and resource ('remittances sent from each US state for one period, with the Mexican-born population of that state'). It clearly distinguishes from siblings like get_mexico_states and get_national_totals by specifying US-state-level data. However, it doesn't explicitly name a sibling alternative, so it misses the top score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context: it is for US-state-level remittance data with a lag note about the US-origin series. It does not explicitly state when to use this tool versus get_mexico_states or get_national_totals, nor does it mention exclusions. The lag note is useful but not a full usage guideline.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 6 tool updatesv1.0.0
    • First observedget_coverage
    • First observedget_mexico_municipalities
    • First observedget_mexico_state_timeseries
    • First observedget_mexico_states
    • First observedget_national_totals
    • First observedget_us_states

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.

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.
    2 npm
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables AI agents to issue Mexico CFDI 4.0 electronic invoices (factura electrónica) via Facturapi, with tools for creating, querying, canceling, and sending invoices.
    MIT
  • A
    license
    Not graded
    quality
    B
    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