4,500+ servers built on MCP Fusion
Vinkius

Ayuntamiento de Barcelona MCP. Query Barcelona's Official City Data via Chat

Claude Claude
ChatGPT ChatGPT
Cursor Cursor
Gemini Gemini
Windsurf Windsurf
VS Code VS Code
JetBrains JetBrains
Vercel Vercel
See Vinkius in Action

Works with every AI agent you already use

…and any MCP-compatible client

Ayuntamiento de Barcelona (CKAN) MCP on Cursor AI Code Editor MCP Client Ayuntamiento de Barcelona (CKAN) MCP on Claude Desktop App MCP Integration Ayuntamiento de Barcelona (CKAN) MCP on OpenAI Agents SDK MCP Compatible Ayuntamiento de Barcelona (CKAN) MCP on Visual Studio Code MCP Extension Client Ayuntamiento de Barcelona (CKAN) MCP on GitHub Copilot AI Agent MCP Integration Ayuntamiento de Barcelona (CKAN) MCP on Google Gemini AI MCP Integration Ayuntamiento de Barcelona (CKAN) MCP on Lovable AI Development MCP Client Ayuntamiento de Barcelona (CKAN) MCP on Mistral AI Agents MCP Compatible Ayuntamiento de Barcelona (CKAN) MCP on Amazon AWS Bedrock MCP Support

Just plug in your AI agents and start using Vinkius.

Ayuntamiento de Barcelona (CKAN) MCP Server connects your AI client to Barcelona’s official Open Data BCN portal. It lets you query urban datasets, environmental records, and public statistics using natural language.

You can discover available datasets, check metadata, and run complex SQL queries directly against city resources.

What your AI agents can do

Bcn current packages

Lists all resources available for a dataset, including format and download links.

Bcn datastore search

Searches and filters specific records within a designated CSV resource.

Bcn datastore search sql

Runs SQL queries directly against a resource, requiring the resource ID to be quoted.

+ 4 more capabilities included
Search and Discover Datasets

Use bcn_package_search to find multiple datasets across the entire Open Data BCN catalog based on keywords.

Run Complex SQL Queries

Execute bcn_datastore_search_sql to run SQL statements directly against a specified data resource, allowing deep, filtered data extraction.

Filter CSV Records

Use bcn_datastore_search to search and filter records inside a specific CSV file resource without writing SQL.

Get Dataset Metadata

Retrieve the full structure and details of any dataset using bcn_package_show.

List Available Resources

See all related resources for a dataset, including download links and format types, using bcn_current_packages.

Supported MCP Clients

Claude Claude
ChatGPT ChatGPT
Cursor Cursor
Gemini Gemini
Windsurf Windsurf
VS Code VS Code
JetBrains JetBrains
Vercel Vercel
+ other MCP clients
Free for Subscribers

Waiting for input…

AI Agent

Ayuntamiento de Barcelona (CKAN) MCP Server: 7 Tools for Data Query

Use these seven tools to search, filter, and extract structured data from Barcelona's official public datasets using your AI client.

bcn019e3868

bcn current packages

Lists all resources available for a dataset, including format and download links.

bcn019e3868

bcn datastore search

Searches and filters specific records within a designated CSV resource.

bcn019e3868

bcn datastore search sql

Runs SQL queries directly against a resource, requiring the resource ID to be quoted.

bcn019e3868

bcn package list

Lists every dataset name available in the Open Data BCN catalogue.

bcn019e3868

bcn package search

Searches the Open Data BCN catalogue for datasets matching specific criteria.

bcn019e3868

bcn package show

Retrieves the detailed metadata and structure for a specific dataset.

bcn019e3868

bcn resource show

Gets the metadata for a specific data resource, detailing its format and usage.

Choose How to Get Started

Build a custom MCP for your own tools, or connect a ready-made integration from our catalog.

Build Your Own

