opendata-cat

15 Catalan portals + radio archive: gov, INE/REE/CNMC, CORA, Catalònica, radioteca.cat.

我該用這個嗎

品質與安全性

A
說明品質
100%
結構描述完整度
83%
命名品質
98%
汙染風險
100%
權限相符程度
100%
協定合規性
100%

根據工具定義與協定合規性的自動化分析。

上下文成本

~1,658Token(工具定義)
~1.3 KB典型回應大小
中等的注意力影響(128k 上下文的 1.30%)

這是每次將伺服器的工具載入模型上下文時所消耗的約略 token 數量。數量越高,可用於其他工作的注意力就越少。

安裝

一鍵安裝

將以下內容加入你的 `claude_desktop_config.json` 檔案:

{
  "mcpServers": {
    "opendata-cat": {
      "command": "npx",
      "args": [
        "@opendata.cat/mcp-server"
      ]
    }
  }
}

可執行的套件

npm@opendata.cat/mcp-server0.6.1stdio

遠端端點

https://opendata.cat/api/mcpstreamable-http

它能做什麼

工具清單

工具(8)

🟢 唯讀🟡 寫入🔴 刪除⚪ 未知
🟢search_datasets(query, portal, category, limit)

Search datasets by free text. IMPORTANT: check server instructions first — many common queries have a direct dataset_id you can use with query_dataset without searching. Only use search_datasets when you don't know which dataset you need.

輸入結構描述

{
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "description": "Search text in Catalan or Spanish. Examples: 'qualitat aire', 'pressupostos municipals', 'transport públic', 'residus', 'educació', 'rodalies'."
    },
    "portal": {
      "type": "string",
      "description": "Filter results to a single portal.",
      "enum": [
        "generalitat",
        "barcelona",
        "diba",
        "aoc",
        "reus",
        "girona",
        "fgc",
        "idescat",
        "renfe",
        "ine",
        "ree",
        "sepe",
        "cnmc",
        "cora",
        "catalonica"
      ]
    },
    "category": {
      "type": "string",
      "description": "Filter by thematic category. Examples: 'Medi Ambient', 'Educació', 'Salut', 'Economia', 'Transport', 'Seguretat'. Use list_categories to see all available categories."
    },
    "limit": {
      "type": "number",
      "description": "Maximum number of results to return. Min 1, max 100. Default 20.",
      "default": 20
    }
  },
  "required": [
    "query"
  ]
}
🟢get_dataset_info(dataset_id)

Get complete metadata for a dataset: fields with types and descriptions, API endpoint, license, available formats and last update. Call after search_datasets to get full details of a specific dataset.

輸入結構描述

{
  "type": "object",
  "properties": {
    "dataset_id": {
      "type": "string",
      "description": "Unique dataset identifier in 'portal:id' format. Obtained from search_datasets results. Examples: 'generalitat:gn9e-3qhr', 'barcelona:qualitat-de-laire', 'renfe:vehicle-positions-gtfsrt'."
    }
  },
  "required": [
    "dataset_id"
  ]
}
🟢list_dataset_fields(dataset_id)

List fields of a dataset with name, data type and description. Call before query_dataset to know which fields and filters are available.

輸入結構描述

{
  "type": "object",
  "properties": {
    "dataset_id": {
      "type": "string",
      "description": "Unique dataset identifier in 'portal:id' format. Obtained from search_datasets results."
    }
  },
  "required": [
    "dataset_id"
  ]
}
🟢query_dataset(dataset_id, filters, search, limit, offset)

Query real data from a dataset. Check instructions for featured dataset_ids and NOTES section for common filter patterns (municipal budgets, contracts, weather, energy, fuel prices).

輸入結構描述

