Ukrainian Statistics MCP Server

Ukrainian Statistics MCP Server

Provides seamless access to official Ukrainian government statistics from the State Statistics Service via their SDMX API. It enables users to query bilingual datasets across domains like energy, demographics, and trade using flexible filtering and metadata exploration tools.

Category
访问服务器

README

Ukrainian Statistics MCP Server

🇺🇦 Українська версія

A Model Context Protocol (MCP) server that provides AI models with seamless access to Ukrainian statistical data from the State Statistics Service of Ukraine (Державна служба статистики України) via their SDMX API v3.

Features

  • 🇺🇦 Access to official Ukrainian government statistics
  • 📊 Support for multiple statistical domains (energy, demographics, trade, etc.)
  • 🌐 Bilingual support (Ukrainian and English)
  • 🔍 Flexible data filtering and querying
  • 📈 Comprehensive metadata exploration (dataflows, structures, codelists)
  • ⚡ Fast XML-to-JSON conversion for easy data consumption

Installation

Method 1: Install from npm (Recommended)

The easiest way to install the MCP server is via npm:

npm install -g ukrainian-stats-mcp-server

After installation, add to Claude Desktop configuration:

Windows: %APPDATA%\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "ukrainian-stats": {
      "command": "ukrainian-stats-mcp"
    }
  }
}

Restart Claude Desktop and you're ready to use the server!

Note: On Linux/macOS, if you encounter permission issues, you may need to use sudo npm install -g ukrainian-stats-mcp-server or configure npm to use a user directory.

Method 2: Quick Install Using Install Scripts

The easiest way to install locally is using the provided install scripts. These scripts automatically install dependencies, build the project, and make the command globally available.

  1. Clone the repository:
git clone https://github.com/VladyslavMykhailyshyn/ukrainian-stats-mcp-server.git
cd ukrainian-stats-mcp-server
  1. Run the install script:

Windows (PowerShell):

.\install.ps1

Windows (Command Prompt):

install.bat

Linux/macOS:

chmod +x install.sh
./install.sh

The install scripts will:

  1. ✅ Check for Node.js (requires version 18 or higher)
  2. 📦 Install all dependencies
  3. 🔨 Build the project
  4. 🔗 Link the command globally (makes ukrainian-stats-mcp available system-wide)

After running the install script, add to Claude Desktop configuration:

Windows: %APPDATA%\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "ukrainian-stats": {
      "command": "ukrainian-stats-mcp"
    }
  }
}

Then restart Claude Desktop and you're ready to use the server!

Note: On Linux/macOS, if you encounter permission issues, you may need to run sudo ./install.sh or configure npm to use a user directory (the script will provide instructions).

Method 3: Install from GitHub

  1. Install globally via npm from GitHub:
npm install -g git+https://github.com/VladyslavMykhailyshyn/ukrainian-stats-mcp-server.git
  1. Add to Claude Desktop configuration:

Windows: %APPDATA%\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "ukrainian-stats": {
      "command": "ukrainian-stats-mcp"
    }
  }
}
  1. Restart Claude Desktop - The server will be ready to use!

Method 4: Local Development Installation

  1. Clone the repository:
git clone https://github.com/VladyslavMykhailyshyn/ukrainian-stats-mcp-server.git
cd ukrainian-stats-mcp-server
  1. Install dependencies:
npm install
  1. Build the project:
npm run build
  1. Add to Claude Desktop configuration (use absolute path):
{
  "mcpServers": {
    "ukrainian-stats": {
      "command": "node",
      "args": ["/absolute/path/to/ukrainian-stats-mcp-server/build/index.js"]
    }
  }
}

Available Tools

1. list_dataflows

List all available dataflows (datasets) from the Ukrainian Statistics Service.

Purpose: Discover what statistical domains are available (e.g., energy, trade, demographics).

Parameters:

  • detail (optional): Level of detail - full, allstubs, or referencestubs (default: full)

Example:

Please list all available dataflows from Ukrainian statistics.

2. get_dataflow

Get detailed information about a specific dataflow.

Purpose: Understand the structure and metadata of a specific dataset.

Parameters:

  • dataflow_id (required): The dataflow identifier (e.g., DF_SUPPLY_USE_ENERGY)
  • agency_id (optional): Agency ID (default: SSSU)
  • version (optional): Version (default: latest)

Example:

Get information about the DF_SUPPLY_USE_ENERGY dataflow.

3. get_data_structure

Get the Data Structure Definition (DSD) for a dataset.

Purpose: Understand dimensions, attributes, and measures - essential for querying data.

Parameters:

  • dsd_id (required): Data Structure Definition ID (e.g., DSD_SUPPLY_USE_ENERGY)
  • agency_id (optional): Agency ID (default: SSSU)
  • version (optional): Version (default: latest)
  • references (optional): Include references - none, parents, children, descendants, all (default: descendants)

Example:

Get the data structure for DSD_SUPPLY_USE_ENERGY.