Turn any API into an MCP. Import a spec, define Agent Skills, or deploy with MCPFusion.

  • Import from OpenAPI, Swagger, or YAML specs
  • Create Agent Skills with progressive disclosure
  • Deploy to edge with MCPFusion framework
  • Built in DLP, auth, and compliance on every call
  • Real time usage dashboard and cost metering
  • Publish to catalog or keep private
Start building

Make Your AI Do More

Start with Ayuntamiento de Barcelona (CKAN), then connect any of our 4,700+ other servers whenever your AI needs more. One click, no limits.

  • Use this MCP plus 4,700+ others, all in one place
  • Add new capabilities to your AI anytime you want
  • Every connection is secured and compliant automatically
  • Track usage and costs across all your servers
  • Works with Claude, ChatGPT, Cursor, and more
  • New servers added to the catalog every week

What you can do with this MCP connector

Your AI client connects to Ayuntamiento de Barcelona (Open Data BCN), letting you pull public data straight from the city. You can use natural language to find, inspect, and query Barcelona's official datasets. You'll find seven tools here to get exactly what you need.

To find data, use bcn_package_search to search the Open Data BCN catalog for datasets matching keywords, or use bcn_package_list to see every dataset name available.

To understand a specific dataset, you can pull the full structure and details using bcn_package_show. You can also get metadata for a specific data resource, including its format and usage, with bcn_resource_show. If you know all the resources for a dataset, bcn_current_packages lists them, giving you download links and format types.

When you're ready to pull data, you've got options. You can search and filter records inside a specific CSV file resource using bcn_datastore_search—you don't need to write SQL for that. If you need something more specific, bcn_datastore_search_sql lets you run SQL statements directly against a resource, provided you quote the resource ID.

For quick looks at all available resources, bcn_package_list shows you everything available.

How Ayuntamiento de Barcelona MCP Works

  1. 1 Subscribe to this server and provide your Open Data BCN API Token (optional for public data, required for high usage).
  2. 2 Tell your AI client what data you need (e.g., 'Find all datasets related to public WiFi in Barcelona').
  3. 3 Your AI client calls the appropriate tool (like bcn_package_search), and the result—filtered records, metadata, or a count—is returned to you in natural language.

The bottom line is, you ask your AI client a question in plain English, and it runs the necessary API calls to pull the data from Barcelona’s official sources.

Who Is Ayuntamiento de Barcelona MCP For?

This server is for data analysts, researchers, and urban planners who need real-time access to official city records. If you're tired of manually downloading CSVs and running them through local scripts, this is for you. It lets you ask complex questions about city infrastructure and demographics using simple chat commands.

Data Analyst

Quickly fetching, filtering, and comparing urban data—like traffic accident counts or demographic changes—without ever leaving the chat interface.

Urban Planner

Accessing real-time statistics on city services, public WiFi hotspots, and environmental records to inform infrastructure decisions.

Researcher

Systematically gathering and structuring data from multiple public sources (e.g., correlating weather station data with municipal market locations).

What Changes When You Connect

  • Stop manually downloading and cleaning data. Use bcn_datastore_search to filter records inside a CSV resource directly via your AI agent. You get the filtered table right in the chat.
  • Deep dive into city data with SQL. bcn_datastore_search_sql lets you run complex queries (like counting accident records) without writing boilerplate code, only specifying the table name.
  • Quickly find relevant data. Use bcn_package_search to search the entire Open Data BCN catalogue for topics like 'transportation' or 'environment' and get a list of matching datasets.
  • Understand data structure instantly. bcn_package_show pulls all the metadata for a dataset, so you know exactly what fields are available and how often the data updates.
  • See all data options at once. bcn_current_packages lists every resource associated with a dataset, showing you if it's available as CSV, JSON, or another format.

Real-World Use Cases

01

Calculating Traffic Accident Totals

A researcher needs to know the total number of traffic accidents in 2023. Instead of downloading the large '2023-accidents-gu-bcn' file and running a count in Excel, they ask their agent to 'Count all records in the 2023 accident dataset.' The agent uses bcn_datastore_search_sql and returns the exact count (e.g., 8,452) immediately.