{
  "type": "object",
  "properties": {
    "dataset_id": {
      "type": "string",
      "description": "Unique dataset identifier in 'portal:id' format. Obtained from search_datasets results."
    },
    "filters": {
      "type": "object",
      "description": "Key-value filters where the key is the field name and the value is the filter value. Examples: {\"municipi\": \"Barcelona\"}, {\"any\": \"2024\"}, {\"NOM_ENS\": \"Ajuntament de Tiana\"}. Use list_dataset_fields to know valid field names.",
      "additionalProperties": {
        "type": "string"
      }
    },
    "search": {
      "type": "string",
      "description": "Free text search within dataset data. Works with Socrata ($q) and CKAN (q). For Diba and CIDO, use specific filters."
    },
    "limit": {
      "type": "number",
      "description": "Number of rows to return. Min 1, max 100. Default 20. Use offset for pagination.",
      "default": 20
    },
    "offset": {
      "type": "number",
      "description": "Number of rows to skip for pagination. Default 0. Combine with limit to navigate large results.",
      "default": 0
    }
  },
  "required": [
    "dataset_id"
  ]
}
🟢list_portals

List all 13 indexed open data portals with dataset counts. Catalan portals (Generalitat, Barcelona, Diba, AOC, Reus, Girona, FGC, Idescat, Renfe) + Spanish national sources with Catalonia focus (INE statistics, REE energy, SEPE employment, CNMC fuel prices). No parameters required.

輸入結構描述

{
  "type": "object",
  "properties": {},
  "required": []
}
🟢list_categories

List all dataset categories and themes with counts per portal. Great first step to discover what data types are available before searching with search_datasets. Returns total datasets, count per portal and category list with counts. No parameters required.

輸入結構描述

{
  "type": "object",
  "properties": {},
  "required": []
}
🟢related_datasets(dataset_id)

Find related datasets from OTHER portals. Great for discovering complementary data: if you're looking at air quality from Generalitat, it may suggest traffic data from Barcelona or emissions from AOC. Relations are computed by thematic similarity across portals.

輸入結構描述

{
  "type": "object",
  "properties": {
    "dataset_id": {
      "type": "string",
      "description": "Dataset ID to find related datasets for. Obtained from search_datasets."
    }
  },
  "required": [
    "dataset_id"
  ]
}
🟢search_radioteca(query, publisher, year, type, limit, ...)

Search radio shows, episodes and people indexed at radioteca.cat (Catalan radio archive, ~485K documents from Catalunya Ràdio, RAC1, Catalunya Música, iCat, Catalunya Informació, RTVE, Cadena SER, ara.cat). Searches across episode titles, descriptions (which include a detailed summary of what was said), program name and subheading. Returns episodes (~473K), programs (~3K) and people (~9K). IMPORTANT: always cite radioteca.cat as the source and include the absolute 'url' in your reply for traceability — never paraphrase without linking.

輸入結構描述

{
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "description": "Free text in Catalan or Spanish. Searches title, description (contains episode summary), program and subheading. Examples: 'visita papa', 'eleccions municipals', 'crisi habitatge', 'Albert Serra cinema'."
    },
    "publisher": {
      "type": "string",
      "description": "Filter by broadcaster.",
      "enum": [
        "Catalunya Ràdio",
        "RAC1",
        "Catalunya Música",
        "iCat",
        "Catalunya Informació",
        "RTVE",
        "Cadena SER",
        "ara.cat"
      ]
    },
    "year": {
      "type": "string",
      "description": "Filter by year (4 digits, e.g. '2025'). NOTE: only year-level filtering is indexed; for a specific day, use the broader year filter and look at the URL path (radioteca URLs include /YYYY/MM/DD/) or the 'subheading' field which often contains the date."
    },
    "type": {
      "type": "string",
      "description": "Filter by document type.",
      "enum": [
        "Episode",
        "Program",
        "Person"
      ]
    },
    "limit": {
      "type": "number",
      "description": "Maximum results. Min 1, max 50. Default 10.",
      "default": 10
    },
    "offset": {
      "type": "number",
      "description": "Pagination offset. Default 0.",
      "default": 0
    }
  },
  "required": [
    "query"
  ]
}

社群

為此伺服器評分

證據

近期觀測

已驗證未記錄版本8 個工具
已驗證未記錄版本8 個工具
已驗證未記錄版本8 個工具