Skip to main content
Glama
svkbogislav

LatAm Data MCP

by svkbogislav
README.md
<p align="center">
  <img src="https://raw.githubusercontent.com/svkbogislav/latam-data-mcp/main/assets/banner.png" alt="LatAm Data MCP β€” the Latin American data layer your AI agent is missing" />
</p>

<!-- mcp-name: io.github.svkbogislav/latam-data-mcp -->

# LatAm Data MCP

An MCP server that gives agents reliable access to LatAm data that is
otherwise scattered, undocumented, or Spanish-only: tax-ID validation
for 12 countries, live economic indicators, exchange rates (including
Argentina's blue rate and Colombia's legally binding TRM), Brazilian
company lookups, holidays, and business-day math.

## Tools (20)

### Identity, banking & companies

| Tool | What it does |
|---|---|
| `validate_tax_id` | Validates national tax IDs with real check-digit math for **15 countries**: πŸ‡¨πŸ‡± RUT, πŸ‡¦πŸ‡· CUIT/CUIL, πŸ‡²πŸ‡½ RFC, πŸ‡§πŸ‡· CPF/CNPJ (incl. 2026 alphanumeric CNPJs), πŸ‡¨πŸ‡΄ NIT, πŸ‡΅πŸ‡ͺ RUC, πŸ‡ΊπŸ‡Ύ RUT, πŸ‡ͺπŸ‡¨ cΓ©dula/RUC, πŸ‡΅πŸ‡Ύ RUC, πŸ‡»πŸ‡ͺ RIF, πŸ‡¬πŸ‡Ή NIT, πŸ‡©πŸ‡΄ RNC, πŸ‡΅πŸ‡¦ RUC+DV, πŸ‡¨πŸ‡· cΓ©dula, πŸ‡§πŸ‡΄ NIT. Returns canonical formatting and person/company/public-entity detection. |
| `validate_bank_account` | Validates interbank account codes with check-digit math: πŸ‡²πŸ‡½ CLABE (18-digit), πŸ‡¦πŸ‡· CBU/CVU (22-digit, incl. Mercado Pago virtual accounts). Decodes bank, branch and account β€” verify a payout destination before sending money. |
| `validate_pix_key` | Validates a πŸ‡§πŸ‡· PIX key (CPF, CNPJ, e-mail, +55 phone, or random UUID) and detects its type β€” CPF/CNPJ with full check-digit math. |
| `validate_phone_number` | Validates & normalizes phone numbers for 15 countries β†’ E.164, national format, mobile/landline detection. Handles Brazil's 9th digit, Mexico's 10-digit, Argentina's 9/15, Chile's 9-prefix. |
| `brazil_bank_lookup` | Resolves a πŸ‡§πŸ‡· bank by COMPE code (name, ISPB). |
| `brazil_company_lookup` | Full federal-registry data for any Brazilian company by CNPJ: legal name, status, size, main activity, capital, address, partners. |
| `costa_rica_company_lookup` | πŸ‡¨πŸ‡· taxpayer by cΓ©dula: name, regime, activities, and **compliance status** (moroso/omiso) from Hacienda β€” for KYC/AML. |

### Money & markets

| Tool | What it does |
|---|---|
| `chile_indicators` | UF, UTM, USD, EUR and more, in CLP. |
| `argentina_exchange_rates` | Official vs **blue** rate for USD/EUR. |
| `brazil_market_rates` | SELIC, CDI, IPCA. |
| `colombia_official_trm` | The legally binding USD/COP rate with validity dates. |
| `brazil_historical_series` | Historical SELIC/CDI/IPCA/USD over a date range, with min/max/avg/change β€” for trend analysis and backtesting. |
| `colombia_trm_history` | Historical USD/COP (TRM) over a date range. |
| `costa_rica_exchange_rate` | πŸ‡¨πŸ‡· official USD/EUR colΓ³n rate. |
| `currency_convert` | Convert any amount between two currencies at the live rate. |
| `latam_exchange_rates` | All 18 LatAm currencies vs USD in one call. |

### Time & calendars

| Tool | What it does |
|---|---|
| `public_holidays` | Official holidays for 20 LatAm countries, any year. |
| `next_holidays` | Upcoming holidays from today. |
| `long_weekends` | Long weekends with bridge-day analysis. |
| `business_days` | Working-day count between dates, holiday-aware β€” for SLA, payroll, logistics, settlement math. |

## Install (free β€” runs on your machine)

No signup, no API keys. Two steps:

**1. Install `uv`** (the runner) if you don't already have it:

```bash
brew install uv                              # macOS
# or, any platform:
curl -LsSf https://astral.sh/uv/install.sh | sh
```

**2. Add the server to your MCP client config** (`mcpServers` block):

```json
{
  "mcpServers": {
    "latam-data": {
      "command": "uvx",
      "args": ["latam-data-mcp"]
    }
  }
}
```

- **Claude Desktop:** `~/Library/Application Support/Claude/claude_desktop_config.json`
  (macOS) β€” then quit and reopen the app.
- **Cursor / Claude Code / other clients:** same `mcpServers` block, in their config.

