Osegi
AI·2 min read

INE MCP server lets AI agents query Spain's official statistics

Spain's statistics office has released an MCP server so AI agents can pull its data directly. A test produced an unemployment chart in about eight minutes.

A laptop screen showing a line chart comparing unemployment and inflation in Spain, generated by an AI agent from official statistics data.
Image: xataka.com

Spain's national statistics institute, the INE, has built an MCP server so AI agents can dig through its data for you. Anyone who has fought with the INE website menus will see the appeal.

MCP stands for Model Context Protocol, a standard way of plugging tools and data sources into AI agents. The INE's version connects an agent to its public JSON API. Once it is set up, you just ask for what you need, such as how Spain's population has changed over the last 40 years, and the agent finds the figures and presents them the way you want. Doing that by hand on the website would mean several minutes of clicking through menus.

For now it only works if you install it locally. The INE plans to launch its own hosted server in the coming days, so nothing will need installing.

How well does the INE MCP work?

A journalist at Xataka's team tested it by asking Google's Antigravity, an AI-powered coding environment, to install the server. That took about ten minutes, and the server ended up as a native skill in the tool. A request for demographic data with a visual summary came back after five minutes.

A harder one followed: compare unemployment and inflation (the CPI) since 2019 and draw a chart. That mixes different metrics and tables, which is painful on the website. It took about eight minutes of querying, comparing and charting, and it worked.

What are the limits?

Two caveats. Today you need to be comfortable with Python and the terminal, or have an agent that is, as was the case here. And AI is still AI: each answer links to a table, and it is worth opening it to check the figure matches. In the tests it did, though they were not especially demanding.

The INE dates back to 1945 but inherits official statistics from the mid-19th century, and the first modern census is from 1857. That is a lot of data. Once the remote server arrives and adding a connector is enough, searching it should get much less painful, at least for people who know what to ask.

Apps worth a look

SUMO: the number puzzle

Tap the right tiles, add them up, hit the target. Easy to learn, hard to master. Free, for all ages.

Tags:inemcpai agentsspainopen dataantigravity

More from this day

See all →

More in: AI

See all →