ckan-mcp-server
v0.4.147MCP server for interacting with CKAN open data portals
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
ckan_package_search Search CKAN Datasets
Search for datasets (packages) on a CKAN server using Solr query syntax. Supports full Solr search capabilities including filters, facets, and sorting. Use this to discover datasets matching specific criteria. Note on parser behavior: Some CKAN portals use a restrictive default query parser that can break long OR queries. For those portals, this tool may force the query into 'text:(...)' based on per-portal config. You can override with 'query_parser' to force or disable this behavior per request. Important - Date field semantics: - issued: publisher's content publish date when available…
| Parameter | Type | Description |
|---|---|---|
server_url * | string | Base URL of the CKAN server |
content_recent | boolean | Use issued date with fallback to metadata_created for recent content |
content_recent_days | integer | Day window for content_recent (default 30) |
facet_field | array | Fields to facet on |
facet_limit | integer | Maximum facet values per field |
fq | string | Filter query in Solr syntax; applied after scoring, does not affect relevance. CKAN extras fields use prefix 'extras_' (e.g. extras_hvd_category). For OR on same field use field:(val1 OR val2), never… |
include_drafts | boolean | Include draft datasets |
page | integer | Page number (1-based); alias for start. Overrides start if provided. |
page_size | integer | Results per page when using page (default: 10) |
q | string | Search query in Solr syntax |
query_parser | string | Override search parser ('text' forces text:(...) on non-fielded queries) |
response_format | string | Output format: 'markdown' for human-readable or 'json' for machine-readable |
rows | integer | Number of results to return |
sort | string | Sort field and direction (e.g., 'metadata_modified desc') |
start | integer | Offset for pagination |
ckan_find_relevant_datasets Find Relevant CKAN Datasets
Find and rank datasets by relevance to a query using weighted fields. Use this instead of ckan_package_search when you want relevance-ranked results with explicit scoring across title, notes, tags, and organization fields. Use ckan_package_search instead when you need Solr filter syntax, facets, or pagination. Uses package_search for discovery and applies a local scoring model. Args: - server_url (string): Base URL of CKAN server (e.g., "https://dati.gov.it/opendata") - query (string): Natural language or keyword query (e.g., "mobilità urbana", "air quality") - limit (number): Number…
| Parameter | Type | Description |
|---|---|---|
query * | string | Natural language or keyword query to match against dataset title, notes, tags, organization, holder and publisher |
server_url * | string | Base URL of the CKAN server (e.g., https://dati.gov.it/opendata) |
limit | integer | Number of datasets to return |
query_parser | string | Override search parser ('text' forces text:(...) on non-fielded queries) |
response_format | string | Output format: 'markdown' for human-readable or 'json' for machine-readable |
weights | object | Per-field scoring weights; unspecified fields use defaults |
ckan_package_show Show CKAN Dataset Details
Get complete metadata for a specific dataset (package). Returns full details including resources, organization, tags, and all metadata fields. Notes: - metadata_modified is a CKAN record timestamp (publish time on source portals, harvest time on aggregators), not the content date. - issued/modified are content dates when provided by the publisher. - JSON output adds metadata_harvested_at (same as metadata_modified). Args: - server_url (string): Base URL of CKAN server - id (string): Dataset ID or name (machine-readable slug) - include_tracking (boolean): Include view/downloa…
| Parameter | Type | Description |
|---|---|---|
id * | string | Dataset ID (UUID) or machine-readable name slug (e.g., 'raccolta-differenziata-comuni') |
server_url * | string | Base URL of the CKAN server (e.g., https://dati.gov.it/opendata) |
include_tracking | boolean | Include tracking statistics |
response_format | string | Output format: 'markdown' for human-readable or 'json' for machine-readable |
ckan_list_resources List CKAN Dataset Resources
List all resources in a dataset with a compact summary. Returns a focused table of resources showing format, size, DataStore availability, and download URL. Use this to quickly assess what files a dataset contains before deciding how to access the data. Args: - server_url (string): Base URL of CKAN server - id (string): Dataset ID or name - format_filter (string): Filter resources by format, case-insensitive (e.g., "CSV", "json", "XLSX") - response_format ('markdown' | 'json'): Output format Returns: Compact resource summary with name, ID, format, size, DataStore flag, and URL Ex…
| Parameter | Type | Description |
|---|---|---|
id * | string | Dataset ID or name |
server_url * | string | Base URL of the CKAN server |
check_source_portal | boolean | Opt-in (default false): when true, probes the source portal for DataStore availability when a resource URL points to a different CKAN instance. Issues extra HTTP requests to hosts taken from the datas… |
format_filter | string | Filter resources by format, case-insensitive (e.g., 'CSV', 'json', 'XLSX') |
response_format | string | Output format: 'markdown' for human-readable or 'json' for machine-readable |
ckan_organization_list List CKAN Organizations
List all organizations on a CKAN server. Organizations are entities that publish and manage datasets. Args: - server_url (string): Base URL of CKAN server - all_fields (boolean): Return full objects vs just names (default: false) - sort (string): Sort field (default: "name asc") - limit (number): Maximum results (default: 100). Use 0 to get only the count via faceting - offset (number): Pagination offset (default: 0) - response_format ('markdown' | 'json'): Output format Returns: List of organizations with metadata. When limit=0, returns only the count of organizations with da…
| Parameter | Type | Description |
|---|---|---|
server_url * | string | Base URL of the CKAN server (e.g., https://dati.gov.it/opendata) |
all_fields | boolean | Return full organization objects (true) or just name slugs (false) |
limit | integer | Max organizations to return. Use 0 to get only the count via faceting |
offset | integer | Pagination offset |
response_format | string | Output format: 'markdown' for human-readable or 'json' for machine-readable |
sort | string | Sort field and direction (e.g., 'name asc', 'package_count desc') |
ckan_organization_show Show CKAN Organization Details
Get details of a specific organization. Args: - server_url (string): Base URL of CKAN server - id (string): Organization ID or name - include_datasets (boolean): Include list of datasets (default: true) - include_users (boolean): Include list of users (default: false) - response_format ('markdown' | 'json'): Output format Returns: Organization details with optional datasets and users Typical workflow: ckan_organization_show → ckan_package_show (inspect a dataset) → ckan_datastore_search (query its data)
| Parameter | Type | Description |
|---|---|---|
id * | string | Organization ID (UUID) or machine-readable name slug (e.g., 'regione-siciliana') |
server_url * | string | Base URL of the CKAN server (e.g., https://dati.gov.it/opendata) |
include_datasets | boolean | Include the list of datasets published by this organization |
include_users | boolean | Include the list of users belonging to this organization |
response_format | string | Output format: 'markdown' for human-readable or 'json' for machine-readable |
ckan_organization_search Search CKAN Organizations by Name
Search for organizations by name pattern. This tool provides a simpler interface than package_search for finding organizations. Wildcards are automatically added around the search pattern. Args: - server_url (string): Base URL of CKAN server - pattern (string): Search pattern (e.g., "toscana", "salute") - response_format ('markdown' | 'json'): Output format Returns: List of matching organizations with dataset counts Examples: - { server_url: "https://www.dati.gov.it/opendata", pattern: "toscana" } - { server_url: "https://open.canada.ca/data", pattern: "health" } Typical workf…
| Parameter | Type | Description |
|---|---|---|
pattern * | string | Name pattern to search for (wildcards added automatically, e.g., 'toscana', 'health') |
server_url * | string | Base URL of the CKAN server (e.g., https://dati.gov.it/opendata) |
response_format | string | Output format: 'markdown' for human-readable or 'json' for machine-readable |
ckan_datastore_search Search CKAN DataStore
Query data from a CKAN DataStore resource. The DataStore allows SQL-like queries on tabular data. Not all resources have DataStore enabled. The response always includes a Fields section listing all available column names and types. Use limit=0 to discover column names without fetching data — do this before using filters to avoid guessing column names and getting HTTP 400 errors. Args: - server_url (string): Base URL of CKAN server - resource_id (string): ID of the DataStore resource - q (string | object): Full-text search (optional). A string searches all fields; an object such as {…
| Parameter | Type | Description |
|---|---|---|
resource_id * | string | UUID of the DataStore resource (from ckan_package_show resource.id where datastore_active is true) |
server_url * | string | Base URL of the CKAN server (e.g., https://dati.gov.it/opendata) |
distinct | boolean | Return only distinct rows |
fields | array | Specific field names to return; omit to return all fields |
filters | object | Key-value filters for exact matches (e.g., { "regione": "Sicilia", "anno": 2023 }) |
limit | integer | Max rows to return (default 100, max 32000); use 0 to get only column names without data |
offset | integer | Pagination offset |
q | Full-text search: a string searches all fields; an object { "column": "word" } searches only that column (accepted by some portals that refuse full-text search on large tables) | |
response_format | string | Output format: 'markdown' for human-readable or 'json' for machine-readable |
sort | string | Sort expression (e.g., 'anno desc', 'nome asc') |
ckan_datastore_search_sql Search CKAN DataStore with SQL
Run SQL queries on a CKAN DataStore resource. This endpoint is only available on CKAN portals with DataStore enabled and SQL access exposed. Args: - server_url (string): Base URL of CKAN server - sql (string): SQL query (e.g., SELECT * FROM "resource_id" LIMIT 10) - response_format ('markdown' | 'json'): Output format Returns: SQL query results from DataStore Examples: - { server_url: "...", sql: "SELECT * FROM "abc-123" LIMIT 10" } - { server_url: "...", sql: "SELECT COUNT(*) AS total FROM "abc-123"" } Typical workflow: ckan_package_show (get resource_id) → ckan_datastore_s…
| Parameter | Type | Description |
|---|---|---|
server_url * | string | Base URL of the CKAN server (e.g., https://dati.gov.it/opendata) |
sql * | string | SQL SELECT query; resource_id is the table name, must be double-quoted (e.g., SELECT * FROM "abc-123" LIMIT 10). Column names with capitals, spaces or accents must be double-quoted too (SELECT "Comune… |
response_format | string | Output format: 'markdown' for human-readable or 'json' for machine-readable |
ckan_status_show Check CKAN Server Status
Check if a CKAN server is available and get version information. Useful to verify server accessibility before making other requests. Also shows the count of High-Value Datasets (HVD) when the portal supports it. Args: - server_url (string): Base URL of CKAN server Returns: Server status, version information, and HVD dataset count (if available) Typical workflow: ckan_status_show (verify server is up) → ckan_package_search (discover datasets)
| Parameter | Type | Description |
|---|---|---|
server_url * | string | Base URL of the CKAN server |
ckan_tag_list List CKAN Tags
List tags from a CKAN server using faceting. This returns tag names with counts, optionally filtered by dataset query or tag substring. Args: - server_url (string): Base URL of CKAN server - q (string): Dataset search query (default: "*:*") - fq (string): Filter query (optional) - tag_query (string): Filter tags by substring (optional) - limit (number): Max tags to return (default: 100, max: 1000) - response_format ('markdown' | 'json'): Output format Returns: List of tags with counts (from faceting) Typical workflow: ckan_tag_list → ckan_package_search with fq="tags:tag_na…
| Parameter | Type | Description |
|---|---|---|
server_url * | string | Base URL of the CKAN server (e.g., https://dati.gov.it/opendata) |
fq | string | Filter query in Solr syntax (e.g., 'organization:comune-palermo') to restrict which datasets contribute to tag counts |
limit | integer | Max tags to return (default 100, max 1000); tags are sorted by count descending |
q | string | Dataset search query in Solr syntax to scope the tag facet (default: '*:*' for all datasets) |
response_format | string | Output format: 'markdown' for human-readable or 'json' for machine-readable |
tag_query | string | Substring filter applied to tag names after faceting (e.g., 'acqua' to keep only tags containing 'acqua') |
ckan_group_list List CKAN Groups
List all groups on a CKAN server. Groups are thematic collections of datasets. Args: - server_url (string): Base URL of CKAN server - all_fields (boolean): Return full objects vs just names (default: false) - sort (string): Sort field (default: "name asc") - limit (number): Maximum results (default: 100). Use 0 to get only the count via faceting - offset (number): Pagination offset (default: 0) - response_format ('markdown' | 'json'): Output format Returns: List of groups with metadata. When limit=0, returns only the count of groups with datasets. Typical workflow: ckan_group…
| Parameter | Type | Description |
|---|---|---|
server_url * | string | Base URL of the CKAN server (e.g., https://dati.gov.it/opendata) |
all_fields | boolean | Return full group objects (true) or just name slugs (false) |
limit | integer | Max groups to return. Use 0 to get only the count via faceting |
offset | integer | Pagination offset |
response_format | string | Output format: 'markdown' for human-readable or 'json' for machine-readable |
sort | string | Sort field and direction (e.g., 'name asc', 'package_count desc') |
ckan_group_show Show CKAN Group Details
Get details of a specific group. Args: - server_url (string): Base URL of CKAN server - id (string): Group ID or name - include_datasets (boolean): Include list of datasets (default: true) - response_format ('markdown' | 'json'): Output format Returns: Group details with optional datasets Typical workflow: ckan_group_show → ckan_package_show (inspect a dataset) → ckan_datastore_search (query its data)
| Parameter | Type | Description |
|---|---|---|
id * | string | Group ID (UUID) or machine-readable name slug (e.g., 'transport', 'energia') |
server_url * | string | Base URL of the CKAN server (e.g., https://dati.gov.it/opendata) |
include_datasets | boolean | Include the list of datasets belonging to this group |
response_format | string | Output format: 'markdown' for human-readable or 'json' for machine-readable |
ckan_group_search Search CKAN Groups by Name
Search for groups by name pattern. This tool provides a simpler interface than package_search for finding groups. Wildcards are automatically added around the search pattern. Args: - server_url (string): Base URL of CKAN server - pattern (string): Search pattern (e.g., "energia", "salute") - response_format ('markdown' | 'json'): Output format Returns: List of matching groups with dataset counts Typical workflow: ckan_group_search → ckan_group_show (get details) → ckan_package_search with fq="groups:name"
| Parameter | Type | Description |
|---|---|---|
pattern * | string | Name pattern to search for (wildcards added automatically, e.g., 'energia', 'salute') |
server_url * | string | Base URL of the CKAN server (e.g., https://dati.gov.it/opendata) |
response_format | string | Output format: 'markdown' for human-readable or 'json' for machine-readable |
ckan_get_mqa_quality Get MQA Quality Score
Get MQA (Metadata Quality Assessment) quality score for a dataset on dati.gov.it from data.europa.eu. Returns the final score on the 0-7.5 scale of MQA methodology v2 with its band (Sufficient/Good/Excellent), dataset, distribution and data service scores, and the failing metrics with the largest gain. Datasets not yet re-evaluated fall back to the previous methodology (405 scale), labelled as such. Only works with dati.gov.it server. Typical workflow: ckan_package_show (get dataset ID) → ckan_get_mqa_quality → ckan_get_mqa_quality_details (full list of failing metrics)
| Parameter | Type | Description |
|---|---|---|
dataset_id * | string | Dataset ID or name |
server_url * | string | Base URL of dati.gov.it (e.g., https://www.dati.gov.it/opendata) |
response_format | string | Output format: 'markdown' for human-readable or 'json' for machine-readable |
ckan_get_mqa_quality_details Get MQA Quality Details
Get detailed MQA (Metadata Quality Assessment) quality reasons for a dataset on dati.gov.it. Lists every failing metric grouped by FAIR dimension, with DCAT-AP property, weight, how many distributions fail it and its gain on the final score, plus the HTTP status of failing URL tests (e.g. 1100 timeout, 404) (methodology v2); previous-methodology datasets get non-max reasons. Only works with dati.gov.it server. Typical workflow: ckan_get_mqa_quality (get overview scores) → ckan_get_mqa_quality_details (inspect failing metrics)
| Parameter | Type | Description |
|---|---|---|
dataset_id * | string | Dataset ID or name |
server_url * | string | Base URL of dati.gov.it (e.g., https://www.dati.gov.it/opendata) |
response_format | string | Output format: 'markdown' for human-readable or 'json' for machine-readable |
ckan_analyze_datasets Analyze CKAN Datasets and DataStore Schema
Search datasets and inspect the DataStore schema of queryable resources. For each dataset found, lists all resources. For DataStore-enabled resources, fetches the full field schema (name, type, and label/notes when available) plus total record count — all in one call. Use this before ckan_datastore_search to understand what fields are available and what data to expect. Args: - server_url (string): Base URL of CKAN server - q (string): Solr search query (e.g. "incidenti", "title:ambiente") - rows (number): Max datasets to analyze (default 5, max 20) - response_format ('markdown' |…
| Parameter | Type | Description |
|---|---|---|
q * | string | Solr search query (e.g. 'incidenti', 'title:ambiente') |
server_url * | string | Base URL of the CKAN server (e.g., https://dati.comune.messina.it) |
response_format | string | Output format: 'markdown' for human-readable or 'json' for machine-readable |
rows | integer | Max datasets to analyze (default 5, max 20) |
ckan_catalog_stats Get CKAN Portal Statistics
Get a statistical overview of a CKAN portal: total dataset count and breakdown by category, format, and organization. Single CKAN call (package_search with rows=0 and facets). No query needed. Args: - server_url (string): Base URL of the CKAN server - facet_limit (number): Max entries per facet section (default 20) - response_format ('markdown' | 'json'): Output format Returns: Total dataset count, categories ranked by count, file formats ranked by count, organizations ranked by count. Typical workflow: ckan_catalog_stats (understand the portal) → ckan_package_search (query speci…
| Parameter | Type | Description |
|---|---|---|
server_url * | string | Base URL of the CKAN server (e.g., https://dati.comune.messina.it) |
facet_limit | integer | Max entries per facet section (default 20) |
response_format | string | Output format: 'markdown' for human-readable or 'json' for machine-readable |
sparql_query SPARQL Query
Execute a SPARQL SELECT query against any public HTTPS SPARQL endpoint. Useful for querying open data portals and knowledge graphs that expose SPARQL endpoints, including: - data.europa.eu (European open data portal) - publications.europa.eu (EU Publications Office) - DBpedia, Wikidata - Any DCAT-AP compliant data catalog Only HTTPS endpoints are allowed. Queries timeout after 15 seconds. Only SELECT queries are supported (read-only). If the query does not contain a LIMIT clause, one is injected automatically (default: 25, max: 1000). Args: - endpoint_url (string): HTTPS URL of the SPARQ…
| Parameter | Type | Description |
|---|---|---|
endpoint_url * | string | HTTPS URL of the SPARQL endpoint |
query * | string | SPARQL SELECT query to execute |
limit | integer | Max rows to return (default: 25, max: 1000). Injected as SPARQL LIMIT if not already present in query. |
response_format | string | Output format: 'markdown' for human-readable or 'json' for machine-readable |
ckan_find_portals Find CKAN Portals
Search the live datashades.info registry of ~950 CKAN portals worldwide. Use this tool to discover which CKAN portals exist for a country, language, or topic before querying them with other CKAN tools. **IMPORTANT — country parameter**: always pass country name in English. If the user writes in another language (e.g. "Italia", "España", "Brasil"), translate to English ("Italy", "Spain", "Brazil") before calling this tool. Args: - country (string): Country name in English (e.g. "Italy", "Brazil", "France") - query (string): Keyword to match against portal title (e.g. "transport", "hea…
| Parameter | Type | Description |
|---|---|---|
country | string | Country name in English (e.g. 'Italy', 'Brazil'). Translate from any language before passing. |
has_datastore | boolean | If true, return only portals with DataStore plugin (required for SQL queries) |
language | string | Portal default locale code (e.g. 'it', 'en', 'pt_BR') |
limit | integer | Max results (default 10, max 50) |
min_datasets | integer | Minimum number of datasets |
query | string | Keyword matched against portal title (case-insensitive) |
response_format | string | Output format: 'markdown' for human-readable or 'json' for machine-readable |