An MCP (Model Context Protocol) server that provides access to the SCB PX-Web API v2, Statistics Sweden's official statistical database.
This server exposes tools for querying Swedish national statistics, including:
- Population and demographics
- Labor market and employment
- Economy and income
- Housing and construction
- Education statistics
pip install -r requirements.txt
python server.pyThe server runs on port 8000 using streamable HTTP transport.
docker build -t scb-mcp .
docker run -p 8000:8000 scb-mcpOr with docker-compose:
docker-compose up| Tool | Description |
|---|---|
scb_browse_folders |
Navigate the virtual folder structure by subject areas |
scb_search_tables |
Search for tables by keyword with optional category filter |
scb_get_table_info |
Get detailed metadata for a specific table |
scb_get_table_variables |
List variables and sample values for a table |
scb_test_selection |
Validate a selection before fetching data |
scb_preview_data |
Fetch a safe, limited preview of data |
scb_get_table_data |
Retrieve full table data with selection filters |
scb_find_region_code |
Resolve municipality/region names to SCB codes |
scb_search_regions |
Find region-related tables |
scb_get_api_status |
Get API config and rate limit status |
scb_check_usage |
Check current rate limit window usage |
All data comes from the public SCB API at https://api.scb.se/OV0104/v2beta/api/v2. No authentication required.