02

Finding Public WiFi Hotspots

A developer wants to map all public WiFi access points. They use bcn_package_search to find 'wifi' datasets. The agent identifies 'punts-wifi', showing the developer that the data is available in CSV, JSON, and KML formats, letting them choose the right format for their application.

03

Checking Data Availability

An urban planner needs to know if a specific dataset on tree zones (arbrat-zona) has resource links. They ask the agent, and the agent calls bcn_current_packages, listing all associated resources and confirming the available download formats.

04

Comparing City Services

A student wants to compare the locations of municipal markets and weather stations. They use bcn_package_search to pull both 'mercats-municipals' and 'estacions-meteorologiques', then use bcn_package_show to verify that both datasets have comparable geographic metadata.

The Tradeoffs

Trying to download everything at once

The user tries to download all 50 datasets listed in the catalog, leading to massive data dumps and unclear usage. They end up with a folder full of unparsed files.

Instead, use bcn_package_search to narrow your scope (e.g., 'environment'). Then, use bcn_package_show to vet the dataset before pulling specific resources with bcn_current_packages.

Assuming data is in a simple CSV format

The user assumes all city data is a simple CSV and tries to run a basic filter, but the resource is actually structured JSON or requires a specific SQL syntax.

Always check the metadata first. Use bcn_resource_show or bcn_package_show to confirm the resource type and the required querying method before running any filters.

Running vague queries without resource IDs

The user just asks, 'Show me accident data.' The agent can't run the query because it doesn't know the specific data file or resource ID required for the bcn_datastore_search_sql tool.

First, use bcn_package_search to find the correct dataset name. Then, use bcn_resource_show to get the specific resource ID, and finally, execute the query with bcn_datastore_search_sql.

When It Fits, When It Doesn't

Use this server if your workflow requires deep, structured data extraction from official, established public data sources. You need to query specific fields, count records, or compare metadata across multiple city topics. This is ideal for data analysts and researchers who need reliable, structured inputs.

Don't use this if you just need a general overview of city data—start with bcn_package_search to explore. Also, don't use it if your data is unstructured or requires image recognition; this server only handles structured records and metadata. If you only need a simple list of datasets, bcn_package_list works, but if you need details, you must use bcn_package_show.

Independent Platform Disclaimer: Vinkius is an independent platform and is not affiliated with, endorsed by, sponsored by, verified by, or otherwise authorized by Open Data BCN. All third-party trademarks, logos, and brand names are the property of their respective owners. Their use on this website is strictly for informational purposes to identify service compatibility and interoperability.

VINKIUS INFRASTRUCTURE

Cloud Hosted

Managed infra

V8 Isolated

Sandboxed per request

Zero-Trust Proxy

No stored credentials

DLP Enforced

Policy on every call

GDPR Compliant

EU data residency

Token Compression

~60% cost reduction

How we secure it →

Works with Claude, ChatGPT, Cursor, and more

The Model Context Protocol standardizes how applications expose capabilities to LLMs. Instead of operating in isolation, your AI gains direct access to external platforms, live data, and real-world actions through secure, standardized connections.

This server provides 7 capabilities that interface natively with Claude, ChatGPT, Cursor, and any MCP client. No middleware. No custom integration required.

Available Capabilities

bcn_current_packages bcn_datastore_search bcn_datastore_search_sql bcn_package_list bcn_package_search bcn_package_show bcn_resource_show

Manually gathering city statistics takes hours of clicking.

Today, getting data means navigating the Open Data BCN portal. You click into a topic, find a dataset, then click a resource, maybe download a CSV, and finally open it in a spreadsheet to count rows or filter dates. This manual process is slow, error-prone, and stops you from analyzing anything before lunch.

