Skip to main content

A Model Context Protocol (MCP) server for the CKAN API that enables browsing and managing CKAN data portals through MCP-compatible clients.

Project description

CKAN MCP Server

A Model Context Protocol (MCP) server for the CKAN API that enables browsing and managing CKAN data portals through MCP-compatible clients.

What is this?

This is an MCP server that provides access to CKAN (Comprehensive Knowledge Archive Network) APIs through the Model Context Protocol. It can be used with MCP-compatible clients like Claude Desktop, IDEs, or other AI applications to interact with CKAN data portals.

Requirements

  • Python 3.13 or higher
  • pip (Python package installer)

Installation

  1. Install Python dependencies:
pip install -r requirements.txt

Configuration

Set the following environment variables:

  • CKAN_URL: The base URL of your CKAN portal (e.g. https://demo.ckan.org)
  • CKAN_API_KEY: (Optional) Your CKAN API key for write operations

Example:

export CKAN_URL="https://demo.ckan.org"
export CKAN_API_KEY="your-api-key-here"

You can also copy .env.example to .env and set your configuration there.

Usage

Running the server directly

python mcp_ckan_server.py

Using Docker

# Build the image
docker build -t ckan-mcp-server .

# Run with environment variables
docker run -e CKAN_URL="https://demo.ckan.org" -e CKAN_API_KEY="your-key" ckan-mcp-server

Using Docker Compose

# Copy environment file and configure
cp .env.example .env
# Edit .env with your settings

# Run the server
docker-compose up

Available Tools

The MCP server provides the following tools:

Packages/Datasets

  • ckan_package_list: List all packages
  • ckan_package_show: Show details of a specific package
  • ckan_package_search: Search for packages

Organizations

  • ckan_organization_list: List all organizations
  • ckan_organization_show: Show organization details

DataStore

  • ckan_datastore_search Search DataStore Tables by Resource

Groups and Tags

  • ckan_group_list: List all groups
  • ckan_tag_list: List all tags

Resources

  • ckan_resource_show: Show resource details

System

  • ckan_site_read: Site information
  • ckan_status_show: Status and version information

Examples

Search packages

{
  "tool": "ckan_package_search",
  "arguments": {
    "q": "climate data",
    "rows": 5,
    "sort": "score desc"
  }
}

Show organization

{
  "tool": "ckan_organization_show",
  "arguments": {
    "id": "sample-organization",
    "include_datasets": true
  }
}

List all tags

{
  "tool": "ckan_tag_list",
  "arguments": {}
}

Resources

The server also provides the following resources:

  • ckan://api/docs: API documentation
  • ckan://config: Server configuration

Using with MCP Clients

Claude Desktop

Add this to your Claude Desktop configuration file:

{
  "mcpServers": {
    "ckan": {
      "command": "python",
      "args": ["/path/to/mcp_ckan_server.py"],
      "env": {
        "CKAN_URL": "https://demo.ckan.org",
        "CKAN_API_KEY": "your-api-key-here"
      }
    }
  }
}

Other MCP Clients

The server communicates via stdio, so any MCP-compatible client can connect to it by running the Python script and communicating through standard input/output.

CKAN API Reference

This MCP server implements the main endpoints of the CKAN API v3. Complete documentation: https://docs.ckan.org/en/latest/api/

License

Mozilla Public License Version 2.0

Author

(C) 2025, Ondics GmbH, https://ondics.de

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iflow_mcp_ondics_ckan_mcp_server-0.0.1.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file iflow_mcp_ondics_ckan_mcp_server-0.0.1.tar.gz.

File metadata

  • Download URL: iflow_mcp_ondics_ckan_mcp_server-0.0.1.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_ondics_ckan_mcp_server-0.0.1.tar.gz
Algorithm Hash digest
SHA256 57a539d955827af889fe453cc13779cc31b41322f4599befd465c6c997596a3a
MD5 9a2438086babd94ef06d6a8f66736cb2
BLAKE2b-256 76134e6ccd054c3851c8d5adb36cdc1926b26335be99dcab2a14c807a69ed096

See more details on using hashes here.

File details

Details for the file iflow_mcp_ondics_ckan_mcp_server-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: iflow_mcp_ondics_ckan_mcp_server-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_ondics_ckan_mcp_server-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 052ea237294cb3ae1e95f1cb5b8295cdab967e98aff0f7206741e8105a103e18
MD5 e8be31f7b2051fa3483510af7c07a8ae
BLAKE2b-256 fae5f930f5f3622361b333ce9160c8d67caa9397fb44aa4d5293336460a5ec35

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page