Skip to main content

Opendata.cat · Open Source · MIT · 2026

Opendata.cat MCP Server

The weapon against black boxes. An open Model Context Protocol (MCP) server that connects any AI with 2,850+ public datasets so you can interrogate reality without filters.

What is the Opendata.cat MCP Server?

The Opendata.cat MCP Server is an open source Model Context Protocol (MCP) server built by Xavier Vinaixa Roselló (xaviviro) from Opendata.cat, the open data promotion association. It is the tool that lets you — not an ideological filter, not a techno-oligarchy — draw your own conclusions from reality.

In practice it is a connector that acts as a base of trusted sources so your AI can interact with the real world without making things up. Any LLM — a fully private local open-weights model or any techno-oligarchy chat (ChatGPT, Claude, Gemini…) — becomes a single window of reliable, real-time data from Catalonia and Spain.

We open the door to 2,850+ datasets from 1,000+ municipalities and state agencies so you can ask the source directly. Inspired by the excellent work of the French government's datagouv-mcp, but designed from the ground up to understand our own reality and territory.

Traceability: the chain of trust

This connector has been designed with an obsessive focus on traceability. When the model answers, it doesn't just give you a number or a result: it traces exactly where that information came from. It builds a robust chain of trust where you can see the specific dataset, its last update, and the originating institution.

This kills data hallucination at the root. The machine can still stumble interpreting data, but having direct access to the source is the best weapon against bad-faith actors. If someone tries to set social media on fire with lies, you can go straight to the raw data and dismantle the fear campaign with the cold implacability of official numbers.

Real-world use cases

This raw data pipeline has enormous everyday value for science, for research of all kinds, and for our everyday sovereignty. Here are some examples you can already ask the chat directly:

> Informed consumption

Which is the cheapest gas station in your city right now? Real-time prices from every gas station in Spain via CNMC.

> Smart laundry

What is the cheapest hour today to run the washing machine based on real electricity market prices (PVPC via REE)?

> Green energy

When in the day is there the highest injection of renewable energy (solar + wind) on the grid to pollute less?

> State of the country

How are the reservoirs doing? Check volume and percentage filled with up-to-date data to understand a drought without middlemen.

> Real-time mobility

Is your Rodalies or FGC train delayed? Delay and alert data updated instantly.

> Emergencies

How many incidents did 112 handle in your town last month? What actions did the Firefighters take?

> Vehicle registrations

How many EVs have been registered in your town? Track the electrification of the vehicle fleet.

> Traffic accidents

Where are the black spots with fatalities or serious injuries in your county according to official data?

> Housing and energy

Energy efficiency certificates for buildings — what's the distribution in your town?

> Population census

How has the population of your town evolved according to the INE? Age pyramids, migration flows.

Connected data sources

The server indexes and queries in real time datasets from the main Catalan and Spanish administrations. All information comes from official open data portals:

  • Generalitat de Catalunya — Transparency Portal, reservoirs, drought, traffic accidents, 112 emergencies, Firefighters, energy certificates
  • Barcelona City Council — Open Data BCN, City Police accidents, mobility, air quality
  • Barcelona Provincial Council — Data from 300+ municipalities in the province
  • AOC Consortium — Shared local-administration open data
  • Municipalities (1,000+) — Open portals across Catalonia and Spain
  • FGC — Real-time train GPS positions, alerts, delays (GTFS-RT)
  • Rodalies / Renfe Barcelona — Real-time trains, delays, alerts
  • INE — Census, EPA (employment/unemployment), tourism and hotel occupancy
  • REE — Spanish Grid Operator — Electricity generation, energy mix, PVPC prices
  • CNMC — Fuel prices at every gas station in Spain
  • Idescat — Catalan statistics, business confidence

How to start today

01 · Recommended path

Sovereign path — Local AI

Install a language model on your own computer and plug in the MCP server. Tested with Qwen3.5 and Gemma, works beautifully. If you've never run local models, Softcatalà has a great guide with models that perform well in Catalan. Once it's running, follow the official setup guide. No data ever leaves your hard drive.

02 · Quick path

Quick path — Claude or ChatGPT

If you prefer convenience, plug the connector into Claude Desktop, Claude Code, VS Code, Cursor or ChatGPT via npm (@opendata.cat/mcp-server). You gain speed, but your queries pass through the techno-oligarchies' servers. Your call.

Technologies

Model Context Protocol (MCP) Node.js / TypeScript npm (@opendata.cat/mcp-server) Open Data (CKAN, Socrata, SPARQL) GTFS-RT (real-time transit) LLM-agnostic (Claude, ChatGPT, Gemini, Qwen, Gemma…) Compatible: Claude Desktop, Claude Code, VS Code, Cursor, ChatGPT Open source (MIT license) Digital sovereignty

Infrastructure for citizen emancipation

We've grown used to an internet where AI hallucinates answers and platforms filter the world to tell us how to understand it. We are delegating our critical capacity to corporate black boxes. Digital resistance begins with regaining control of the raw material: information.

There are very popular websites that take the amount of any public subsidy, contract or budget and turn it into sweet-sounding metrics with biased layers designed to provoke an emotional reaction. If we want collective maturity, we urgently need tools that let us chew on and understand information for ourselves — no tutors, no paternalism, no layers of prejudice. Read the full article on Substack →

Contribute to the project

Public administration is a giant beast, information changes, and we are not infallible. Even though we've already connected thousands of datasets, we're sure some are still missing. If you know a data source, a municipal portal, a study or a public API you think is relevant and we haven't indexed it, open an issue on GitHub or contact Opendata.cat. We want this project to be alive, and we build it together.