CKAN MCP Server
MCP server for querying CKAN open data portals worldwide, with dataset search, DataStore SQL, organizations, groups, tags, SPARQL, and quality metrics.
CKAN MCP Server is a Model Context Protocol server that gives AI assistants natural language access to CKAN-based open data portals. CKAN is the open-source platform behind most government and institutional open data catalogs worldwide, including data.gov (US), open.canada.ca, dati.gov.it (Italy), and roughly 950 other portals. The server removes the need to know each portal's structure, API conventions, or Solr query syntax: you connect an MCP client and ask for the data you need in plain language.
The server exposes tools across several categories: package search and discovery, organization and group browsing, DataStore queries (including SQL on tabular resources), SPARQL endpoint querying, MQA quality metrics (for the Italian portal), and worldwide portal discovery. It also provides MCP Resource Templates via a ckan:// URI scheme for direct access to datasets, resources, organizations, groups, and tags. The server is read-only and works with any CKAN 2.8+ portal without authentication.
It is maintained by the onData association (the npm package is published as @aborruso/ckan-mcp-server) and is available either as a self-hosted Node.js/Docker install or via a hosted Cloudflare Workers endpoint with a shared 100k requests/day quota. The project targets journalists, researchers, public servants, and data engineers who work with open data catalogs.
Tools
| Tool | Description |
|---|---|
ckan_package_search |
Search datasets in a CKAN portal using Solr query syntax. |
ckan_find_relevant_datasets |
Relevance-ranked dataset discovery against a portal. |
ckan_package_show |
Retrieve full metadata for a single dataset by ID or name. |
ckan_tag_list |
List tags available on a portal with frequency counts. |
ckan_organization_list |
List organizations on a portal. |
ckan_organization_show |
Show details for a specific organization. |
ckan_organization_search |
Search organizations by name or description. |
ckan_group_list |
List groups (thematic categories) on a portal. |
ckan_group_show |
Show details for a specific group. |
ckan_group_search |
Search groups by name or description. |
ckan_datastore_search |
Query rows from a DataStore-enabled tabular resource. |
ckan_datastore_search_sql |
Run SQL queries against DataStore-enabled resources. |
ckan_get_mqa_quality |
Get MQA (Metadata Quality Assessment) scores for Italian portal datasets. |
ckan_get_mqa_quality_details |
Get detailed MQA quality breakdown for a dataset. |
ckan_find_portals |
Discover CKAN portals worldwide from a registry of around 950 catalogs. |
ckan_analyze_datasets |
Run analytical summaries across a portal's datasets. |
ckan_catalog_stats |
Return catalog-level statistics for a CKAN portal. |
sparql_query |
Execute a SPARQL query against a portal's SPARQL endpoint. |
ckan_status_show |
Verify the status and version of a CKAN portal. |
Option A: Hosted endpoint (no install)
Point your MCP client at the hosted Cloudflare Workers endpoint. Shared rate limit is 100k requests/day.
{
"mcpServers": {
"ckan": {
"url": "https://ckan-mcp-server.andy-pr.workers.dev/mcp"
}
}
}
Option B: Local install via npm
npm install -g @aborruso/ckan-mcp-server
Then configure your MCP client to launch the binary. For Claude Desktop edit claude_desktop_config.json:
{
"mcpServers": {
"ckan": {
"command": "npx",
"args": ["-y", "@aborruso/ckan-mcp-server"]
}
}
}
Option C: Docker
git clone https://github.com/ondata/ckan-mcp-server
cd ckan-mcp-server
docker compose up --build -d
Config file locations
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
Prerequisites
- An MCP-compatible client (Claude Desktop, Cursor, VS Code, Claude Code, Gemini CLI, Codex CLI, etc.)
- A web-accessible CKAN portal URL (any CKAN 2.8+ instance)
- No API key or authentication required (the server is read-only)
- Investigative journalism: search government open data portals for budget, procurement, or environmental datasets and pull tabular records via DataStore SQL.
- Academic research: discover relevant datasets across hundreds of CKAN portals worldwide using
ckan_find_portalsandckan_find_relevant_datasets. - Data engineering: prototype data pipelines by exploring resource metadata, schemas, and sample rows before committing to ingestion.
- Public sector auditing: assess metadata quality on the Italian national portal using MQA scoring tools.
- Linked data exploration: run SPARQL queries against portal endpoints to join CKAN metadata with external knowledge graphs.
- "Find datasets about air quality on data.gov and show me the most recently updated one."
- "Run a SQL query on this DataStore resource to count rows by region and year."
- "List all organizations publishing data on dati.gov.it that have 'ambiente' in their name."
- "Discover CKAN portals in Spain and tell me which ones publish transport datasets."
- "Show the MQA quality details for the dataset with ID
popolazione-residente-italia."
- Wide coverage of CKAN capabilities: search, DataStore SQL, SPARQL, organizations, groups, tags, and quality metrics.
- Available as a hosted endpoint with no install or auth required, plus npm and Docker options for self-hosting.
- Works against any CKAN 2.8+ portal and ships with a registry of around 950 known portals for discovery.
- MIT licensed and actively maintained by the onData open data association.
- Read-only: the server does not implement write operations such as creating or updating datasets.
- MQA quality tools are specific to the Italian national portal and do not generalize to other CKAN instances.
- A past security advisory (GHSA-3xm7-qw7j-qc8v) flagged SSRF via the
base_urlparameter; self-hosters should pin to a patched version and restrict outbound network access.
- ondics/ckan-mcp-server: Python-based CKAN MCP server with optional API key support for authenticated endpoints.
- aviveldan/datagov-mcp: MCP server specifically targeting the US data.gov catalog.
- malkreide/zurich-opendata-mcp: MCP server for the City of Zurich open data portal with CKAN plus geodata and SPARQL tools.