SCB MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@SCB MCP Servershow me population growth in Stockholm from 2010 to 2020"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
đ SCB MCP Server
SCB MCP Àr server som LLM:s och AI-chatbotar kan anvÀnda för att söka, hitta och hÀmta officiell data och statistik frÄn StatistikbyrÄn (SCB). Det omfattar 1 200+ statistiktabeller med data om befolkning & demografi, ekonomi & finans, miljö, arbetsmarknad, utbildning och transport. Perfekt för att bygga interaktiva instrumentpaneler, forskningsverktyg och utbildningsapplikationer.
Ăversikt
The SCB MCP server provides seamless integration with Statistics Sweden's PxWebAPI 2.0, enabling LLM:s to access:
Population & Demographics: Regional data, migrations, births, deaths (312+ regions)
Economy & Finance: GDP, taxes, business statistics, national accounts
Environment: Greenhouse gas emissions, water/waste management, sustainability metrics
Labor Market: Employment, unemployment, occupational data, skills matching
Education: Student statistics, course enrollments, skills development
Data ranges from 1950s to present (monthly/quarterly updates). Real-time population statistics updated to November 2025.
Befolkning & demografi: Regionaldata, migrationer, födslar, dödsfall (312+ regioner)
Ekonomi & finans: BNP, skatter, företagsstatistik, nationalrÀkenskaper
Miljö: VÀxthusgaser, vatten/avfallshantering, hÄllbarhetsvÀrdena
Arbetsmarknad: SysselsÀttning, arbetslöshet, yrkesdata, kompetensmatchning
Utbildning: Studentstatistik, kursanmÀlningar, kompetensutveckling
Feature | Description |
Comprehensive Access | 1,200+ tables, 312+ regions, 75+ years of historical data |
Smart Querying | Natural language search, region code resolution ("Lerum" â 1441), TOP() & wildcard support |
Fuzzy Matching | "Goteborg" matches "Göteborg", "Malmo" matches "Malmö" |
Developer-Friendly | Full documentation, clear errors with suggestions, selection validation, metadata in responses |
Production-Ready | Rate limiting (30 req/10s), consistent behavior, proper data types, language support (SV/EN) |
Swedish by Default | All tools use Swedish (sv) as default for best search results |
Real-Time Data | Monthly/quarterly updates, population data to November 2025 |
Related MCP server: Kolada MCP Server
Huvudfunktioner
Funktion | Beskrivning |
Omfattande Ätkomst | 1 200+ tabeller, 312+ regioner, 75+ Ärs historiska data |
Smart sökning | NatursprĂ„kig sökning, regionkodupplösning ("Lerum" â 1441), TOP() & wildcard-stöd |
Fuzzy matching | "Goteborg" matchar "Göteborg", "Malmo" matchar "Malmö" |
UtvecklarvÀnlig | FullstÀndig dokumentation, tydliga felmeddelanden, valideringsmöjligheter, metadata i svaren |
Produktionsklar | Rate limiting (30 req/10s), konsekvent beteende, rÀtt datatyper, sprÄkstöd (SV/EN) |
Svenska som standard | Alla verktyg anvÀnder svenska (sv) som default för bÀsta sökresultat |
Aktuell data | MÄnatliga/kvartalsvisa uppdateringar, befolkningsdata till november 2025 |
đ Installation
Servern körs lokalt via stdio. Klona, bygg och peka din MCP-klient mot dist/index.js.
git clone https://github.com/isakskogstad/SCB-MCP.git
cd SCB-MCP
npm install
npm run buildClaude Code (CLI)
claude mcp add scb -- node /absolut/sökvÀg/till/SCB-MCP/dist/index.jsClaude Desktop / Codex / Gemini / Cursor (stdio)
LÀgg till i klientens MCP-konfiguration (t.ex. ~/Library/Application Support/Claude/claude_desktop_config.json för Claude Desktop):
{
"mcpServers": {
"scb": {
"command": "node",
"args": ["/absolut/sökvÀg/till/SCB-MCP/dist/index.js"]
}
}
}The server runs locally over stdio. Clone, build, and point your MCP client to dist/index.js.
git clone https://github.com/isakskogstad/SCB-MCP.git
cd SCB-MCP
npm install
npm run buildClaude Code (CLI)
claude mcp add scb -- node /absolute/path/to/SCB-MCP/dist/index.jsClaude Desktop / Codex / Gemini / Cursor (stdio)
{
"mcpServers": {
"scb": {
"command": "node",
"args": ["/absolute/path/to/SCB-MCP/dist/index.js"]
}
}
}AnvÀndarguide
1. Sök efter statistiktabeller
# Hitta befolkningsrelaterade tabeller
results = scb.search_tables(query="befolkning statistik", limit=10)
# Filtrera efter kategori
results = scb.search_tables(query="miljö", category="environment", limit=5)1. Search for statistical tables
results = scb.search_tables(query="population", limit=10)
results = scb.search_tables(query="environment", category="environment", limit=5)2. Hitta regionkoder
# Lerum kommun
region = scb.find_region_code(query="Lerum")
# Returnerar: code="1441", name="Lerum"
# Större regioner
region = scb.find_region_code(query="Stockholm")
# Returnerar: code="01" (lÀn), code="0180" (kommun)
# Fuzzy matching - fungerar utan svenska tecken
region = scb.find_region_code(query="Goteborg")
# Returnerar: code="1480", name="Göteborg"region = scb.find_region_code(query="Lerum")
region = scb.find_region_code(query="Stockholm")
# Fuzzy matching - works without Swedish characters
region = scb.find_region_code(query="Goteborg")
# Returns: code="1480", name="Göteborg"3. HÀmta data
# MedelÄlder i Lerum 2024
data = scb.get_table_data(
tableId="TAB637",
selection={
"Region": ["1441"],
"Kon": ["1+2"],
"Tid": ["2024"],
"ContentsCode": ["BE0101G9"]
}
)
# Resultat: MedelÄlder i Lerum 2024: 40.1 Ärdata = scb.get_table_data(
tableId="TAB637",
selection={
"Region": ["1441"],
"Kon": ["1+2"],
"Tid": ["2024"],
"ContentsCode": ["BE0101G9"]
}
)Best practices
Problem | Lösning |
Stor datamÀngd? | AnvÀnd alltid |
För mycket data? | AnvÀnd |
Felaktiga koder? | Anropa |
OsÀker pÄ enheter? | Kontrollera variabeletikett för enheter (kt, ton, procent osv.) |
Issue | Solution |
Large dataset? | Always use |
Too much data? | Use |
Wrong codes? | Call |
Unsure about units? | Check variable label for units (kt, tonnes, percent, etc.) |
Praktiska exempel
Ex: Befolkningstrend Lerum vs Stockholm
# JÀmför tvÄ regioner över tid
data = scb.get_table_data(
tableId="TAB637",
selection={
"Region": ["1441", "0180"], # Lerum och Stockholm
"Kon": ["1+2"],
"Tid": ["TOP(5)"],
"ContentsCode": ["BE0101G9"]
}
)
# Stockholm: 41.0 Är (2024), Lerum: 40.1 Är (2024)
# Trend: Stockholm Äldras snabbaredata = scb.get_table_data(
tableId="TAB637",
selection={
"Region": ["1441", "0180"], # Lerum and Stockholm
"Kon": ["1+2"],
"Tid": ["TOP(5)"],
"ContentsCode": ["BE0101G9"]
}
)
# Stockholm: 41.0 years (2024), Lerum: 40.1 years (2024)Resurser
SCB-databas: https://www.scb.se/
API-dokumentation: https://www.scb.se/en/services/open-data-api/pxwebapi/
Dataexplorer: https://pxweb.scb.se/pxweb/en/
Av: Isak Skogstad
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables LLMs to access Swedish educational data through Skolverket's open APIs, allowing users to search curricula, courses, schools, adult education programs, and analyze educational requirements and standards. Provides comprehensive tools for teachers, students, guidance counselors, and educational researchers to interact with official Swedish education data.Last updated2710MIT
- Alicense-qualityCmaintenanceProvides access to Sweden's comprehensive municipal and regional statistics database with semantic search capabilities. Enables natural language queries against thousands of Key Performance Indicators covering various aspects of Swedish public sector data.Last updated16Apache 2.0
- AlicenseAqualityBmaintenanceQuery Swedish public data from AI tools. Includes company data, SCB statistics, weather, transport, public agencies, and more through the Apiverket API.Last updated2672MIT
- Alicense-qualityCmaintenanceEnables easy access to open data from the Swedish National Agency for Education, allowing querying and integration of educational statistics and facts through large language models.Last updated1MIT
Related MCP Connectors
Statistics Sweden (SCB) â PxWeb JSON-stat statistical database
Give your agent web search and authoritative datasets: S&P Global, FRED, OECD, SimilarWeb & more.
Statistics Norway (SSB) PxWebApi MCP.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/isakskogstad/SCB-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server