mcp-ssb
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., "@mcp-ssbhva er prisveksten de siste 3 månedene?"
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.
mcp-ssb
MCP-server for Statistisk sentralbyrå — 3 898 statistikktabeller indeksert lokalt, tallene hentet live. Ingen autentisering.
Dette er de faktiske norske tallene: prisvekst, boligpriser, lønn, befolkning, arbeidsledighet. Til forskjell fra mcp-datanorge, som bare forteller hvilke datasett som finnes.
Hvorfor lokal indeks
SSBs eget fritekstsøk er ubrukelig. Målt 2. september 2026 mot
data.ssb.no/api/pxwebapi/v2-beta/tables?query=:
Søk | SSBs søk | Denne serveren |
| 1 treff — feil tabell | 16 treff, Konsumprisindeks øverst |
| 0 treff | 2 treff, Prisindeks for brukte boliger |
| — | 11 treff |
| 318 treff, FoU-personale øverst | 18 treff, befolkningstabeller |
Søket er delstreng uten stemming eller rangering. Men hele katalogen kommer i ett kall — 3 898 tabeller, 6 MB — så den indekseres lokalt med FTS5 i stedet.
Related MCP server: SCB MCP Server
Søket er bygget for norsk
Tre ting skiller det fra et vanlig fulltekstsøk:
Dagligtale oversettes til SSBs termer. «Boligprisindeks» finnes ikke i noen tabelltittel; SSB kaller den «Prisindeks for brukte boliger». Broen er en kuratert liste i
src/synonyms.js, ikke en ordbok — hver oppføring er verifisert mot katalogen.Søket trapper opp. Eksakte ord → prefiks → stammet prefiks → delvise treff. Norsk er et sammensetningsspråk, så «konsumpris» finnes ikke som eget ord i «Konsumprisindeks», og «arbeidsledighet» ikke i «Arbeidsledige». Feltet
strategisier hvilket trinn som slo til.variableNameser indeksert. En tabell er ofte lettest å finne på dimensjonene den har enn på tittelen.
Verktøy
Verktøy | Hva det gjør |
| Finn tabellen. Lokalt, millisekunder. |
| Dimensjonene i en tabell med gyldige koder. Bruk før |
| Tall med eksplisitt utvalg per dimensjon. |
| Siste N perioder uten dimensjonsarbeid — «hva er tallet nå». |
| Indeksens alder; oppfrisking. |
Kommandolinje
ssb sok boligpriser # oversettes til «brukte boliger prisindeks»
ssb tabell 03013 # dimensjoner og koder
ssb siste 03013 --perioder 3 # 138.7 · 138.9 · 139.1
ssb data 03013 --velg ContentsCode=Tolvmanedersendring --velg Konsumgrp=TOTAL --perioder 4
ssb status--json gir rå JSON. ssb hjelp viser alt.
Installasjon
npm install
npm run sync # bygger indeksen, ~2 s
claude mcp add --scope user ssb -- node ~/Work/mcp-ssb/src/index.js
ln -sf ~/Work/mcp-ssb/src/cli.js ~/.local/bin/ssbIndeksen havner i ~/.local/share/mcp-ssb/ssb.db. Overstyr med SSB_DB eller
XDG_DATA_HOME.
API-ene
To generasjoner brukes med vilje:
v2-beta (
/api/pxwebapi/v2-beta/tables?pageSize=5000) — hele katalogen i ett kallv0 (
/api/v0/no/table/{id}) — metadata med GET, tall med POST og json-stat2
json-stat2 er tett: én flat verdiliste pluss dimensjoner med indeks, der siste dimensjon
varierer raskest. Flatingen til rader ligger i flattenJsonStat() og har egne
enhetstester på et innbakt eksempel — ingen nettverk.
Dimensjoner merket elimination kan utelates, og da summerer SSB over dem. Det er slik
latest får totaltall uten å måtte velge en verdi i hver dimensjon.
Utvikling
npm test # 14 tester; de mot indeksen hopper over hvis den mangler
npm start # kjør serveren på stdioLisens
MIT for koden. Tallene er SSBs, gjenbrukbare etter deres vilkår.
Available Tools
6 toolsdataHent tall fra en tabellA
Henter tall med et eksplisitt utvalg per dimensjon. Kjør table først for
å se gyldige koder.
selections er et objekt med dimensjonskode som nøkkel og en liste koder
som verdi. ["*"] betyr alle verdier i den dimensjonen. Dimensjoner du
utelater blir summert dersom de kan utelates — ellers avviser SSB spørringen.
latestPeriods er en snarvei for de siste N periodene.
| Name | Required | Description | Default |
|---|---|---|---|
| maxRows | No | ||
| tableId | Yes | ||
| selections | No | F.eks. {"ContentsCode":["KpiIndMnd"],"Konsumgrp":["TOTAL"]} | |
| latestPeriods | No | Siste N perioder i stedet for å velge Tid selv. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must carry behavioral disclosure. It reveals that omitted dimensions are summed when possible and otherwise cause SSB to reject the query, and that `latestPeriods` is a shortcut. However, it does not describe the output format, error handling, or potential side effects, leaving gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is three sentences: purpose, prerequisite with selection semantics, and a parameter shortcut. Each sentence earns its place and is front-loaded with the main purpose, though it is slightly dense.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has a nested object and 4 parameters; the description explains the complex `selections` and `latestPeriods` well, but omits any mention of the return format or error behavior. With no output schema, this is a notable gap for a data-fetch tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema covers 50% of parameters; the description compensates by explaining the `selections` object structure, the wildcard `["*"]`, and the omission behavior, plus the meaning of `latestPeriods`. `maxRows` and `tableId` are self-explanatory from schema constraints, so the added value is solid.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool fetches numbers from a table with explicit per-dimension selections, which is a specific verb and resource. It also references running `table` first to get valid codes, implying a clear distinction from the metadata sibling.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explicitly instructs to run `table` first to see valid codes, and explains how to use `selections` and `latestPeriods` with concrete semantics. It does not mention alternatives for data fetching beyond `latestPeriods`, but the prerequisite and parameter usage guidance is strong.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
latestSiste tall fra en tabellA
Snarvei for «hva er tallet nå». Velger første statistikkvariabel, de siste N periodene, og lar SSB summere over dimensjoner som kan utelates. Dimensjoner som må settes får sin første verdi — de listes i svaret som fastsatteDimensjoner, så du ser hva som faktisk ble målt. Trenger du noe annet, bruk table og data.
| Name | Required | Description | Default |
|---|---|---|---|
| periods | No | ||
| tableId | Yes | ||
| contents | No | Kode for statistikkvariabel, hvis ikke den første. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are present, so the description carries the burden. It discloses that omitted dimensions are summed, required dimensions get their first value, and the returned `fastsatteDimensjoner` field reveals what was measured. This is substantive, though it does not address errors, limits, or response structure.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Four concise sentences, front-loaded with the shortcut purpose, then behavior, then routing. No redundant or filler wording; every sentence earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description is enough to select and invoke the tool: it identifies the table context, parameters, behavior, and the response signal. It lacks a concrete example or output shape, but for a simple shortcut with no output schema this is a minor gap.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With schema coverage at 33%, the description compensates by explaining `periods` as the last N periods and `contents` as the first statistical variable unless another code is given. `tableId` remains implicit but is inferable from the title and the required field's purpose.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a clear purpose: a shortcut for the current number from a table, selecting the first statistical variable and the latest N periods. It explicitly contrasts with the table and data siblings, making the tool's scope identifiable.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It gives explicit usage context: use this when you want the current figure, and if you need anything else, use `table` and `data`. This directly names alternatives and conditions, leaving little to inference.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
searchFinn en statistikktabellA
Søk i SSBs 3 898 tabeller på tittel, beskrivelse og dimensjonsnavn.
Søket er bygget for norsk: det oversetter dagligtale til SSBs egne termer
(«boligpris» finnes ikke — tabellen heter «Prisindeks for brukte boliger»),
og trapper opp fra eksakte ord via prefiks til stamme til det gir treff.
Feltet strategi sier hvilket trinn som slo til; «delvis» betyr at ikke
alle ordene finnes i samme tabell, og da bør treffene leses med skepsis.
Bruk latest eller data med tabell-IDen for å få selve tallene.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| query | Yes | Hva du leter etter, f.eks. "konsumprisindeks" eller "sykefravær". | |
| offset | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full behavioral disclosure burden. It explains Norwegian colloquial-term expansion, the escalation through exact/prefix/stem matching, and the meaning of the `strategi` field — including a warning that 'delvis' results should be read skeptically. This is rich, non-obvious behavior that an agent would otherwise not know.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is dense but every sentence earns its place: scope, language behavior, match-strategy caveat, and routing to sibling tools. It is front-loaded with the core purpose and uses paragraph breaks to separate distinct ideas without padding.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given there is no output schema and no annotations, the description does a good job of setting expectations: it mentions the `strategi` result field, explains how to interpret match quality, and tells the agent how to retrieve data from the found table. It does not describe pagination or potential error cases, which are minor omissions for a search tool where the core usage is already clear.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is only 33%, so the description must compensate. It does this for the key parameter `query` by giving two concrete examples ('konsumprisindeks', 'sykefravær') and explaining how the search interprets natural-language input. `limit` and `offset` are not described beyond their schema constraints, but their semantics are conventional and structurally annotated with defaults, min, and max.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb and resource: 'Søk i SSBs 3 898 tabeller' and names the exact searchable fields (title, description, dimension names). It also distinguishes itself from siblings by explicitly directing the agent to use `latest` or `data` with a table ID to get actual numbers.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description clearly tells the agent what to do after searching: 'Bruk `latest` eller `data` med tabell-IDen for å få selve tallene.' This gives a concrete usage boundary. It does not explicitly exclude all sibling tools like `table`, `status`, or `sync`, so it falls just short of a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
statusStatus for den lokale indeksenA
Når tabellkatalogen sist ble hentet, og hvor mange tabeller den inneholder.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full responsibility for behavioral disclosure. It does reveal the core output: catalog freshness and table count. However, it does not state whether calling status has side effects, whether it can trigger a refresh (especially relevant given the 'sync' sibling), or what format the timestamp/count will take.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence that directly states the two key pieces of information the tool returns. There is no filler, repetition, or unnecessary context; every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple parameterless status tool, the description is nearly complete: it specifies the two outputs an agent would care about. It could add a brief note that it merely reports status and does not invoke a sync, but the title and sibling context make this mostly inferable.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, and the schema confirms this with an empty properties object. No parameter documentation is needed, so the description does not need to compensate for any schema gaps. Baseline 4 is appropriate for a parameterless tool.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states what information the tool reports: when the table catalog was last fetched and how many tables it contains. This goes beyond the generic title 'status' and distinguishes it from data/search/sync siblings by indicating it is a status/inspection tool. It lacks an explicit verb, but the reporting function is unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is given about when to choose this tool over its siblings such as 'sync', 'latest', or 'data'. The description only says what information is shown, not when it should be used or when an alternative would be more appropriate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
syncHent tabellkatalogen på nyttA
Laster ned hele SSBs tabellkatalog og bygger indeksen om. Tar noen sekunder. En systemd-timer gjør dette ukentlig.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses the full-catalog download, index rebuild, approximate duration, and the weekly automatic trigger. It does not mention potential side effects such as index availability during rebuild, but it is far more transparent than a minimal one-word description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two concise sentences, with the core action front-loaded and the additional timing/automation context placed after. No word is wasted.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-parameter operation with no output schema, this description is complete enough: it says what happens, how long it takes, and that it is normally handled automatically. An agent can decide to invoke it based on this information.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so the description does not need to explain parameter meaning. Per the baseline for an empty parameter set, a score of 4 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific action ('Laster ned hele SSBs tabellkatalog og bygger indeksen om') with a clear resource and scope. It is distinct from sibling tools like search, table, data, latest, and status, leaving no ambiguity about what sync does.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It implicitly communicates when manual use is needed by noting that a systemd timer runs the same task weekly. This gives useful context about the tool's role, though it does not explicitly name alternatives or say 'use this only when you need immediate freshness'.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
tableVis dimensjonene i en tabellA
Hvilke dimensjoner en tabell har, og hvilke koder hver av dem godtar.
Bruk dette før data — hver tabell har sitt eget kodeverk, og uten å se
det blir spørringen gjetning.
Dimensjoner merket kanUtelates summeres av SSB hvis du hopper over dem;
det er slik man får totaltall i stedet for en oppdeling.
| Name | Required | Description | Default |
|---|---|---|---|
| tableId | Yes | Tabellnummer fra et søketreff, f.eks. 03013. | |
| maxValues | No | Hvor mange verdier som vises per dimensjon. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full behavioral burden. It adds non-obvious domain behavior: dimensions marked `kanUtelates` are summed by SSB if omitted, giving totals instead of a breakdown, and it warns that code sets differ per table. These are useful behavioral hints beyond the schema. It does not explicitly address side effects, but the tool is clearly ametadata lookup, so the gap is minor.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three compact, purposeful sentences. The purpose is front-loaded, followed by explicit usage guidance and then a key domain caveat. Every sentence contributes value; there is no fluff or repetition of schema content.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a two-parameter metadata retrieval tool with no output schema and no annotations, the description adequately covers purpose, when to use it, and a subtle behavioral detail about totals. It doesn't explicitly describe the exact response format, but the statement of what it returns ('dimensions... and codes') is sufficiently clear for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, with meaningful descriptions for both `tableId` and `maxValues`. The tool description does not add new parameter-level meaning beyond the schema, so the baseline of 3 applies. The mention of 'koder' loosely ties to `tableId` but does not enrich it further.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states what the tool does: it shows which dimensions a table has and which codes each dimension accepts. The title 'Vis dimensjonene i en tabell' reinforces the action, and the content distinguishes it from the `data` sibling by framing it as a pre-query inspection step.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly instructs 'Bruk dette før `data`', giving a clear when-to-use rule supported by the rationale that each table has its own code set, without which the query becomes guesswork. This points directly to the relevant sibling and explains why the tool is needed first.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
The six tools map to distinct stages in the workflow: discovery (search), schema lookup (table), explicit queries (data), quick latest values (latest), and catalog maintenance/status (status/sync). Even though data and latest both return numbers, latest is clearly framed as a convenience shortcut, so an agent should not confuse them.
All names are lowercase single words, so the style is uniform and there is no case or convention mixing. The semantic pattern is less regular, however: some are verbs (search, sync), some are nouns (table, data, status), and latest is an adjective, and none follow a verb_noun shape.
Six tools is appropriate for a read-only statistics API: discovery, metadata, query, convenience access, and catalog health/maintenance are each represented without redundancy. The count feels well-scoped for the server's purpose.
The core workflow is complete: search finds a table, table exposes dimensions and codes, data fetches specific selections, and latest covers a common shortcut; status and sync handle catalog freshness. The only minor gap is a lack of any browse/list-all-tables capability, but search is clearly designed to cover discovery.
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 Connectors
Access European statistics: GDP, unemployment, inflation, population data.
Semantic search over Nordic filings, press releases, macro data and electricity prices.
Search and query 1,500+ OECD statistical datasets via SDMX. Keyless.
Query UK Parliament, elections, crime stats, ONS census data, and national archives
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables natural language access to Denmark's Statistics API (Danmarks Statistik), allowing users to query and analyze Danish statistical data without coding knowledge through AI-powered interactions.MIT
- FlicenseNot gradedqualityCmaintenanceEnables LLMs to search, access, and retrieve official Swedish statistics from Statistics Sweden (SCB), providing access to 1,200+ tables covering demographics, economy, environment, labor market, and education with 75+ years of historical data.7
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to query Norges Bank's open data API for exchange rates, policy rates, government securities, money market data, bank liquidity, and regional network survey data.MIT
- AlicenseNot gradedqualityCmaintenanceEnables querying statistical data from ÅSUB PxWeb. Supports navigating subject trees, retrieving table metadata, and querying tables with natural language.4MIT
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/synjan/mcp-ssb'
If you have feedback or need assistance with the MCP directory API, please join our Discord server