• SEARCH
  • DETAILS
  • FILTER
  • HUMAN

How to find Barcelona open data with your AI

Connect the Ayuntamiento de Barcelona (CKAN) MCP to your AI client. Once connected, you can query the city's data catalog using plain English.

Ask AI about this page

Short answer

How can I search Barcelona's open data using my AI?

You can use natural language to query the entire BCN catalog. Your AI identifies relevant datasets and pulls their technical metadata for you. This breakdown shows how the search and retrieval process works.

The outcomes

What you get from your AI

The AI turns your questions into precise database queries.

SEARCH

Dataset discovery

The AI scans the city's catalog to find datasets that match your specific topics. You get a list of matching files and resources.

DETAILS

Metadata access

The AI pulls technical details like file formats and update frequencies. You see the data's context without browsing the web portal.

FILTER

Natural language filtering

Instead of clicking through complex web menus, just tell your AI what you need. It handles the logic of narrowing down results.

HUMAN

Final data selection

The AI finds the data, but you decide if it's actually useful. You remain the final judge of the information's relevance.

The workflow

What your AI does when you ask a question.

The AI acts as a bridge between your chat interface and the city's CKAN database.

  1. Find datasets

    The AI translates your request into a search query to find matching packages in the Barcelona catalog.

    bcn_package_search
  2. Retrieve metadata

    After finding a match, the AI pulls the full technical profile of that specific dataset.

    bcn_package_show
  3. Refine the search

    If the first search is too broad, the AI uses the search tool again with more specific parameters.

    bcn_package_search
  4. Present results

    The AI summarizes the dataset names and available formats in a clear list for you.

    bcn_package_show

Try it

Copy these to start.

Use these prompts to begin interacting with the Barcelona catalog.

Starting points

Swap out the bracketed topics for whatever you are actually looking for, like 'transportation' or 'weather'.

Open Data BCN Connector

You're all set. Choose your MCP client and follow the setup instructions.

Connector linkhttps://edge.vinkius.com/vk_preview_iv5GYpi3FqmjfmjJOIvg9apgeu4Cf7aNs3ZIC6cs/mcp

Claude Desktop

Follow the steps below to connect in seconds.

  1. 1In Claude Desktop, open Settings → Connectors.
  2. 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
  3. 3Click Add and start a new chat — Open Data BCN capabilities are ready to use.
Configuration · claude_desktop_config.jsonCopy
{
  "mcpServers": {
    "ayuntamiento-de-barcelona-ckan-mcp": {
      "url": "https://edge.vinkius.com/vk_preview_iv5GYpi3FqmjfmjJOIvg9apgeu4Cf7aNs3ZIC6cs/mcp"
    }
  }
}
Copy into chat04
  • Find all datasets related to public transport in Barcelona.

  • Show me the metadata for the dataset about city air quality.

  • Search for datasets containing information about local schools.

  • List the most recent datasets uploaded regarding urban gardening.

  • Claude
  • ChatGPT
  • Cursor
  • VS Code
  • Windsurf
  • Claude Code
  • JetBrains
  • Cline

Start here

Connect Ayuntamiento de Barcelona (CKAN) once, then ask.

Click the link below to link this MCP to your client. Your credentials stay encrypted and secure, and you can immediately start querying the city's data.

Connect Ayuntamiento de Barcelona (CKAN) to your AI

FAQ

How the search behaves

  • 01

    Can the AI download the actual CSV files for me?

    No. The AI can find the datasets and provide the metadata and download links, but you must download the files yourself.

  • 02

    Can I use this to change or delete data in the city catalog?

    No. This MCP is read-only. It can only search and retrieve information from the public catalog.

  • 03

    Does the AI know about datasets added yesterday?

    Yes, as long as they have been indexed in the official Barcelona Open Data CKAN catalog.

  • 04

    Can the AI filter by specific file formats like JSON?

    Yes, you can simply ask your AI to find datasets that are available in JSON format.

  • 05

    Can the AI create new datasets for the city?

    No. The tools only allow for searching and viewing existing public data.

  • More questions about Ayuntamiento de Barcelona (CKAN)? The Connector page answers them. See everything the Ayuntamiento de Barcelona (CKAN) Connector can do

Connect Open Data BCN to Claude, Cursor, ChatGPT & more