Tilastokeskus StatFin MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| PORT | No | HTTP server port | 8080 |
| API_TOKEN | No | Optional authentication token | |
| LOG_LEVEL | No | Logging level (debug, info, warn, error) | info |
| MCP_TRANSPORT | No | Set to 'http' for HTTP transport | stdio |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| search_statisticsA | Search Statistics Finland's StatFin database for statistical tables by keyword. USE THIS FIRST when looking for data. Returns ranked results with relevance scores. Examples:
Returns: tableId (needed for query_table), title, relevance score, publication date. After finding a table, use get_table_metadata to see its structure before querying. |
| list_subject_areasA | List all 149 subject areas (topics) in StatFin database. Use this to explore what statistics are available when you don't have a specific search term. Topic examples:
After finding an area, use list_tables to see all tables in that topic. |
| list_tablesA | List all statistical tables within a subject area. Each area typically has 20-40 tables with different data views. Common subject areas:
Use list_subject_areas first to find the area ID, or use search_statistics for direct search. |
| get_table_metadataA | Get the structure of a table: what variables it has and what values are available. REQUIRED before querying - shows you:
Example: a region variable may have 300+ values, a year variable 50+. After understanding the structure, use query_table with the exact codes from this output. |
| get_variable_valuesA | Get the complete list of values for a variable when metadata only shows first 20. Useful for:
Common region codes:
Use search parameter to filter: search="Helsinki" returns only matching values. |
| query_tableA | Execute a query to retrieve actual statistical data from a table. WORKFLOW: search_statistics → get_table_metadata → query_table Selection types:
Example - Helsinki population for last 5 years (the variable codes below are from table 11re.px; YOUR table's codes WILL differ - always read them from get_table_metadata first, never reuse these): { "tableId": "11re.px", "selections": [ {"variable": "alue_23_20260101", "filter": "item", "values": ["KU091"]}, {"variable": "timeperiod_y", "filter": "top", "top": 5}, {"variable": "sukupuoli_9_20180101", "filter": "item", "values": ["SSS"]}, {"variable": "ikaryhma_10_20180101", "filter": "item", "values": ["SSS"]}, {"variable": "contentscode", "filter": "item", "values": ["vaerak-vaesto"]} ] } IMPORTANT: Variable codes are table-specific; get them from get_table_metadata. Use VALUE CODES (KU091, SSS), not labels (Helsinki, Total). |
| get_api_statusA | Get server health, rate limit status, and cache statistics. Use when:
Rate limit: 8 requests per minute per instance. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 7 tools
Each tool has a clearly distinct purpose: search, list topics, list tables, get metadata, get variable values, query data, and check status. No overlaps or ambiguous boundaries; the workflow is explicitly sequential and each step is unique.
All tool names follow a consistent verb_noun snake_case pattern: search_statistics, list_subject_areas, list_tables, get_table_metadata, get_variable_values, query_table, get_api_status. Predictable and uniform.
With 7 tools, the server is well-scoped for a statistical database access. Each tool is essential and earns its place—no redundant or missing operations. The count is comfortably within the optimal 3-15 range.
The toolset covers the entire lifecycle from discovery (search, list subject areas, list tables) to detailed exploration (metadata, variable values) to data retrieval (query) and system status. No significant gaps; the workflow is fully supported.