Skip to main content
Glama
MaykolMedrano

mcp-sinim

mcp-sinim

Pull Chilean municipal data from SINIM with a searchable catalog, tidy municipal panels, and the same package from Python or any MCP-compatible client.

An open-source project by Maykol Medrano.

PyPI Python CI License: MIT


What You Can Do

  • Search roughly 480 SINIM variables by natural language instead of memorizing id_dato codes.

  • Pull one or many municipal indicators as tidy pandas panels in one call.

  • Discover available years and municipality codes directly from the live portal.

  • Use the same package in notebooks, scripts, or MCP clients.

  • Work with an offline catalog snapshot plus optional metadata caching.

Related MCP server: Kolada MCP Server

Installation

pip install mcp-sinim

Python Example

from mcp_sinim import SINIMClient

client = SINIMClient(corrmon=True)

# 1) Find the right variable code
hits = client.search("patentes municipales")
print(hits[["code", "name"]].head(3).to_string(index=False))

# 4173 = Ingresos por Patentes Municipales de Beneficio Municipal
# 1311 = Monto Patentes Municipales Pagadas
# 13101 = Santiago, 13114 = Las Condes, 13123 = Providencia

# 2) Pull a tidy panel for several years and municipalities
df = client.get(
    ["4173", "1311"],
    years=[2022, 2023, 2024],
    municipios=["13101", "13114", "13123"],  # Santiago, Las Condes, Providencia
)
print(df.head(12).to_string(index=False))

# 3) Explore metadata when needed
print(client.years()[-5:])
print(client.search_municipios("providencia"))
print(client.municipios(region="13"))  # official region code: Metropolitana

Main things you will use:

  • search(...) to find variable codes

  • get(...) to pull municipal data

  • municipios(...) and search_municipios(...) to work with legal municipality codes

  • years() to see what is currently available

MCP Server

Use mcp-sinim when you want an MCP client to search SINIM variables, inspect their metadata, and fetch municipal data without writing a custom wrapper.

Run the server after installation:

mcp-sinim

Typical MCP configuration:

{
  "mcpServers": {
    "sinim": {
      "command": "mcp-sinim"
    }
  }
}

Optional environment variable:

  • MCP_SINIM_CACHE_DIR for the metadata disk cache

MCP tools

Tool

Description

search_variables

Search the SINIM variable catalog by keyword.

get_variable_info

Return metadata for one SINIM variable code.

get_data

Retrieve tidy municipal records for one or many variables.

preview_data

Preview up to 100 records to check a query before exporting.

export_data

Write a full municipal panel to Parquet or CSV on disk.

list_areas

List the 9 catalog subject areas.

list_municipios

List municipalities, optionally filtered by region.

search_municipalities

Search municipalities by name, optionally filtered by region.

list_years

List currently available SINIM years.

Important Notes

  • cod_municipio matches the official SUBDERE CUT codes for the 345 municipalities present in SINIM.

  • Pass those legal CUT codes to municipios=. The client translates them to SINIM's internal identifiers automatically.

  • Region filters accept official Chilean region codes ("1" through "16"), as well as SINIM's portal identifiers for compatibility.

  • corrmon=True requests SINIM's real-value series, expressed in pesos of the most recent published year.

  • This is an independent open-source client for the public SINIM portal. It is not affiliated with SUBDERE or the Gobierno de Chile.

Development

git clone https://github.com/MaykolMedrano/mcp_sinim
cd mcp_sinim
python -m venv .venv
.venv/Scripts/activate
pip install -e ".[dev]"
python -m ruff check .
python -m ruff format --check .
python -m pytest

License

MIT. See LICENSE.

Install Server
A
license - permissive license
A
quality
A
maintenance

Maintenance

Maintainers
Response time
Release cycle
1Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Provides access to 5,000+ Key Performance Indicators across 264 operating areas for all Swedish municipalities and regions, enabling statistical analysis, comparisons, and trend tracking of Swedish public sector data.
    Last updated
    21
    33
    12
    MIT
  • A
    license
    -
    quality
    C
    maintenance
    Provides access to Sweden's comprehensive municipal and regional statistics database with semantic search capabilities. Enables natural language queries against thousands of Key Performance Indicators covering various aspects of Swedish public sector data.
    Last updated
    16
    Apache 2.0

View all related MCP servers

Related MCP Connectors

  • Chile Government Procurement MCP — Mercado Público / ChileCompra (keyless-ish).

  • INEGI MCP — Mexico's national statistics office (INEGI) Indicators API.

  • Query 29,500+ World Bank development indicators for 200+ countries across 60+ years.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/MaykolMedrano/mcp_sinim'

If you have feedback or need assistance with the MCP directory API, please join our Discord server