Es Ine

Developer tools

MCP server connecting AI assistants to the Spanish National Statistics Institute (INE) public API. Enables access to official demographic, economic and social statistics, making it easy to search, retrieve and analyze reliable data using natural language.

Your AI app calls the Es Ine MCP server, which does the developer tools work and sends the result back to the chat.

About Es Ine

Es Ine is a community MCP server from es-ine, filed in our directory under developer tools. MCP server connecting AI assistants to the Spanish National Statistics Institute (INE) public API. Enables access to official demographic, economic and social statistics, making it easy to search, retrieve and analyze reliable data using natural language.

At a glance

Publisher
es-ine (community)
Runs
See the README for setup
Written in
Python
License
EUPL-1.2
GitHub stars
266

How to set up Es Ine

  1. Follow the install steps in the Es Ine README; it is written in Python, so have that toolchain ready.
  2. Check the Es Ine README for keys or settings; the registry lists none that Es Ine requires.
  3. Add Es Ine to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Es Ine tools to confirm the connection.
  5. Run one read-only task with Es Ine first, and keep your app asking before each tool call until the results look right.

Es Ine compared with similar servers

  • Kiln (codeofaxel) by codeofaxel has fewer GitHub stars than Es Ine (265 against 266); both are community servers, and Kiln (codeofaxel) runs as a remote server and Es Ine runs on your own machine.
  • Zabbix by mpeirone has more GitHub stars than Es Ine (267 against 266); both are community servers, and both run locally.
  • ClickHouse Loom by ClickHouse has fewer GitHub stars than Es Ine (264 against 266); ClickHouse Loom is official while Es Ine is a community server, and both run locally.

Before you connect Es Ine

  • Give Es Ine its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Es Ine tool call until you trust what it does with them.
  • Treat text that Es Ine fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Es Ine on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Es Ine

How marketing and sales teams put Es Ine to work, by company size. Pick the size closest to yours and start Es Ine on one use case.

Small business

  • A small business with a developer can use Es Ine to ship site and tracking fixes faster, with the AI reading the code it changes.
  • Technical founders can ask Es Ine to explain and fix a marketing site issue without context switching between tools.
  • Es Ine runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Growth engineers can use Es Ine to build landing pages, tracking and integrations in fewer cycles, with reviews kept in the normal flow.
  • Marketing ops engineers can connect Es Ine to keep scripts and automations documented and versioned as they change.
  • Start Es Ine on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprise engineering teams can roll out Es Ine with repo scopes and audit logs, so agents work only where they are allowed.
  • Platform teams can standardize on Es Ine so web and marketing engineering share one reviewed way of working with AI.
  • Es Ine is a community server, so have security review the code and pin a version before Es Ine touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Es Ine README

From es-ine/mcp on GitHub, shared under its EUPL-1.2 license. Images are left out; the original has them.

README.md

INE MCP

Official statistics of Spain, straight from the source, for any AI assistant.

A Model Context Protocol server for the public JSON API of INE (Instituto Nacional de Estadística / Statistics Spain).

Quick start · Connect a client · Available tools · Available operations

English · Spanish

Give your AI assistant direct access to Statistics Spain's official statistics.

This server lets any MCP client (Claude, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Zed and others) query the public JSON API of the INE (Instituto Nacional de Estadística, Statistics Spain). Ask in plain language, for example "What was the unemployment rate for men in Murcia over the last four quarters?", and the assistant will find the right statistical operation, choose the table, resolve the filters and answer with the figures and a link to the official INE table.

Hosted endpoint Available soon (meanwhile, run it locally)
Transport stdio (default) or Streamable HTTP
Authentication None, the data is public
Coverage Spain and its territorial breakdowns (autonomous communities, provinces, municipalities…)
Language Tool descriptions in English; data labels in Spanish, as INE publishes them
Catalogue 166 operations, 110 with tables available today (full list)

Why use it

  • Real data, not memory. Every figure is fetched from INE's API at request time.
  • A guided path. Five tools must be called in order; the server rejects skipped steps and identifiers it never returned.
  • Always sourced. Each result includes the operation, the table, its public URL and the filters applied.
  • Quick. Every step takes several requests at once and resolves them in parallel.

Contents

  • Quick start
  • Installation
    • Hosted server
    • Run locally
    • Connect a client
  • Example questions
  • Available tools
    • Enforced order
  • Available operations
  • Development
  • Troubleshooting
  • Limitations
  • Privacy
  • Data source and attribution
  • Links
  • WIP and disclaimer
    • Work in progress
    • Disclaimer
  • Package maintenance and contributing
  • Licensing