Then just ask your agent *"Is Chilean RUT 60.910.000-1 valid?"* β€” done. Requires
Python 3.10+ (uv handles it).

> **macOS gotcha:** if the server doesn't show up, use the **full path** to uvx as
> the `command` (run `which uvx` β†’ e.g. `/opt/homebrew/bin/uvx`). GUI apps don't
> always inherit your shell's PATH. First launch takes a few seconds while uv
> fetches the package; instant after that.

## See it work

Once connected, just ask your agent in plain language:

> *"Is the Mexican CLABE `646180110400000007` valid, and which bank is it?"*
> β†’ βœ… valid Β· Banco STP Β· branch 180 Β· account …

> *"Validate Brazilian CNPJ `00.000.000/0001-91` and tell me who it is."*
> β†’ βœ… Banco do Brasil S.A. Β· active Β· BrasΓ­lia-DF

> *"What's the UF and the dollar today in Chile? And convert 2,500,000 CLP to BRL."*

> *"How many business days between 2026-09-01 and 2026-09-30 in Chile?"*
> β†’ holiday-aware working-day count (skips Fiestas Patrias)

No glue code β€” the agent picks the right tool and calls it.

## Pro β€” the compliance & data tier

The tools above are **free forever**. **Pro** adds the compliance and data
features teams actually pay for β€” the stuff you can't get from a free public API:

- πŸ›‘οΈ **OFAC sanctions / watchlist screening** β€” fuzzy name matching (catches
  aliases, reordered names, accents) for KYC/AML onboarding
- 🏒 **Company lookup by tax ID** β€” πŸ‡¨πŸ‡± Chile today; πŸ‡¦πŸ‡· Argentina, πŸ‡΅πŸ‡ͺ Peru,
  πŸ‡²πŸ‡½ Mexico coming β€” name, status, activities, compliance flags
- πŸ“‹ **Bulk validation** β€” validate up to 10,000 IDs in one call, for onboarding
  pipelines and CRM cleanups
- *coming:* PEP screening, change-monitoring webhooks, extended historical data

Delivered as a managed, always-on hosted endpoint (no self-hosting), with higher
rate limits and priority support.

### πŸ’³ $19.99/mo β€” [β†’ Subscribe to Pro](https://latam-data-mcp.lemonsqueezy.com/checkout/buy/f75c3532-a919-4cab-a121-a9278066fe4e)

**Building for a team, or need a specific country/data source first?**
[Open an issue](https://github.com/svkbogislav/latam-data-mcp/issues/new) β€” tell me
your use case and I'll get you early access.

## Develop

```bash
python3.11 -m venv .venv
.venv/bin/pip install -e ".[dev]"
.venv/bin/python server.py     # stdio; set PORT=8000 for Streamable HTTP
```

## Tests

```bash
.venv/bin/pytest              # offline suite: validators + MCP protocol layer
.venv/bin/pytest -m live      # integration tests against the real upstream APIs
```

Validators are verified against python-stdnum's reference algorithms and
real IDs of public institutions (Banco do Brasil, SUNAT, DIAN, UTE, U. de Chile).

## Data sources

All free public APIs, no keys: gael.cloud (Chile), Bluelytics (Argentina),
BrasilAPI (Brazil), datos.gov.co (Colombia), open.er-api.com (regional FX),
Nager.Date (holidays). Tax-ID validation is pure local math β€” zero
dependencies, zero latency, nothing to break.

## Roadmap

- [ ] Historical series (UF, USD, TRM)
- [ ] Deploy free tier + directory listings (Smithery, PulseMCP, mcp.so)
- [ ] Monetization via MCPize (85% rev share) once free tier has weekly active users
- [ ] Electronic invoicing requirements per country (static knowledge tool)

TDQS

A3.9/5.0

Scored across 20 tools

Disambiguation4/5

Most tools have clearly separate purposes (validation vs lookup vs rates vs holidays), and the country-specific rate tools are differentiated by scope and current-vs-history. A few near-duplicates like brazil_historical_series vs brazil_market_rates or public_holidays vs next_holidays could slow selection, but the descriptions resolve the intended use.

Naming Consistency4/5

Snake_case names are readable and mostly predictable: validators start with validate_, country-specific data uses country_subject, and generic utilities are concise noun phrases. The main inconsistency is word order (currency_convert vs convert-style verbs, public_holidays as noun-only) rather than any mixed convention.

Tool Count3/5

At 20 tools, the set is on the heavy side and includes some near-redundant pairs (current vs historical country rates, all-holidays vs next-holidays). Still, the tools cluster into coherent groups, so the count is not unreasonable for a broad regional data server.

Completeness3/5

The core categories are covered well: phone/tax/bank validation, exchange rates, holidays/business days, and a few lookups. But country coverage is unevenβ€”company lookup exists only for Brazil/Costa Rica, bank-account validation only for MX/AR, and historical series only for Brazil/Colombiaβ€”leaving notable gaps for an MCP with 'LatAm' scope.

Maintenance

ActivityStale
ResponsivenessNo issues