Skip to main content
Glama
chile-finance-mcp

chile-finance-mcp

by lissethtovar
README.md
# chile-finance-mcp

MCP server with four tools for Chilean finance. It lets an AI assistant (Claude Desktop, Cursor, and other MCP clients) validate a RUT, read today's official indicators, convert between CLP, UF, UTM, USD and EUR, and compute a *boleta de honorarios*.

All data comes from the [Chile Financial UF UTM Converter](https://rapidapi.com/lissethtovar/api/chile-financial-uf-utm-converter) API on RapidAPI. Indicator values are read from official sources (Banco Central de Chile and SII); the API returns an error rather than an estimate when no official value is available.

## Tools

| Tool | What it does |
|---|---|
| `validate_chilean_rut` | Validates and formats a RUT/RUN with the Modulo 11 check digit. |
| `get_chile_economic_indicators` | UF, observed USD, EUR, copper, UTM and monthly IPC, each with source and date. |
| `convert_clp_uf_utm_usd` | Converts an amount between CLP, UF, UTM, USD and EUR. |
| `calculate_honorarios_withholding` | Gross, legal withholding and net for a *boleta de honorarios* (Ley 21.133). |

## Requirements

- Python 3.10 or newer.
- A RapidAPI key subscribed to the API above. The Basic plan is free (100 calls per day).

## Use with Claude Desktop

Add this to `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "chile-finance": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/lissethtovar/chile-finance-mcp", "chile-finance-mcp"],
      "env": { "RAPIDAPI_KEY": "your-rapidapi-key" }
    }
  }
}
```

Without `uvx`: `pip install git+https://github.com/lissethtovar/chile-finance-mcp`, then use `"command": "chile-finance-mcp"` with no `args`.

## Privacy

The server sends your requests only to `chile-financial-uf-utm-converter.p.rapidapi.com`, using your own key. It writes nothing to disk and contacts no other host.

## Notes

- `tipo_entidad_estimado` in the RUT response is a non-official heuristic, not an SII classification.
- The *boleta* calculation is a reference, not tax advice.

## Development

```bash
pip install -e .
PYTHONPATH=src python -m unittest tests.test_server
```

## License

MIT