Quick start

  1. Install uv and clone the repository (details).

  2. Register the server in your client, for example with Claude Code:

    claude mcp add ine -- uv run --directory /path/to/ine-mcp ine-mcp
    
  3. Ask a question: "Give me the last four quarterly unemployment rates for men in Murcia."

Installation

Two ways to use the server: the hosted endpoint (available soon) or a local copy running on your machine. The local setup is available today.

Hosted server

Available soon. A public endpoint has not been published yet. Once it is, this section will list the URL and the configuration snippets for each client.

Endpoint Available soon
Transport Streamable HTTP
Authentication None
Run locally

Requirements: Python 3.11 or later, and uv.

git clone https://github.com/es-ine/mcp.git ine-mcp
cd ine-mcp

With uv:

uv sync
uv run ine-mcp

The server starts on the stdio transport and waits for an MCP client. It prints nothing until a client connects; that is expected.

To update an existing clone, run git pull and then uv sync again.

Connect a client

In the snippets below, replace /path/to/ine-mcp with the absolute path of your clone.

Command-line clients (one line)
Client Command
Claude Code claude mcp add ine -- uv run --directory /path/to/ine-mcp ine-mcp
Codex (OpenAI) codex mcp add ine -- uv run --directory /path/to/ine-mcp ine-mcp
VS Code code --add-mcp '{"name":"ine","command":"uv","args":["run","--directory","/path/to/ine-mcp","ine-mcp"]}'
Clients with a JSON file

Most clients read the same block. Paste it into the file for your client and restart it:

{
    "mcpServers": {
        "ine": {
            "command": "uv",
            "args": ["run", "--directory", "/path/to/ine-mcp", "ine-mcp"]
        }
    }
}
Client Configuration file
Claude Desktop (macOS) ~/Library/Application Support/Claude/claude_desktop_config.json
Claude Desktop (Windows) %APPDATA%\Claude\claude_desktop_config.json
Claude Desktop (Microsoft Store) %LOCALAPPDATA%\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\claude_desktop_config.json
Cursor ~/.cursor/mcp.json (global) or .cursor/mcp.json (project)
Windsurf ~/.codeium/windsurf/mcp_config.json
Gemini CLI ~/.gemini/settings.json
Cline, LM Studio and others The client's MCP settings file (same mcpServers block)

Some clients use a different format:

VS Code (.vscode/mcp.json): key servers and a type
{
    "servers": {
        "ine": {
            "type": "stdio",
            "command": "uv",
            "args": ["run", "--directory", "/path/to/ine-mcp", "ine-mcp"]
        }
    }
}
Codex (~/.codex/config.toml): TOML instead of JSON
[mcp_servers.ine]
command = "uv"
args = ["run", "--directory", "/path/to/ine-mcp", "ine-mcp"]

Example questions

  • "What was the CPI rate in Madrid over the last year?"
  • "Find the INE statistical operation for the Labour Force Survey."
  • "Which Labour Force Survey tables break unemployment down by age group or sex?"
  • "Give me the last four quarterly unemployment rates for men in Murcia."
  • "How many people live in each province, according to the latest figures?"

Available tools

The server exposes five read-only tools. They are meant to be called in order, and each one accepts a batch of requests that it resolves in parallel.

Step Tool Description
1 ine_select_operation Searches the catalogue of statistical operations (CPI, Labour Force Survey, GDP…) by name and description.
2 ine_select_multiple_tables Lists the tables of one or more operations, optionally filtered by search terms.
3 ine_select_multiple_table_groups Returns the variables (groups) that structure one or more tables.
4 ine_select_multiple_values Returns the values of the chosen variables, for example, the provinces or the sex categories.
5 ine_select_multiple_table_data Extracts the observations, filtered by tv pairs and a period.

How it uses the tools (simple case):

sequenceDiagram
    participant A as AI assistant
    participant S as INE MCP server
    participant I as INE API

    Note over A,S: Step 1 · find the operation
    A->>S: ine_select_operation("labour force survey")
    S->>I: list operations
    I-->>S: catalogue
    S-->>A: matching operations (operation id)

    Note over A,S: Step 2 · find the table
    A->>S: ine_select_multiple_tables(operation id)
    S->>I: tables of the operation
    S-->>A: candidate tables (table id)

    Note over A,S: Step 3 · understand the table
    A->>S: ine_select_multiple_table_groups(table id)
    S->>I: variables of the table
    S-->>A: variables (group_id)

    Note over A,S: Step 4 · choose the values
    A->>S: ine_select_multiple_values(table id, group_id)
    S->>I: values of the variable
    S-->>A: values (FK_Variable and Id)

    Note over A,S: Step 5 · get the data
    A->>S: ine_select_multiple_table_data(table id, tv filters, period)
    S->>I: table data
    S-->>A: observations + source (table URL, filters, period)

