AgentStack
MCP verified MIT Self-run

Ckan Mcp Server

mcp-ondata-ckan-mcp-server · by ondata

MCP server for querying CKAN open data portals (package search, DataStore SQL, organizations, groups, tags)

No reviews yet
0 installs
14 views
0.0% view→install

Install

$ agentstack add mcp-ondata-ckan-mcp-server

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access Used
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

Are you the author of Ckan Mcp Server? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

[](https://www.npmjs.com/package/@aborruso/ckan-mcp-server) [](https://github.com/ondata/ckan-mcp-server) [](https://deepwiki.com/ondata/ckan-mcp-server) [](https://opensource.org/licenses/MIT) [](https://ondata.substack.com/)

CKAN MCP Server

Turn any (CKAN) open data portal into a conversation.

Give your AI assistant direct access to any CKAN open data portal — search datasets, explore organizations, query tabular data, and read metadata, all through natural language.

CKAN is the open-source platform behind most public open data portals worldwide (Italy's dati.gov.it, the US data.gov, Canada's open.canada.ca, and many more). Navigating these portals usually requires knowing their structure, APIs, and search syntax. This MCP server removes that barrier: once connected, your AI tool can do it all for you.

This is possible because of open standards and open source. CKAN exposes a fully documented, public API. Metadata follows DCAT, an open W3C standard for describing datasets. Both are free to use, free to build on, and maintained by open communities. This server stands on that foundation.

Who is this for? Everyone. Journalists looking for data to verify a story. Researchers exploring public datasets. Public servants checking what data their administration publishes. Developers building data pipelines. No CKAN knowledge required.

> Adopted by AgID — This project has been reused by AgID, Italy's Agency for Digital Italy, as part of its effort to make public open data more accessible, immediate, and easier to consult through AI.

Two ways to use it — pick the one that suits you:

| | Option A: Install locally | Option B: No install | |---|---|---| | How | npm install -g @aborruso/ckan-mcp-server | Point your tool to the hosted HTTP endpoint | | Best for | Runs on your machine, works with any local tool | Quick start, zero setup | | Limits | None | 100k requests/day shared quota |

Hosted endpoint: https://ckan-mcp-server.andy-pr.workers.dev/mcp

> Recommendation: Option B is a great way to get started and try things out without any setup. Once you're familiar with what the server can do, switching to Option A (local install) gives you unlimited usage with no shared quotas.

👉 Want to explore the codebase? The AI-generated DeepWiki is a great starting point.

License: MIT — see [LICENSE](LICENSE) for complete details. Third-party notices: [NOTICE.md](NOTICE.md).


🔌 Use it in your favorite tool

[ChatGPT](#chatgpt) | [Claude Desktop](#claude-desktop) | [Claude Code](#claude-code) | [Le Chat (Mistral)](#le-chat-mistral) | [Perplexity Pro](#perplexity-pro) | [Gemini CLI](#gemini-cli) | [VS Code](#vs-code) | [Codex CLI](#codex-cli)

This server works with any MCP-compatible client. The sections below cover some of the most popular ones — if your tool isn't listed, check its documentation for MCP configuration and use the same endpoint URL or command.

All examples below work with both the local installation and the hosted endpoint. Where both options differ, both are shown.

> Using local installation? You need to install the server first — see [Run locally](#run-locally).

ChatGPT

> Requires a ChatGPT Plus, Team, or Enterprise plan.

  1. Open the profile menu and go to Settings → Apps → Advanced settings
  2. Enable Developer mode
  3. Click Create app (top-right)
  4. Fill in the form:
  • Name: CKAN MCP Server
  • Description: Search datasets on CKAN open data portals
  • MCP Server URL: https://ckan-mcp-server.andy-pr.workers.dev/mcp
  • Authentication: No Auth
  • Check the confirmation box, then click Create
  1. In a new chat, click +More and select CKAN MCP Server

> For a step-by-step walkthrough with screenshots, see the full ChatGPT guide.

Claude Desktop

Using the hosted endpoint (no install) — via connector UI:

  1. Open Claude Desktop and go to Settings → Integrations
  2. Click Add custom integration
  3. Fill in the details:
  • Name: CKAN MCP Server
  • MCP Server URL: https://ckan-mcp-server.andy-pr.workers.dev/mcp
  1. Click Add to save
  2. Open a new chat, click +, select Integrations, and enable CKAN MCP Server
  3. When Claude asks to use a tool, click Allow (or Always allow)

> For a detailed walkthrough with screenshots, see the full Claude guide.

Using the hosted endpoint (no install) — via config file:

Configuration file location:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "ckan": {
      "url": "https://ckan-mcp-server.andy-pr.workers.dev/mcp"
    }
  }
}

Using local installation:

{
  "mcpServers": {
    "ckan": {
      "command": "npx",
      "args": ["@aborruso/ckan-mcp-server@latest"]
    }
  }
}

Claude Code

Using the hosted endpoint (no install):

claude mcp add -s user -t http ckan https://ckan-mcp-server.andy-pr.workers.dev/mcp

Using local installation:

claude mcp add -s user ckan npx @aborruso/ckan-mcp-server@latest

> --scope user makes the server available globally across all your projects, not just the current one.

To add it only for a specific project, run from the project folder without the --scope user flag:

claude mcp add --transport http ckan https://ckan-mcp-server.andy-pr.workers.dev/mcp

Le Chat (Mistral)

  1. In the left sidebar, click Intelligence, then select Connectors
  2. Click + Add Connector
  3. Select the Custom MCP Connector tab and fill in the details:
  • Name: CKAN
  • Connector Server: https://ckan-mcp-server.andy-pr.workers.dev/mcp
  1. Click Connect to save
  2. Open a new chat, click +, then Connectors, and enable CKAN

> For a step-by-step walkthrough with screenshots, see the full Le Chat guide.

Perplexity Pro

> Requires a Perplexity Pro account.

  1. Click the "+" (Attach) icon in the message input bar and select Connectors & sources
  2. Click Connect external app
  3. Fill in the details:
  • Name: CKAN MCP Server
  • MCP Server URL: https://ckan-mcp-server.andy-pr.workers.dev/mcp
  • Authorization Type: No Authentication
  • Connection Type: HTTP Streamable
  1. Check the confirmation box and click Save
  2. In a new chat, click +Connectors & sources and enable ckanmcpserver

> For a step-by-step walkthrough with screenshots, see the full Perplexity guide.

Gemini CLI

gemini mcp add -s user -t http ckan https://ckan-mcp-server.andy-pr.workers.dev/mcp

Or add manually to ~/.gemini/settings.json:

{
  "mcpServers": {
    "ckan": {
      "httpUrl": "https://ckan-mcp-server.andy-pr.workers.dev/mcp"
    }
  }
}

VS Code

Add to your User Settings or .vscode/settings.json:

Using the hosted endpoint (no install):

{
  "mcpServers": {
    "ckan": {
      "url": "https://ckan-mcp-server.andy-pr.workers.dev/mcp",
      "type": "http"
    }
  }
}

Using local installation:

{
  "mcpServers": {
    "ckan": {
      "command": "npx",
      "args": ["@aborruso/ckan-mcp-server@latest"]
    }
  }
}

Codex CLI

Add to ~/.codex/config.toml:

Using the hosted endpoint (no install):

[mcp_servers.ckan]
url = "https://ckan-mcp-server.andy-pr.workers.dev/mcp"

Using local installation:

[mcp_servers.ckan]
command = "npx"
args = ["-y", "@aborruso/ckan-mcp-server@latest"]

🖥️ Run locally

Option 1 — Install via npm

The quickest way. Install the package globally and it's immediately available as a command:

npm install -g @aborruso/ckan-mcp-server

The server will be available as ckan-mcp-server, or you can run it without installing via:

npx @aborruso/ckan-mcp-server@latest

Option 2 — Clone and build

For development or if you want to run the latest unreleased code:

git clone https://github.com/ondata/ckan-mcp-server.git
cd ckan-mcp-server
npm install
npm run build
node dist/index.js

Option 3 — Docker

Thanks to @piersoft, you can also run the server via Docker:

git clone https://github.com/ondata/ckan-mcp-server.git
cd ckan-mcp-server
docker compose up --build -d

The MCP server will be available at http://localhost:3000/mcp. See docker/README.md for full details, including how to connect Claude Desktop to the container.


🛠️ Available Tools

Search and Discovery

  • ckanpackagesearch: Search datasets with Solr queries
  • ckanfindrelevant_datasets: Rank datasets by relevance score
  • ckanpackageshow: Complete details of a dataset
  • ckantaglist: List tags with counts

Organizations

  • ckanorganizationlist: List all organizations
  • ckanorganizationshow: Details of an organization
  • ckanorganizationsearch: Search organizations by name

Groups

  • ckangrouplist: List groups
  • ckangroupshow: Show group details
  • ckangroupsearch: Search groups by name

DataStore

  • ckandatastoresearch: Query tabular data
  • ckandatastoresearch_sql: SQL queries on DataStore

Quality Metrics

  • ckangetmqa_quality: Get MQA quality score and metrics for dati.gov.it datasets (accessibility, reusability, interoperability, findability)
  • ckangetmqaqualitydetails: Get detailed MQA quality reasons and failing flags for dati.gov.it datasets

Portal Discovery

  • ckanfindportals: Discover CKAN portals worldwide by country, language, or topic (uses datashades.info live registry of ~950 portals)

Catalog Analysis

  • ckananalyzedatasets: Search datasets and inspect DataStore schemas of queryable resources
  • ckancatalogstats: Statistical overview of a portal (totals, breakdown by category, format, organization)

SPARQL

  • sparql_query: Execute SPARQL SELECT queries against any public SPARQL endpoint

Utilities

  • ckanstatusshow: Verify server status

📎 MCP Resource Templates

Direct data access via ckan:// URI scheme:

  • ckan://{server}/dataset/{id} - Dataset metadata
  • ckan://{server}/resource/{id} - Resource metadata and download URL
  • ckan://{server}/organization/{name} - Organization details
  • ckan://{server}/group/{name}/datasets - Datasets by group (theme)
  • ckan://{server}/organization/{name}/datasets - Datasets by organization
  • ckan://{server}/tag/{name}/datasets - Datasets by tag
  • ckan://{server}/format/{format}/datasets - Datasets by resource format (resformat + distributionformat)

Examples:

ckan://dati.gov.it/dataset/vaccini-covid
ckan://demo.ckan.org/resource/abc-123
ckan://data.gov/organization/sample-org
ckan://dati.gov.it/group/ambiente/datasets
ckan://dati.gov.it/organization/regione-toscana/datasets
ckan://dati.gov.it/tag/turismo/datasets
ckan://dati.gov.it/format/csv/datasets

💡 Usage Examples

A natural language conversation

Once connected, just ask in plain language. No query syntax needed:

> "Search dati.gov.it for datasets about air quality in Milan, then summarize what each contains — time coverage, license, and best download format."

The server finds 31 datasets, groups them by structural pattern, and returns a clear summary — including series names, years covered, publisher, and format. No CKAN knowledge required.


The examples below show natural language requests alongside the actual tool call the LLM will generate internally and send to the CKAN portal. You never write these queries yourself — they are shown here to illustrate how your question gets translated under the hood.

Search datasets (natural language: "search for population datasets")

ckan_package_search({
  server_url: "https://www.dati.gov.it/opendata",
  q: "popolazione",
  rows: 20
})

Force text-field parser for long OR queries (natural language: "find hotel or accommodation datasets")

ckan_package_search({
  server_url: "https://www.dati.gov.it/opendata",
  q: "hotel OR alberghi OR \"strutture ricettive\" OR ospitalità OR ricettività",
  query_parser: "text",
  rows: 0  // returns only the total count, no dataset records — useful to check how many results match before fetching them
})

Note: when query_parser: "text" is used, Solr special characters in the query are escaped automatically.

Rank datasets by relevance (natural language: "find most relevant datasets about urban mobility")

ckan_find_relevant_datasets({
  server_url: "https://www.dati.gov.it/opendata",
  query: "mobilità urbana",
  limit: 5
})

Filter by organization (natural language: "show recent datasets from Tuscany Region")

ckan_package_search({
  server_url: "https://www.dati.gov.it/opendata",
  fq: "organization:regione-toscana",
  sort: "metadata_modified desc"
})

Get statistics with faceting (natural language: "show statistics by organization, tags and format")

ckan_package_search({
  server_url: "https://www.dati.gov.it/opendata",
  facet_field: ["organization", "tags", "res_format"],
  rows: 0  // skip dataset records, return only the facet counts
})

List tags (natural language: "show top tags about health")

ckan_tag_list({
  server_url: "https://www.dati.gov.it/opendata",
  tag_query: "salute",
  limit: 25
})

Search groups (natural language: "find groups about environment")

ckan_group_search({
  server_url: "https://www.dati.gov.it/opendata",
  pattern: "ambiente"
})

DataStore Query (natural language: "query tabular data filtering by region and year")

> What is DataStore? CKAN DataStore is an optional extension that imports tabular resources (CSV, Excel) into a queryable database. It allows filtering, sorting, and field selection directly on the data — without downloading the file. Not all portals have it enabled, and not all datasets use it even when the portal supports it. Check datastore_active: true on a resource to confirm availability.

// Ordinanze viabili del Comune di Messina — resource with datastore_active: true
ckan_datastore_search({
  server_url: "https://dati.comune.messina.it",
  resource_id: "17301b8b-2a5b-425f-80b0-5b75bb1793e9",
  filters: { "tipo": "lavori" },
  sort: "data_pubblicazione desc",
  limit: 10
})

> 👏 A shout-out to Comune di Messina and all public administrations that enable the DataStore extension: by doing so, they make their data dramatically easier to query and explore — including through AI tools like this one.

DataStore SQL Query (natural language: "count road orders by type")

// Count ordinanze viabili by tipo — Comune di Messina
ckan_datastore_search_sql({
  server_url: "https://dati.comune.messina.it",
  sql: "SELECT tipo, COUNT(*) AS total FROM \"17301b8b-2a5b-425f-80b0-5b75bb1793e9\" GROUP BY tipo ORDER BY total DESC LIMIT 5"
})

🧠 AI Skill for smarter multi-step queries

The MCP server provides the raw tools — the skill teaches your AI assistant how to use them intelligently.

Out of the box, an AI assistant knows each tool

Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.