Skip to content

inooLabs/scb-mcp

Repository files navigation

SCB MCP Server

An MCP (Model Context Protocol) server that provides access to the SCB PX-Web API v2, Statistics Sweden's official statistical database.

What it does

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

Running locally

pip install -r requirements.txt
python server.py

The server runs on port 8000 using streamable HTTP transport.

Docker

docker build -t scb-mcp .
docker run -p 8000:8000 scb-mcp

Or with docker-compose:

docker-compose up

Available tools

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

Data source

All data comes from the public SCB API at https://api.scb.se/OV0104/v2beta/api/v2. No authentication required.

About

An MCP server dedicated to fetching data from SCB

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published