Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

Statistics Sweden’s open data made available as an MCP server, using Python and FastMCP

README.md

MCP Server for Statistics Sweden (SCB) API

![PyPI](https://pypi.org/project/scb-opendata-mcp/)

A FastMCP server that provides access to Statistics Sweden's PxWebApi v2, offering statistical tables covering employment, labor costs, wages, and other civil data from Sweden.

Features

  • Table Discovery: Browse and search 5,155 statistical tables
  • Data Retrieval: Fetch statistical data with optional filtering
  • Codelists: Access code lists for valid filter values
  • Saved Queries: Save and retrieve frequently used queries
  • Pagination: Handle large result sets efficiently
  • Language Support: English and Swedish
  • Error Handling: Robust error handling with retry logic

Installation

Prerequisites

  • Python 3.11 or higher
  • pip or uv package manager

Install from PyPI

pip install scb-opendata-mcp

# Or with uv
uvx scb_opendata_mcp

Install from source

# Clone the repository
git clone https://github.com/ashwinvis/scb-opendata-mcp.git
cd scb-opendata-mcp

# Install dependencies
pip install .

# Or with uv
uv sync

Usage

Running the server

The package on installation

scb_opendata_mcp

# Or with uv
uv run scb_opendata_mcp

See scb_opendata_mcp --help for available options. An stdio transport mechanism also exists.

Fallback option

uv run fastmcp run src/scb_opendata_mcp/server.py -t http  # HTTP server

Configuration for common agent harnesses

Claude Code

claude mcp add --scope user --transport http scb_opendata_mcp http://localhost:6767

Mistral Vibe

In ~/.vibe/config.toml or ~/.vibe/agents/name_of_agent.toml:

[[mcp_servers]]
name = "scb_opendata_mcp"
transport = "http"
url = "http://localhost:6767/mcp"

OpenCode

In ~/.config/opencode/opencode.jsonc:

{
  "mcp": {
    "scb_opendata_mcp": {
      "type": "remote",
      "url": "https://localhost:6767/mcp",
      "enabled": true
    }
  }
}

Tools Available

Table Discovery

  • list_tables() - List all available statistical tables with pagination
  • get_table_metadata(table_id) - Get detailed metadata including variables
  • search_tables(query) - Convenience wrapper over list_tables, to search tables by name or description

Data Retrieval

  • get_table_data(table_id, filters) - Fetch data with optional filtering
  • get_table_default_selection(table_id) - Get default data selection for a table

Codelist Tools

  • list_codelists(table_id) - List all available codelists for the table
  • get_codelist(codelist_id) - Get specific codelist details

Saved Query Tools

  • get_saved_query(query_id) - Get a saved query including data and selection criteria
  • get_saved_query_data(query_id) - Get data from a specific saved query
  • get_saved_query_selection(query_id) - Get the selection query used in a specific saved query
  • save_query(table_id, selection) - Save a data query
  • delete_saved_query(query_id) - Delete a saved query

Development

Running Tests

uv run pytest

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License

Support

For issues or questions:

  • Review the OpenAPI specification or alternatively from <https://github.com/PxTools/PxApiSpecs/blob/master/PxAPI-2.yml>.
  • Visit Statistics Sweden API documentation:
  • På svenska: <https://www.scb.se/vara-tjanster/oppna-data/pxwebapi/pxwebapi-v2/>
  • In English: <https://www.scb.se/en/services/open-data-api/pxwebapi/>

SCB Open Data Skills

This is an unofficial companion repository SCB Open Data Skills that provides skill definitions for accessing Statistics Sweden's data through this MCP server. These skills are designed to work with major coding agent tools and provide workflows for various statistical domains.

Disclaimer

This is an unofficial tool. The code was generated using AI while using official documents and the API specification as context. Tests are also added to verify the functionality. A thorough rigorous verification test is recommended before using it in any serious application.

<!-- mcp-name: io.github.ashwinvis/scb-opendata-mcp -->

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Other servers.