
Statistics Sweden
Provides access to 1,200+ official Swedish government statistics tables from Statistics Sweden, covering demographics, economy, environment, and labor market data from the 1950s to present.
Access 1,200+ official Swedish statistics tables covering population, economy, environment, and labor market data
What it does
- Search Swedish statistical tables using Swedish terms
- Retrieve demographic and population data for 312+ regions
- Query economic indicators like GDP and business statistics
- Access environmental data including emissions and sustainability metrics
- Get labor market statistics including employment and skills data
- Preview and validate data selections before full retrieval
Best for
About Statistics Sweden
Statistics Sweden is a community-built MCP server published by isakskogstad that provides AI assistants with tools and capabilities via the Model Context Protocol. Statistics Sweden — Explore 1,200+ official tables on population, economy, environment and labor market data for Sweden. It is categorized under developer tools, analytics data. This server exposes 10 tools that AI clients can invoke during conversations and coding sessions.
How to install
You can install Statistics Sweden in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server supports remote connections over HTTP, so no local installation is required.
License
Statistics Sweden is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.
Tools (10)
Get API configuration and rate limit information from Statistics Sweden
Search for statistical tables in the SCB database. IMPORTANT: Swedish search terms give MUCH better results. Use "befolkning" not "population", "arbetslöshet" not "unemployment", "inkomst" not "income".
Get detailed metadata about a specific statistical table
Get statistical data from a table with optional filtering. Without selection, returns a smart default subset (latest time period, all categories). Use scb_preview_data for a quick preview first.
Check current API usage and rate limit status
📊 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
🇬🇧 Overview
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
🇬🇧 Key features (English)
| 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 |
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 |
🚀 Snabbstart
Enklaste sättet: Använd den redan hostade servern — ingen installation behövs!
MCP remote URL: https://scb-mcp.onrender.com/mcp
Lägg till denna konfiguration i din MCP-värd:
{
"mcpServers": {
"scb": {
"type": "http",
"url": "https://scb-mcp.onrender.com/mcp"
}
}
}
✅ Klart! Du har nu tillgång till alla 1 200+ svenska statistiktabeller.
🇬🇧 Quick start (English)
Easiest way: Use the already hosted server — no installation needed!
MCP remote URL: https://scb-mcp.onrender.com/mcp
Add this configuration to your MCP host:
{
"mcpServers": {
"scb": {
"type": "http",
"url": "https://scb-mcp.onrender.com/mcp"
}
}
}
✅ Done! You now have access to all 1,200+ Swedish statistical tables.
Installation & inställning
Alternativ 1: Remote URL (ingen installation)
Använd den hostade servern direkt - fungerar med alla MCP-kompatibla klienter:
URL: https://scb-mcp.onrender.com/mcp
| Klient | Hur du ansluter |
|---|---|
| GitHub Copilot (VS Code) | Lägg till i .vscode/mcp.json (se nedan) |
| ChatGPT (Dev Mode) | Lägg till MCP server URL: https://scb-mcp.onrender.com/mcp |
| Claude Web | Lägg till MCP server: https://scb-mcp.onrender.com/mcp |
| Gemini | Konfigurera HTTP MCP endpoint |
| Custom | POST till /mcp med JSON-RPC 2.0 |
GitHub Copilot (VS Code)
Skapa .vscode/mcp.json i ditt projekt:
{
"servers": {
"scb": {
"type": "http",
"url": "https://scb-mcp.onrender.com/mcp"
}
}
}
Eller använd Command Palette: MCP: Add Server och välj HTTP-typ.
Ingen autentisering krävs. CORS är aktiverat för alla domäner.
Alternativ 2: Lokal installation (Node.js)
För Claude Code, terminal-klienter eller egen hosting:
# Klona repository
git clone https://github.com/isakskogstad/SCB-MCP.git
cd SCB-MCP
# Installera och bygg
npm install
npm run build
Claude Code (CLI)
claude mcp add scb-mcp -- node /sökväg/till/SCB-MCP/dist/index.js
MCP-konfiguration (stdio)
Lägg till i ~/.config/claude/claude_desktop_config.json:
{
"mcpServers": {
"scb": {
"command": "node",
"args": ["/sökväg/till/SCB-MCP/dist/index.js"],
"type": "stdio"
}
}
}
Kör egen HTTP-server
npm run start # Startar på port 3000
# eller
PORT=8080 npm run start
Alternativ 3: Docker
docker build -t scb-mcp .
docker run -p 3000:3000 scb-mcp
🇬🇧 Installation & setup (English)
Option 1: Remote URL (no installation)
Use the hosted server directly - works with all MCP-compatible clients:
URL: https://scb-mcp.onrender.com/mcp
| Client | How to connect |
|---|---|
| ChatGPT (Dev Mode) | Add MCP server URL: https://scb-mcp.onrender.com/mcp |
| Claude Web | Add MCP server: https://scb-mcp.onrender.com/mcp |
| Gemini | Configure HTTP MCP endpoint |
| Custom | POST to /mcp with JSON-RPC 2.0 |
No authentication required. CORS enabled for all origins.
Option 2: Local installation (Node.js)
For Claude Code, terminal clients or self-hosting:
git clone https://github.com/isakskogstad/SCB-MCP.git
cd SCB-MCP
npm install
npm run build
Claude Code (CLI)
claude mcp add scb-mcp -- node /path/to/SCB-MCP/dist/index.js
MCP configuration (stdio)
Add to ~/.config/claude/claude_desktop_config.json:
{
"mcpServers": {
"scb": {
"command": "node",
"args": ["/path/to/SCB-MCP/dist/index.js"],
"type": "stdio"
}
}
}
Run your own HTTP server
npm run start # Starts on port 3000
# or
PORT=8080 npm run start
Option 3: Docker
docker build -t scb-mcp .
docker run -p 3000:3000 scb-mcp
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)
🇬🇧 Usage guide (English)
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"
🇬🇧 Resolve region codes (English)
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 år
🇬🇧 Fetch data (English)
data = 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 preview_data() först för att testa |
| För mycket data? |
README truncated. View full README on GitHub.
Alternatives
Related Skills
Browse all skillsGenerate an Agent Academy analytics report using Microsoft Clarity data and GitHub badge statistics. Use this skill to create HTML dashboard reports showing session trends, user metrics, and badge completion stats for Recruit, Operative, and Commander courses.
Export OpenClaw usage data to CSV for analytics tools like Power BI. Hourly aggregates by activity type, model, and channel.
Use when building MCP servers or clients that connect AI systems with external tools and data sources. Invoke for MCP protocol compliance, TypeScript/Python SDKs, resource providers, tool functions.
CCXT cryptocurrency exchange library for TypeScript and JavaScript developers (Node.js and browser). Covers both REST API (standard) and WebSocket API (real-time). Helps install CCXT, connect to exchanges, fetch market data, place orders, stream live tickers/orderbooks, handle authentication, and manage errors. Use when working with crypto exchanges in TypeScript/JavaScript projects, trading bots, arbitrage systems, or portfolio management tools. Includes both REST and WebSocket examples.
.NET/C# backend developer for ASP.NET Core APIs with Entity Framework Core. Builds REST APIs, minimal APIs, gRPC services, authentication with Identity/JWT, authorization, database operations, background services, SignalR real-time features. Activates for: .NET, C#, ASP.NET Core, Entity Framework Core, EF Core, .NET Core, minimal API, Web API, gRPC, authentication .NET, Identity, JWT .NET, authorization, LINQ, async/await C#, background service, IHostedService, SignalR, SQL Server, PostgreSQL .NET, dependency injection, middleware .NET.
Build full-stack applications with Supabase (PostgreSQL, Auth, Storage, Real-time, Edge Functions). Use when implementing authentication, database design with RLS, file storage, real-time features, or serverless functions.