Each step only accepts identifiers returned by the previous ones; if a step is skipped, the server answers BLOCKED.

All five tools are annotated readOnlyHint and openWorldHint. The first four are also marked idempotent.

Enforced order

The sequence is checked in code, and the check cannot be switched off. A call that arrives too early returns an error that starts with BLOCKED, names the missing step and says what to call next.

Step Accepted only if
2 The operation ID or code exists in the operations catalogue.
3 The table was returned by step 2.
4 The table's variables were queried in step 3 and group_id is one of them.
5 Steps 2 to 4 are complete for the table, and every tv filter is well formed and matches a value returned by step 4.

Available operations

The catalogue holds 166 INE statistical operations. 110 already have tables and work end to end; the other 56 are listed and will be usable once INE publishes their tables.

See Resources/Catalogue.md for the complete table of operations available now and coming soon, plus a glossary.

Development

The server is a small package under src/ine_mcp/:

File Role
server.py Entry point (ine-mcp) and transport selection.
tools.py The MCP server instance and the five tools.
state.py Per-session flow state and validation of the five-step order and tv filters.
client.py, cache.py HTTP client for the INE API and in-memory TTL cache.
models.py, utils.py, config.py Input models, response filtering and configuration.

Resources/ine_mcp_instructions.md is the usage guide the server sends to the client; it is bundled into the package.

Run the tests:

uv run pytest

Troubleshooting

Symptom Fix
The server does not appear in the client Check that /path/to/ine-mcp is absolute, then restart the client completely.
An operation returns no tables It is in the coming soon list of Resources.
Empty or failing responses The INE API may be temporarily unavailable; try again later.

Limitations

  • Data depends on the INE public API; availability and response times are INE's.
  • Labels are in Spanish and English, as INE publishes them.
  • Tools are read-only: the server never writes or modifies anything.
  • Only operations with published tables can return data.
  • The hosted endpoint is not available yet; use the local setup.

Privacy

No authentication and no personal data are needed. The server only forwards the queries required to answer your question to the public INE API.

Data source and attribution

The data is published by the Instituto Nacional de Estadística and served through its public JSON API. When you reuse the figures, cite INE as the source and link to the table URL returned with each result.

Links

WIP and disclaimer

Work in progress

This project is currently under active development.

Disclaimer

This repository and its contents are provided for informational and technical purposes only.
Use of this code is at your own risk.

The Instituto Nacional de Estadística (Spanish Statistical Office) provides this software "as is", without warranty of any kind, either expressed or implied.

By using this repository, you acknowledge that:

  • You are responsible for reviewing and testing the code before using it in any production or critical environment.
  • The Instituto Nacional de Estadística is not liable for any direct, indirect, or consequential damages arising from the use of this software.

Package maintenance and contributing

Any contribution is welcome and should be done through pull requests and/or issues. Pull requests should include updated tests and updated documentation. If functionality is changed, docstrings should be added or updated.

Licensing

The code of this project is licensed under the European Union Public Licence v. 1.2 (EUPL-1.2).

Questions about Es Ine

What is the Es Ine MCP server?

MCP server connecting AI assistants to the Spanish National Statistics Institute (INE) public API. Enables access to official demographic, economic and social statistics, making it easy to search, retrieve and analyze reliable data using natural language. Es Ine is maintained by es-ine on GitHub at es-ine/mcp, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Es Ine MCP server?

Es Ine doesn't publish a one-line install in the MCP registry, so follow the setup steps in its README on GitHub (es-ine/mcp). Like most servers, Es Ine ends with a command or URL you paste into your AI app's MCP config.

Does Es Ine need an API key?

The registry lists no required keys for Es Ine. Check the Es Ine README for optional settings, and expect a remote server to ask you to sign in the first time you connect.

Is Es Ine an official MCP server?

No. Es Ine is a community server maintained by es-ine. Community servers can be excellent; read the code and the open issues before you give Es Ine access to company data.

What license is Es Ine under?

Es Ine is released under the EUPL-1.2 license, according to its GitHub repository. The license covers the code of Es Ine; the service it connects to has its own terms.