With the Ayuntamiento de Barcelona (CKAN) MCP Server, you skip the clicking. You tell your agent exactly what you need—'How many public WiFi spots are in the Eixample district?'—and the agent uses the right tools (`bcn_datastore_search_sql`) to run the query and return the answer directly, instantly.

Ayuntamiento de Barcelona (CKAN) MCP Server: Query city data with precision.

Before, figuring out which fields were available or what the data structure was meant tedious cross-referencing between the dataset description and the resource metadata. You'd spend time just verifying the column names.

Now, you just ask the agent to check the metadata. The agent calls `bcn_package_show` or `bcn_resource_show`, and you get the full data blueprint instantly. It's about getting the data structure—not just the data—right, fast.

Common Questions About Ayuntamiento de Barcelona MCP

How do I use bcn_package_search in Ayuntamiento de Barcelona (CKAN) MCP Server? +

You tell your agent what you're looking for, and it uses bcn_package_search to look across the entire Open Data BCN catalogue. It returns a list of datasets that match your keywords, like 'transportation' or 'environment'.

What is the difference between bcn_datastore_search and bcn_datastore_search_sql? +

Use bcn_datastore_search when you just need to filter simple records within a CSV file. Use bcn_datastore_search_sql when you need to run complex, structured queries (like COUNT or JOIN operations) against the data resource.

Do I need an API token for Ayuntamiento de Barcelona (CKAN) MCP Server? +

The token is optional for accessing basic public data, but you'll need it if you're doing high-volume querying or hitting rate limits.

How do I find out what data is available for a specific dataset? +

You can use bcn_package_show to get the general metadata for the dataset, or use bcn_current_packages to list all the specific resources (like CSV or JSON) that dataset contains.

How do I use bcn_package_show to get detailed information about a dataset? +

The bcn_package_show tool retrieves all metadata for a specific dataset. You input the dataset ID, and the tool returns the full description, associated resources, and update history. This helps you understand the data structure before you query it.

What is the purpose of bcn_resource_show, and how does it work? +

The bcn_resource_show tool provides granular metadata for individual data resources. You give it a resource ID, and it tells you the format (CSV, JSON, etc.), the column names, and the size. This is key for planning complex queries.

Can I use bcn_datastore_search_sql for complex filtering on multiple resources? +

No, bcn_datastore_search_sql executes SQL queries against a single, specified resource ID. You must wrap the resource ID in double quotes in your query. If you need multiple resources, you'll need to run separate queries.

What should I do if a query using bcn_datastore_search fails? +

If a query fails, check your resource ID and ensure the data type you are filtering on is correct. You might also hit a rate limit, in which case you'll need to wait or provide an API token.

Can I perform SQL queries on Barcelona's public datasets? +

Yes, you can use the bcn_datastore_search_sql tool to execute SELECT statements directly against any resource that is stored in the portal's datastore.

How do I find datasets related to a specific topic like 'transport'? +

Use the bcn_package_search tool with the query parameter q set to your topic. You can also limit the number of results for faster browsing.

Is it possible to see the actual rows of a CSV file without downloading it? +

Absolutely. The bcn_datastore_search tool allows you to query and preview the contents of a resource directly, including filtering and sorting options.

More in this category

You might also like

Built & Managed by Vinkius 30s setup 7 tools

We've already built the connector for Ayuntamiento de Barcelona. Just plug in your AI agents and start using Vinkius.

No hosting. No infrastructure. No complex setup.
All 7 tools are live and waiting. You're up and running in seconds.

Claude Claude
ChatGPT ChatGPT
Cursor Cursor
Gemini Gemini
Windsurf Windsurf
VS Code VS Code
JetBrains JetBrains
Vercel Vercel
+ other MCP clients

Vinkius gives your AI agents access to the full catalog of app connectors, all fully managed, secure, and enterprise-ready. One subscription, every tool you need.

Zero hosting required Full MCP catalog included Enterprise-grade security Auto-updated by Vinkius

Built, hosted, and secured by Vinkius. You just connect and go.