ckan-mcp-server

v0.4.147
io.github.aborruso/ckan-mcp-server Checked 12 hours ago Published 5 days ago

MCP 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_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…

ParameterTypeDescription
query *stringNatural language or keyword query to match against dataset title, notes, tags, organization, holder and publisher
server_url *stringBase URL of the CKAN server (e.g., https://dati.gov.it/opendata)
limitintegerNumber of datasets to return
query_parserstringOverride search parser ('text' forces text:(...) on non-fielded queries)
response_formatstringOutput format: 'markdown' for human-readable or 'json' for machine-readable
weightsobjectPer-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…

ParameterTypeDescription
id *stringDataset ID (UUID) or machine-readable name slug (e.g., 'raccolta-differenziata-comuni')
server_url *stringBase URL of the CKAN server (e.g., https://dati.gov.it/opendata)
include_trackingbooleanInclude tracking statistics
response_formatstringOutput 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…

ParameterTypeDescription
id *stringDataset ID or name
server_url *stringBase URL of the CKAN server
check_source_portalbooleanOpt-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_filterstringFilter resources by format, case-insensitive (e.g., 'CSV', 'json', 'XLSX')
response_formatstringOutput 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…

ParameterTypeDescription
server_url *stringBase URL of the CKAN server (e.g., https://dati.gov.it/opendata)
all_fieldsbooleanReturn full organization objects (true) or just name slugs (false)
limitintegerMax organizations to return. Use 0 to get only the count via faceting
offsetintegerPagination offset
response_formatstringOutput format: 'markdown' for human-readable or 'json' for machine-readable
sortstringSort 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)

ParameterTypeDescription
id *stringOrganization ID (UUID) or machine-readable name slug (e.g., 'regione-siciliana')
server_url *stringBase URL of the CKAN server (e.g., https://dati.gov.it/opendata)
include_datasetsbooleanInclude the list of datasets published by this organization
include_usersbooleanInclude the list of users belonging to this organization
response_formatstringOutput format: 'markdown' for human-readable or 'json' for machine-readable

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…

ParameterTypeDescription
server_url *stringBase URL of the CKAN server (e.g., https://dati.gov.it/opendata)
sql *stringSQL 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_formatstringOutput 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)

ParameterTypeDescription
server_url *stringBase 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…

ParameterTypeDescription
server_url *stringBase URL of the CKAN server (e.g., https://dati.gov.it/opendata)
fqstringFilter query in Solr syntax (e.g., 'organization:comune-palermo') to restrict which datasets contribute to tag counts
limitintegerMax tags to return (default 100, max 1000); tags are sorted by count descending
qstringDataset search query in Solr syntax to scope the tag facet (default: '*:*' for all datasets)
response_formatstringOutput format: 'markdown' for human-readable or 'json' for machine-readable
tag_querystringSubstring 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…

ParameterTypeDescription
server_url *stringBase URL of the CKAN server (e.g., https://dati.gov.it/opendata)
all_fieldsbooleanReturn full group objects (true) or just name slugs (false)
limitintegerMax groups to return. Use 0 to get only the count via faceting
offsetintegerPagination offset
response_formatstringOutput format: 'markdown' for human-readable or 'json' for machine-readable
sortstringSort 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)

ParameterTypeDescription
id *stringGroup ID (UUID) or machine-readable name slug (e.g., 'transport', 'energia')
server_url *stringBase URL of the CKAN server (e.g., https://dati.gov.it/opendata)
include_datasetsbooleanInclude the list of datasets belonging to this group
response_formatstringOutput 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)

ParameterTypeDescription
dataset_id *stringDataset ID or name
server_url *stringBase URL of dati.gov.it (e.g., https://www.dati.gov.it/opendata)
response_formatstringOutput 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)

ParameterTypeDescription
dataset_id *stringDataset ID or name
server_url *stringBase URL of dati.gov.it (e.g., https://www.dati.gov.it/opendata)
response_formatstringOutput 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' |…

ParameterTypeDescription
q *stringSolr search query (e.g. 'incidenti', 'title:ambiente')
server_url *stringBase URL of the CKAN server (e.g., https://dati.comune.messina.it)
response_formatstringOutput format: 'markdown' for human-readable or 'json' for machine-readable
rowsintegerMax 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…

ParameterTypeDescription
server_url *stringBase URL of the CKAN server (e.g., https://dati.comune.messina.it)
facet_limitintegerMax entries per facet section (default 20)
response_formatstringOutput 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…

ParameterTypeDescription
endpoint_url *stringHTTPS URL of the SPARQL endpoint
query *stringSPARQL SELECT query to execute
limitintegerMax rows to return (default: 25, max: 1000). Injected as SPARQL LIMIT if not already present in query.
response_formatstringOutput 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…

ParameterTypeDescription
countrystringCountry name in English (e.g. 'Italy', 'Brazil'). Translate from any language before passing.
has_datastorebooleanIf true, return only portals with DataStore plugin (required for SQL queries)
languagestringPortal default locale code (e.g. 'it', 'en', 'pt_BR')
limitintegerMax results (default 10, max 50)
min_datasetsintegerMinimum number of datasets
querystringKeyword matched against portal title (case-insensitive)
response_formatstringOutput format: 'markdown' for human-readable or 'json' for machine-readable