OI

ondata/istat_mcp_server

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

24 stars 5 forks 品質 85 トレンド 31MIT

MCP サーバーで、SDMX API 経由でイタリア語の統計 (ISTAT) をクエリできます。MCP クライアントと互換性があります

概要

ISTAT SDMX API からイタリアの統計データにアクセスするための MCP サーバー。 このモデルコンテキストプロトコル(MCP)サーバーは、SDMX REST API を通じて ISTAT (Istituto Nazionale di Statistica) からイタリアの統計データにアクセスできる Claude Desktop を提供します。 API 呼び出しを最小化し、統計データを発見、照会、取得するための 8 つのツールを提供する 2 層キャッシュ メカニズムを実装します。 - データ検出と検索: - 発見 dataflows - キーワード(ブラックリストフィルタリング付き)で利用可能なデータセットを検索 - get struct - データ構造 ID - get constraints - 説明付きの各次元の利用可能な制約値を取得する(コンビネーション構造 + 制約 + コードリストの説明; 同じ出力は、istat-get-constraints-cliコマンドから利用可能で、SKILLを参照してください.

概要(AI 翻訳)

日本語 | English

ISTAT SDMX API からイタリアの統計データにアクセスするための MCP サーバー。

概要

このモデルコンテキストプロトコル(MCP)サーバーは、SDMX REST API を通じて ISTAT (Istituto Nazionale di Statistica) からイタリアの統計データにアクセスできる Claude Desktop を提供します。 API 呼び出しを最小化し、統計データを発見、照会、取得するための 8 つのツールを提供する 2 層キャッシュ メカニズムを実装します。

##特徴

-8 MCPツールデータ検出と検索:

  • [discover_dataflows - キーワードで利用可能なデータセットを見つける(ブラックリストフィルタリング付き)
  • [get_structure - データ構造 ID の寸法定義とコードリストを取得する
  • [get_constraints - 説明(コンビネーション構造+制約+コードリストの説明)で各次元の利用可能な制約値を取得する。同じ出力は[istat-get-constraints-cli]]から使用可能で、SKILL.mdを参照してください)
  • [get_codelist_description - コードリストの値のイタリア語/英語の説明を取得する
  • [get_concepts - IDでISTATの概念のイタリア語または英語の説明を取得します([[T6]をラップします)コマンド)

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

ISTAT MCP Server

English | Italiano

MCP server for accessing Italian statistical data from the ISTAT SDMX API.

Overview

This Model Context Protocol (MCP) server provides Claude Desktop with access to Italian statistical data from ISTAT (Istituto Nazionale di Statistica) through the SDMX REST API. It implements a two-layer caching mechanism to minimize API calls and provides eight tools for discovering, querying, and retrieving statistical data.

Features

  • 8 MCP Tools for data discovery and retrieval:

    • discover_dataflows - Find available datasets by keywords (with blacklist filtering)
    • get_structure - Get dimension definitions and codelists for a datastructure ID
    • get_constraints - Get available constraint values for each dimension with descriptions (combines structure + constraints + codelist descriptions; the same output is available from the istat-get-constraints-cli command, see SKILL.md)
    • get_codelist_description - Get descriptions in Italian/English for codelist values
    • get_concepts - Get the Italian or English description of an ISTAT concept by ID (wraps the istat-get-concepts-cli command)
    • get_data - Fetch actual statistical data in TSV table format (with blacklist validation)
    • get_cache_diagnostics - Debug tool to inspect cache status
    • get_territorial_codes - Resolve ISTAT REF_AREA codes for Italia, ripartizioni, regioni, province, and comuni
  • Recommended Workflow (simple and efficient):

    1. Discover: Use discover_dataflows to find the dataflow you’re interested in
    2. Get Complete Metadata: Use get_constraints to see all dimensions with valid values AND descriptions in one call
      • This is the RECOMMENDED approach - one call instead of many
      • Internally combines get_structure + get_codelist_description for all dimensions
      • All data cached for 1 month → subsequent calls are instant
      • Returns complete information ready for building filters in get_data
    3. Fetch Data: Use get_data with the appropriate dimension filters to retrieve actual data

    Alternative workflow (manual approach):

    • Use get_structure with a datastructure ID to see dimensions and their codelists
    • Then call get_codelist_description manually for each codelist you need
    • Use get_concepts to get the Italian or English description of a specific concept ID (e.g. a dimension name)
  • Two-Layer Cache:

    • In-memory cache (cachetools) for fast access during session
    • Persistent disk cache (diskcache) that survives restarts
  • Rate Limiting: Maximum 4 API calls per minute with automatic queuing

  • Retry Logic: Exponential backoff on transient errors

GitHub で README 全文を見る

インストール

This server does not publish a one-line install command.

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "istat": { "command": "/path/to/istat_mcp_server/.venv/bin/python", "args": ["-m", "istat_mcp_server"], "cwd": "/path/to/istat_mcp_server" } } }