4. get_concept_scheme

Get concept scheme definitions.

Purpose: Understand the concepts used in statistical data.

Parameters:

  • concept_scheme_id (required): Concept Scheme ID
  • agency_id (optional): Agency ID (default: SSSU)
  • version (optional): Version (default: latest)

5. list_codelists

List all available codelists (controlled vocabularies).

Purpose: Discover available reference lists for dimensions (countries, indicators, etc.).

Parameters:

  • detail (optional): Level of detail - full or allstubs (default: full)

Example:

List all available codelists.

6. get_codelist

Get a specific codelist with all values and translations.

Purpose: Understand allowed values for dimensions (essential for filtering data).

Parameters:

  • codelist_id (required): Codelist ID (e.g., CL_SUPPLY_USE_ENERGY_INDICATOR)
  • agency_id (optional): Agency ID (default: SSSU)
  • version (optional): Version (default: latest)

Example:

Get the codelist CL_SUPPLY_USE_ENERGY_INDICATOR with all values.

7. get_data

Retrieve statistical data with flexible filtering.

Purpose: Get actual statistical time series and observations.

Parameters:

  • resource_id (required): Resource/dataflow ID
  • context (optional): Context type - dataflow, datastructure, provisionagreement (default: dataflow)
  • agency_id (optional): Agency ID (default: SSSU)
  • version (optional): Version (default: latest)
  • key (optional): Data key with wildcards (default: * for all data)
  • start_period (optional): Start time period (e.g., 2020-01)
  • end_period (optional): End time period (e.g., 2023-12)
  • dimension_filters (optional): Dimension filters as object (e.g., {"FREQ": "A", "INDICATOR": "ENERGY_PRODUCTION"})

Example:

Get annual energy data from DF_SUPPLY_USE_ENERGY for 2020 to 2023.

8. check_data_availability

Check what data is available without retrieving it.

Purpose: Explore available dimensions and values before querying large datasets.

Parameters:

  • resource_id (required): Resource/dataflow ID
  • context (optional): Context type (default: dataflow)
  • agency_id (optional): Agency ID (default: SSSU)
  • version (optional): Version (default: latest)
  • key (optional): Data key with wildcards (default: *)

Example:

Check data availability for DF_SUPPLY_USE_ENERGY.

Common Usage Workflows

Workflow 1: Exploring a New Dataset

  1. List dataflows to find interesting datasets

    List all dataflows
    
  2. Get dataflow details to understand what the dataset contains

    Get dataflow DF_SUPPLY_USE_ENERGY
    
  3. Get data structure to see dimensions and attributes

    Get data structure DSD_SUPPLY_USE_ENERGY
    
  4. Get codelists to see allowed values for dimensions

    Get codelist CL_SUPPLY_USE_ENERGY_INDICATOR
    
  5. Retrieve data with appropriate filters

    Get data from DF_SUPPLY_USE_ENERGY for 2020-2023
    

Workflow 2: Quick Data Retrieval

If you already know the dataflow ID:

Get energy supply and use data from DF_SUPPLY_USE_ENERGY for the last 3 years

The AI will use the appropriate tools to fetch the data.

Data Format

All responses are returned in JSON format, converted from the original SDMX XML responses. The JSON structure follows the SDMX standard with attributes prefixed with @_.

API Information

This MCP server uses the SDMX API v3 from:

  • API Documentation: https://stat.gov.ua/uk/development-api/sdmx-api-v3
  • Examples: https://stat.gov.ua/uk/development-api/step-by-step-example
  • Base URL: https://stat.gov.ua/sdmx/workspaces/default:integration/registry/sdmx/3.0

Troubleshooting

Server not appearing in Claude Desktop

  1. Check that the path in claude_desktop_config.json is correct
  2. Ensure you've built the project with npm run build
  3. Restart Claude Desktop
  4. Check Claude Desktop logs for errors

API Request Failures

  • The Ukrainian Statistics API may have rate limits
  • Some datasets might be temporarily unavailable
  • Network connectivity to stat.gov.ua is required

XML Parsing Errors

If you encounter XML parsing errors, the API response format may have changed. Please report this as an issue.

Development

Project Structure

stat-mcp/
├── src/
│   ├── index.ts              # Main MCP server entry point
│   ├── api-client.ts         # Ukrainian Stats API client
│   └── tools/
│       ├── dataflows.ts      # Dataflow tools
│       ├── data-structures.ts # DSD and concept scheme tools
│       ├── codelists.ts      # Codelist tools
│       └── data.ts           # Data retrieval tools
├── build/                    # Compiled JavaScript (generated)
├── package.json
└── tsconfig.json

Running in Development Mode

# Watch mode - auto-rebuild on changes
npm run watch

# In another terminal
node build/index.js

License

MIT

Contributing

Contributions are welcome! Please feel free to submit issues or pull requests.

Contact

For questions about the Ukrainian Statistics API, please visit the official documentation at https://stat.gov.ua/uk/development-api/

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选