PX-Web General Statistics MCP Server
Access 1,000+ official Latvian statistical tables through AI. Population, economy, wages, education, environment and more — data from 1920 to present.
Overview
This MCP server connects AI assistants to the Official Statistics Portal of Latvia (PX-Web), maintained by the Central Statistical Bureau of Latvia. It provides structured access to the entire public statistical database through a set of navigation and query tools.
Data Coverage
11 statistical domains including Population, Labour Market, Economy, Trade, Education, Environment, Health, Business, and IT.
Historical Depth
Some datasets start from 1920. Most cover the last 20+ years with annual, quarterly, and monthly granularity.
Update Frequency
Data is updated as new statistics are published — typically monthly, quarterly, or annually depending on the indicator.
Connection
{
"mcpServers": {
"latvia-statistics": {
"url": "https://mcp-px.stat.gov.lv/mcp"
}
}
}Endpoint: https://mcp-px.stat.gov.lv/mcp · Transport: Streamable HTTP · No API key required
Available Tools
| Tool | Purpose | Key Parameters |
|---|---|---|
getContext |
Get server documentation, workflow patterns, API structure | — |
choose_lang |
Set language (English or Latvian) | lang: "en" or "lv" |
get_topics |
Browse statistical domains (Population, Economy, etc.) | name (optional filter), lang |
get_topic_content |
Get sub-categories within a domain | topic: topic code (e.g. "POP") |
get_titles |
List data tables in a category | topic_content_code |
get_tables_by_keyword |
Search tables by keyword | keyword: search term |
filter_by_code |
Filter tables by code pattern | code: code or partial code |
get_query_values |
Get dimensions and filter values for a report | topic_params: [topic, content, subcontent, report_id] |
get_csp_data |
Retrieve statistical data with filters | topic_params, query_filters |
construct_csp_link |
Generate URL to view report on data.stat.gov.lv | params: [topic, content, subcontent, report_id] |
Statistical Domains
| Code | Domain | Topics |
|---|---|---|
| POP | Population | Demographics, births, deaths, migration |
| EMP | Labour market | Employment, unemployment, wages |
| VEK | Economy | GDP, production, consumption |
| TIR | Trade & services | Retail, services, tourism |
| ENT | Business | Enterprises, entrepreneurship |
| IZG | Education & culture | Education, research, culture |
| VES | Social security & health | Healthcare, social protection |
| NOZ | Industry sectors | Agriculture, manufacturing |
| ENV | Environment | Climate, natural resources |
| IKT | IT | Digital economy, telecom |
| FIN | Well-being | Quality of life, equality |
Example Questions
- What is Latvia’s population in 2025?
- Show average wages by economic sector for 2024
- Compare unemployment rates between men and women
- What is Latvia’s GDP growth over the last 10 years?
- How many students are in higher education?
- Show consumer price index monthly changes
- What environmental data is available about emissions?
- Compare birth rates across regions
Typical Workflow
getContext— understand available tools and workflow patternschoose_lang("en")— set language to English (or "lv" for Latvian)get_tables_by_keyword("population")— find relevant tablesget_query_values(["POP","IR","IRS","IRS010"])— see available dimensions and valuesget_csp_data(topic_params=["POP","IR","IRS","IRS010"], query_filters={"TIME":["2024","2025"]})— retrieve the data
Data Source
All data comes from the Official Statistics Portal (data.stat.gov.lv), published by the Central Statistical Bureau of Latvia. The portal is based on the PX-Web system developed by Statistics Sweden (SCB).
Data is free to use under the CC BY 4.0 license. No authentication required.