latamfx-mcp
Click on "Deploy 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., "@latamfx-mcpwhat's the blue dollar rate today?"
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.
latamfx-mcp
An MCP server that exposes public LatAm FX data and an auditable reconciliation engine to AI agents (Claude Desktop, Claude Code, or any MCP client).
latamfx-mcp lets an LLM agent answer questions like "what's the blue dollar
today?", "convert 1,500 USD to ARS at the MEP rate", or "reconcile these two
ledgers and tell me what didn't match" — entirely from free, key-less public
APIs. No credentials, no client data.
It doubles as a reference implementation of a production-shaped MCP server: hexagonal architecture, typed contracts, retries with backoff, a TTL cache, contract tests against mocked HTTP, CI, Docker and a Cloud Run deployment module.
Tools
Tool | What it does |
| List supported sources (oficial, blue, MEP, CCL, mayorista, cripto, tarjeta). |
| Latest buy/sell quote for a source. |
| Historical buy/sell series (most recent N points). |
| min / max / mean / volatility of the mid price (computed with Polars). |
| Convert an amount between currencies using a source's quote (USD↔ARS). |
| Match two ledgers with a multi-rule engine; returns matches, misses and a match rate. |
Plus a resource: fx://sources (the source catalog as text).
The reconciliation engine
reconcile is a sanitized, generic version of intercompany / bank
reconciliation engines used in real fintech work. Rules run in priority order
and each right-side entry is consumed at most once, so the output is a valid
one-to-one assignment where every match is traceable to the rule that produced
it:
exact_reference— same non-empty external reference (score 1.0).amount_date— equal amount within a day-tolerance window (score decays with the gap).fuzzy_description— equal amount + similar free-text description above a threshold.
Related MCP server: veradata
Architecture
Hexagonal (ports & adapters): the domain and application layers know nothing about HTTP or MCP, so the engine is pure and the data source is swappable.
flowchart TD
Agent[AI agent / MCP client] -->|tools, resources| Server[server.py · FastMCP]
Server --> App[application · FxService, ReconciliationService]
App --> Domain[domain · models + reconciliation engine]
App -->|FxProvider port| Port{{ports}}
Port -.implemented by.-> Adapter[infrastructure · DolarApiProvider]
Adapter -->|httpx + retries + TTL cache| Public[(dolarapi.com / argentinadatos.com)]src/latamfx_mcp/
├── domain/ # pure models + reconciliation engine (no I/O)
├── ports/ # FxProvider Protocol (dependency inversion)
├── application/ # use cases: FX + reconciliation
├── infrastructure/ # httpx adapter, retry policy, TTL cache
├── config.py # env-driven settings
└── server.py # FastMCP wiring (tools + resource)See docs/architecture.md and the
ADRs for the design decisions.
Quickstart
Requires uv.
git clone https://github.com/floreskemec/latamfx-mcp.git
cd latamfx-mcp
uv sync
uv run latamfx-mcp # starts the MCP server over stdioUse it from Claude Code
claude mcp add latamfx -- uv --directory /absolute/path/to/latamfx-mcp run latamfx-mcpUse it from Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"latamfx": {
"command": "uv",
"args": ["--directory", "/absolute/path/to/latamfx-mcp", "run", "latamfx-mcp"]
}
}
}Then ask Claude: "Using latamfx, convert 1500 USD to ARS at the blue rate and show me the last 7 days of the blue dollar."
Development
uv sync
uv run pytest # tests + coverage
uv run ruff check . # lint
uv run ruff format . # format
uv run mypy # static typesConfiguration is read from environment variables (all optional):
Variable | Default | Purpose |
|
| HTTP timeout (seconds). |
|
| Max attempts on transient failures. |
|
| Quote/series cache TTL (seconds). |
Deployment
A multi-stage Dockerfile builds a slim image, and
deploy/terraform contains a minimal OpenTofu/Terraform
module to run it on Google Cloud Run. See the
deploy README.
Data sources
dolarapi.com — latest quotes.
ArgentinaDatos — historical series.
Both are free, community-maintained public APIs. This project is not affiliated with them; please review their terms before heavy use.
License
MIT © Gonzalo Flores Kemec
Available Tools
6 toolsconvertB
Convert an amount between currencies using a source's quote (e.g. USD<->ARS).
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | ||
| from_currency | Yes | ||
| to_currency | Yes | ||
| source | No | oficial |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description bears full responsibility for behavioral disclosure. It only hints at dependency on the source parameter but does not explain side effects, authentication needs, error conditions, or whether the operation is read-only. Minimal transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that immediately states the action and includes an example. No unnecessary words. It is front-loaded and efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has 4 parameters (3 required) and an output schema, the description provides adequate top-level context but omits details like expected currency formats (ISO codes?), available source values, and error handling. The output schema reduces need for return value explanation, but parameter guidance is lacking. Adequate but with gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 0% description coverage, leaving all 4 parameters undocumented. The description adds only a vague reference to 'source's quote' and an example (USD<->ARS) which hints at currency formats but does not define valid values, meaning, or constraints for any parameter. Insufficient compensation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's action ('Convert an amount between currencies') and specifies the method ('using a source's quote') with an example (USD<->ARS). It distinguishes from siblings like get_fx_quote and reconcile by implying a direct conversion operation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for conversion tasks but does not explicitly provide when-to-use or when-not-to-use guidance. No mention of alternatives or prerequisites. The context of siblings suggests differentiation but the description does not articulate it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_fx_quoteA
Get the latest buy/sell quote for an FX source (e.g. 'blue', 'oficial').
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description is sole source. It indicates a non-destructive read operation, but does not disclose error handling (e.g., invalid source), whether both buy and sell values are returned, or any rate limits. Adequate but minimal.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence, no extraneous words. Purpose is front-loaded. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given simplicity (1 param, output schema exists), description is nearly complete. Could explicitly state that both buy and sell quotes are returned. Still, adequate for most agents.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Only parameter 'source' lacks schema description (0% coverage). Description provides examples ('blue', 'oficial') but does not specify exact format, allowed values, or case sensitivity. Adds some value but incomplete.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states action 'Get' and resource 'latest buy/sell quote for an FX source' with concrete examples ('blue', 'oficial'). It differentiates from siblings like 'convert' or 'list_fx_sources' by focusing on a single current quote.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Implies usage for obtaining a current quote, but no explicit guidance on when to prefer this tool over alternatives like 'convert' or 'get_fx_stats'. No exclusions or when-not-to-use mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_fx_statsB
Summary statistics (min/max/mean/volatility) of a source's mid price.
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided; description only states output but omits behavioral traits like data freshness, error handling, or volatility calculation period.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence, front-loaded, no fluff. However, it sacrifices informativeness for brevity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the output schema exists, the description is adequate but lacks details like time window for volatility. A more complete description would aid selection.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0% for the parameter 'source'. The description vaguely implies it's a source of mid price but doesn't clarify acceptable values (e.g., currency pair format).
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool returns summary statistics (min/max/mean/volatility) of a source's mid price, distinguishing it from siblings like get_fx_quote (single quote) and get_fx_timeseries (time series).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives. Lacks when/when-not context or prerequisites.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_fx_timeseriesB
Get the historical buy/sell series for a source (most recent last_n).
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | ||
| last_n | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description only states it retrieves data, implying a read-only operation, but does not elaborate on behavior such as error handling, data ordering, or limitations. With no annotations, more detail is needed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence of 10 words, highly concise and without fluff. However, it could benefit from a slight structure, but given its brevity, it is efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists, so return format need not be described. However, the description lacks context about source (e.g., what constitutes a source) and does not clarify that data is most recent N points. It is minimally adequate but missing some context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%. The description explains last_n implicitly as 'most recent', but source is not described at all. The default and constraints for last_n are not mentioned.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it retrieves historical buy/sell series for a source, with a specific parameter for most recent N. This distinguishes it from sibling tools like convert, get_fx_quote, get_fx_stats, list_fx_sources, and reconcile, which have different purposes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. It does not specify prerequisites, exclusions, or context for choosing this over get_fx_quote or get_fx_stats.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_fx_sourcesA
List the supported FX sources (Argentine dollar variants).
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses the read-only nature ('list') and the specific scope (Argentine dollar variants), which is sufficient for a simple listing tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence of 8 words with no wasted language, fully efficient and front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given zero parameters and the presence of an output schema, the description is complete enough—it clearly states the tool's function and scope.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has no parameters and schema coverage is 100% (trivially), so the description adds no extra parameter information. Baseline score of 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'List the supported FX sources (Argentine dollar variants)' clearly states the tool's purpose with a specific verb and resource, and distinguishes it from siblings like convert or get_fx_quote which perform different operations.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage when one needs to know available FX sources, but does not explicitly state when to use this tool versus alternatives, nor provide any exclusions or prerequisites.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
reconcileA
Reconcile two ledgers with a multi-rule engine (exact ref, amount+date, fuzzy).
Returns matched pairs (with the rule and a confidence score), unmatched ids on each side, and the overall match rate.
| Name | Required | Description | Default |
|---|---|---|---|
| left | Yes | ||
| right | Yes | ||
| day_tolerance | No | ||
| fuzzy_threshold | No | ||
| enable_fuzzy | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It clearly states the output: 'Returns matched pairs (with the rule and a confidence score), unmatched ids on each side, and the overall match rate.' It does not mention any side effects, but the tool appears to be a pure computation. Could be improved by explicitly stating it does not modify data.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two well-structured sentences: first covers purpose and method, second covers output. No redundancy, front-loaded with key action.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with 5 parameters (2 required) and a nested input schema, the description covers the matching rules and output structure. However, it lacks details on parameter ranges (e.g., day_tolerance 0-30, fuzzy_threshold 0-1) and their effect on matching. Output schema exists but is not detailed here; the description sufficiently summarizes it.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so the description must compensate. It explains matching methods (exact ref, amount+date, fuzzy), which relate to 'day_tolerance' and 'fuzzy_threshold', but does not describe 'left' and 'right' explicitly (though they are clear from context). The parameter 'reference' in the nested schema is also not mentioned. Partial compensation but insufficient for full clarity.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Reconcile two ledgers with a multi-rule engine (exact ref, amount+date, fuzzy).' It specifies the resource (ledgers) and the action (reconcile) with distinct matching methods, and distinguishes itself from sibling FX tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies the tool is for reconciling two sets of ledger entries, and the sibling tools are all FX-related, so usage context is clear. However, it lacks explicit guidance on when not to use this tool or when to prefer alternatives.
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.
6 tool updates
v0.1.0- First observed
convert - First observed
get_fx_quote - First observed
get_fx_stats - First observed
get_fx_timeseries - First observed
list_fx_sources - First observed
reconcile
TDQS
Scored across 6 tools
Most tools have distinct purposes (conversion, quotes, stats, timeseries, source listing). However, 'reconcile' introduces a separate domain (ledger reconciliation) which could be confusing but does not overlap with FX tools.
Naming conventions are mixed: 'convert' and 'reconcile' are bare verbs, while others use 'get_fx_*' or 'list_fx_*' pattern. This inconsistency could be confusing.
6 tools is a reasonable number for an FX-focused server plus a reconciliation tool. It feels slightly heavy but still manageable.
Core FX operations (list sources, get quote, timeseries, stats, convert) are covered. The inclusion of reconciliation is a bonus but not part of the expected surface, so minor gap.
Maintenance
Related MCP Connectors
Verified LATAM data for AI agents: sanctions, entity, rates, KYB. Pay via x402.
Live & historical FX rates and currency conversion for AI agents. No API keys.
Live & historical FX rates and currency conversion for AI agents. No API keys.
Deterministic Mexican/LatAm verification + sanctions & PEP screening for AI agents. Pay via x402.
Related MCP Servers
- AlicenseAqualityBmaintenanceProvides real-time foreign-exchange rates, historical data, and multi-currency lookups to MCP-compatible AI coding assistants like Claude Code and Cursor.453 npmMIT
- FlicenseAqualityBmaintenanceMCP server providing verified Latin American data via x402 micropayments. 4 MCP tools: vera_rates (central bank rates CO/MX/BR/CL/PE), vera_sanctions (OFAC+SARLAFT+CNBV+COAF+UAF screening, EU AI Act Art.13), vera_entity (RUES/CNPJ/RFC enrichment), vera_context (AI market intelligence). $0.02–$0.10 USDC per call.4-
- AlicenseNot gradedqualityBmaintenanceValidates LatAm banking and tax IDs (Mexican CLABE, Brazilian CNPJ/CPF checksums) and performs BrasilAPI company, CEP, and bank lookups, enabling AI agents to verify financial and tax information in Latin America.3 npmMIT
- FlicenseAqualityCmaintenanceVerified Latin American data for autonomous AI agents via x402 micropayments. Sanctions screening (OFAC SDN + SARLAFT + CNBV + COAF + UAF) with EU AI Act Art.12/13 compliant hash-chain audit trail, entity enrichment (RUES/CNPJ/RFC), and real-time LATAM central bank rates including Argentina dólar blue. $0.02–$0.10 USDC per call on Base and Solana. No API key required.41-