scb-mcp MCP Server
MCP server for Statistics Sweden (SCB) - 1200+ tables with population, economy, environment data
scb-mcp scores 41 (Fair), with no SPDX license recorded and written in TypeScript. It can be reached as a remote MCP endpoint. It does not declare tools yet. Filed under Uncategorized. GitHub shows 9 stars. Install configs are generated for 12 clients. Being listed in the registry is not the same as being vendor-official.
Fair trust
41 of 100 from six public signals. Nobody can buy a point.
- Listed in the official MCP registry.
- No license recorded.
License, quality and maintenance
Quality: Grade C
60/100 for listing completeness. Lost points: no listed tools, short summary, no docs link.
How quality is graded
Where the 41 comes from
22 + 5 + 3 + 0 + 4 + 7 = 41. Each factor is capped, so no single signal can carry a listing.
Active in the official MCP registry, plus a known vendor namespace.
Registry: 22 of 30 points.How recently the repository saw a commit or release.
Maintenance: 5 of 20 points.GitHub stars and weekly downloads, on a log scale.
Popularity: 3 of 20 points.A clear, OSI-style open-source license.
License: 0 of 10 points.Not archived, a secure install path, a pinned version.
Security: 4 of 10 points.A real summary, a README with depth, listed tools.
Docs: 7 of 10 points.Install
Pick your client, copy the config, paste it in.
Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.
{ "mcpServers": { "isakskogstad-scb-mcp": { "url": "https://scb-mcp.onrender.com/mcp" } }}
Environment variables
This server does not declare environment variables.
Tools
All capabilitiesTools show up when the registry metadata or the repository README lists them. Public READMEs are read directly. A GitHub token is used only when one is already configured.
About
đ 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 |
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 build
Claude Code (CLI)
claude mcp add scb -- node /absolut/sökvÀg/till/SCB-MCP/dist/index.js
Claude 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 build
Claude Code (CLI)
claude mcp add scb -- node /absolute/path/to/SCB-MCP/dist/index.js
Claude 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 Är
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? | AnvÀnd "TOP(5)" istÀllet för "*" för tidsperioder |
| Felaktiga koder? | Anropa get_table_variables() först â koder varierar mellan tabeller |
| OsÀker pÄ enheter? | Kontrollera variabeletikett för enheter (kt, ton, procent osv.) |
| Issue | Solution |
|---|---|
| Large dataset? | Always use preview_data() first to test |
| Too much data? | Use "TOP(5)" instead of "*" for time periods |
| Wrong codes? | Call get_table_variables() first â codes vary between tables |
| 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 snabbare
data = 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
Frequently asked questions
What is scb-mcp MCP Server?
MCP server for Statistics Sweden (SCB) - 1200+ tables with population, economy, environment data
How do I install scb-mcp MCP Server in Claude Desktop, Cursor, or VS Code?
Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. scb-mcp MCP Server connects to the remote endpoint https://scb-mcp.onrender.com/mcp, so there is nothing to install locally.
Does scb-mcp MCP Server support remote (HTTP) connections?
Yes. scb-mcp MCP Server offers a hosted endpoint over Streamable HTTP, so HTTP-capable clients can connect to it without running anything locally.
How is scb-mcp MCP Server's trust score calculated?
scb-mcp MCP Server scores 41 out of 100 (Fair). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.
Reviews
No reviews yetâBe the first to review
No published reviews yet. Used it? Tell the next person how it went.
Sign inA verified email is required to review this server.
Add badge to your README
Paste either snippet into the repository README. The image links to this listing.