CSP Data

by arturslunevsco.huggingface.arturslunevs/csplv_mcp_test

Get Central Statistical Bureau of Latvia (CSP) data

  • Remote endpoint
  • 11 tools
  • MIT

Uptime

Checked  · every day

100%from 4 days of checks

Up without downtime on 4 of 4 days with data.

  • No downtime
  • Degraded
  • Down over 5 minutes
  • No data
  • Not checked yet

Response time

Median 969 ms, slowest 5% 1202 ms for the handshake and the tool list, over 30 days.

1500 ms750 ms0

How far each check got

  • Reached the address 100%
  • Completed the handshake 100%
  • Listed its tools 100%

11 tools at the last answer.

Every day
DayResultChecksMedian
3 Nov (today)No downtime1969 ms
2 NovNo downtime1of 1962 ms
1 NovNo downtime1of 11128 ms
31 OctNo downtime11160 ms

A failure counts as down time only when a second check five minutes later fails too. How we check

Connect to the publisher's own endpoint

Add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "csplv_mcp_test": {
      "url": "https://arturslunevs-csplv-mcp-test.hf.space/gradio_api/mcp/sse"
    }
  }
}
For agents: the install prompt

Every step above as one Markdown text, for an assistant installing it for you.

# Install the MCP server CSP Data (`co.huggingface.arturslunevs/csplv_mcp_test`)

Its page: https://plug.directory/servers/co.huggingface.arturslunevs/csplv_mcp_test

It runs on the publisher's servers; the client connects to its URL.

Use the section for the person's client.

## Claude Desktop

Paste into Settings › Connectors › Add custom connector:

```text
https://arturslunevs-csplv-mcp-test.hf.space/gradio_api/mcp/sse
```

## Claude Code

Run in a terminal:

```sh
claude mcp add --transport sse csplv_mcp_test https://arturslunevs-csplv-mcp-test.hf.space/gradio_api/mcp/sse
```

## Cursor, Devin Desktop, LM Studio, Gemini CLI, oterm, ECA

Merge into the place for the person's client:

- Cursor: ~/.cursor/mcp.json
- Devin Desktop: ~/.config/devin/mcp_config.json
- LM Studio: mcp.json (Program › Install › Edit mcp.json)
- Gemini CLI: ~/.gemini/settings.json
- oterm: config.json in oterm's data folder (~/Library/Application Support/oterm on macOS, ~/.local/share/oterm on Linux, %APPDATA%\oterm on Windows)
- ECA: ~/.config/eca/config.json (global) or .eca/config.json in the project

```json
{
  "mcpServers": {
    "csplv_mcp_test": {
      "url": "https://arturslunevs-csplv-mcp-test.hf.space/gradio_api/mcp/sse"
    }
  }
}
```

## VS Code

Merge into .vscode/mcp.json:

```json
{
  "servers": {
    "csplv_mcp_test": {
      "type": "sse",
      "url": "https://arturslunevs-csplv-mcp-test.hf.space/gradio_api/mcp/sse"
    }
  }
}
```

## Zed

This server's endpoint speaks only SSE, which this client's documentation does not list among its transports; use another client for it.

## Cline, AnythingLLM, Augment Code

Merge into the place for the person's client:

- Cline: cline_mcp_settings.json (MCP Servers › Configure › Configure MCP Servers)
- AnythingLLM: anythingllm_mcp_servers.json in the AnythingLLM storage plugins directory
- Augment Code: Augment Settings Panel – MCP section – Import from JSON (VS Code extension)

```json
{
  "mcpServers": {
    "csplv_mcp_test": {
      "type": "sse",
      "url": "https://arturslunevs-csplv-mcp-test.hf.space/gradio_api/mcp/sse"
    }
  }
}
```

## Continue

Merge into ~/.continue/config.yaml:

```yaml
mcpServers:
  - name: "csplv_mcp_test"
    type: sse
    url: "https://arturslunevs-csplv-mcp-test.hf.space/gradio_api/mcp/sse"
```

## Goose

This server's endpoint speaks only SSE, which this client's documentation does not list among its transports; use another client for it.

## Codex

This server's endpoint speaks only SSE, which this client's documentation does not list among its transports; use another client for it.

## mcp-client-cli, TUUI, BoltAI, Bob Shell, Kiro, Kiro CLI

This server's endpoint speaks only SSE, which this client's documentation does not list among its transports; use another client for it.

## Agenvoy

This server's endpoint speaks only SSE, which this client's documentation does not list among its transports; use another client for it.

## Amp

Merge into ~/.config/amp/settings.json (user) or .amp/settings.json (workspace):

```json
{
  "amp.mcpServers": {
    "csplv_mcp_test": {
      "url": "https://arturslunevs-csplv-mcp-test.hf.space/gradio_api/mcp/sse"
    }
  }
}
```

Then restart the client, or reload its MCP servers, and ask it to list the server's tools to confirm it started.

Tools 11

  • CSPLV_mcp_test_choose_lang Choose language depending of in which language question is passed in for CSP data query to be passed in other functions such as get_tables_by_keyword, get_topics, get_topic_content, get_titles, get_query_values, get_csp_data. If question passed in English, use 'en', if in Latvian, use 'lv' for other languages use english 'en'. Run this function first to get the language code and detect language once per question do not call it multiple times. Returns: The chosen language., , >>> choose_lang('en'), 'en', >>> choose_lang('lv'), 'lv'
  • CSPLV_mcp_test_construct_csp_link
  • CSPLV_mcp_test_filter_by_code Filter available data (titles) from Official Statistics Portal of Latvia (CSP or Centrālā statistikas pārvalde) by content code or part of the content code for wider results. Returns: The dictionary of the titles available from Official Statistics Portal,, topic code, topic content code, topic sub-content code and report ID., , , ... print(get_query_values(['TIR', 'AT', 'ATD', 'ATD040'])), {'EXP': 'Eksports', 'IMP': 'Imports'}, 'CN4Z': {'TOTAL': 'Visas preces', '0100': 'Trūkstošo datu novērtējums 01. nodaļai',, 'Dzīvi zirgi, ēzeļi, mūļi un zirgēzeļi', '0102': 'Dzīvi liellopi', '0103': 'Dzīvas cūkas', '0104': 'Dzīvas aitas un kazas',..., 'Preces, kurām piemērots militārais noslēpums', '0000': 'Bez atšifrējuma'}, 'COUNTRY': {'TOTAL': 'Pavisam', 'AD': 'Andora', 'AE': 'Apvienotie Arābu Emirāti', ..., 'Bez sadalījuma pa valstīm (tirdzn. ES ietvaros)'}, 'ContentsCode': {'ATD040': 'Vērtība (Eiro)', 'ATD0401': 'Svars, Kg'}, 'TIME': {'2005':, '2025'}}, >>> # Then use this code to filter titles,
  • CSPLV_mcp_test_filter_by_date Fetch published data by dates published from Official Statistics Portal of Latvia (CSP or Centrālā statistikas pārvalde). Returns: The dictionary of the titles available from Official Statistics Portal,, topic code, topic content code, topic sub-content code and report ID., , >>> # First get topic code, ... filter_by_date(date_from='22.10.2025.',, date_to='24.10.2025.',, lang='lv'), ['POP', 'IM', 'IMSV', 'IMV010w'],, ['EMP', 'NB', 'NBLD', 'NBL231'], ..., Then you can use table parameters to retrieve more info about updated tables.
  • CSPLV_mcp_test_get_csp_data Get statistics from Official Statistics Portal of Latvia (CSP or Centrālā statistikas pārvalde). **IMPORTANT**: Always include hyperlink from function return in your answer to provide source. Returns: List of dicts where first dict always contains 'Source URL' key with, link to the original CSP table., , >>> topics = ['POP', 'IR', 'IRE', 'IRE010'], >>> query_args = get_query_values(topics), >>> print(query_args), {'TOTAL': 'Pavisam', 'E_LAT': 'Latvieši', 'E_ABZ': 'Abāzi', 'E_ABK': 'Abhāzi',..., 'Zviedri', 'OTH': 'Cita tautība', 'UNK_NSP': 'Nezināma, neizvēlēta'}, 'ContentsCode': {'IRE010': 'Skaits'},, {'1935': '1935', ... '2025': '2025'}}, >>> # Then use these codes and values to get data for example Latvians for years 2024 and 2025, >>> data = get_csp_data(, ... lang='en',, ... topic_params=topics,, ... ETHNICITY=['E_LAT'],, ... TIME=['2024', '2025'], ... ), >>> print(result[0]), 'https://data.stat.gov.lv/pxweb/lv/OSP_PUB/START__POP__IR__IRE/IRE010'}, ][0]), ['E_LAT',
  • CSPLV_mcp_test_get_query_values Get query code and values for particular report. Returns: A dictionary where each key is a query parameter code and the value is another dictionary mapping possible values to their descriptive texts., , >>> # First get report topic parameters from get_titles or get_tables_by_keyword or filter_by_code, ... print(get_titles('DS')) or print(get_tables_by_keyword('dzimušie')), ['POP', 'ID', 'IDS', 'IDS010'],..., >>> # Then use these values to get possible query values, ... print(get_query_values(['POP', 'ID', 'IDS', 'IDS010'])), {'T': 'Pavisam', 'M': 'Vīrieši', 'F': 'Sievietes'}, 'ContentsCode': {'IDS010': 'Dzīvi dzimuši', 'IDS0101': 'Nedzīvi dzimuši', 'IDS0102': 'Nedzīvi dzimuši uz 1000 dzīvi dzimušiem'},, {'1920': '1920' ... '2024': '2024'}}
  • CSPLV_mcp_test_get_tables_by_keyword Get available tables from Official Statistics Portal of Latvia (CSP or Centrālā statistikas pārvalde) by keyword search. **IMPORTANT**: Always try this before get_topics() and only use get_topics() if this function fails to retrieve the right table. Returns: The dictionary of the titles available from Official Statistics Portal,, topic code, topic content code, topic sub-content code and report ID., , >>> get_tables_by_keyword('iedzīvotāji'), ['POP', 'IR', 'IRS010'],..., >>> get_tables_by_keyword('darbs'), ['EMP', 'NE', 'NEA010'],...
  • CSPLV_mcp_test_get_titles Available data (titles) from Official Statistics Portal of Latvia (CSP or Centrālā statistikas pārvalde). Returns: The dictionary of the titles available from Official Statistics Portal,, topic code, topic content code, topic sub-content code and report ID., , >>> # First get topic code, ... get_topics('Darbs'), 'EMP'}, >>> # Then use this code to get content, ... print(get_topic_content('EMP')), 'DS', 'Darbaspēka izmaksas': 'DI', 'Darbvietas un darba laiks': 'DV',..., >>> # Then use this content code to extract report titles, ... print(get_titles('DS')), ['POP', 'ID', 'IDS', 'IDS010'],...
  • CSPLV_mcp_test_get_top_values Fetch CSP data, apply variable filters, filter AREA text if provided, and return top N rows as list of dicts. **IMPORTANT**: Before using this function, call get_query_values() to see available options for variable_filters parameters. **IMPORTANT**: Always include hyperlink from function return in your answer to provide source. Returns: List of dicts where first dict always contains 'Source URL' key with, link to the original CSP table., , get_top_values(lang='lv',, topic_params=['POP', 'IR', 'IRD', 'RIG010'],, ["M"], "AgeGroup": ["TOTAL"], "ContentsCode":["RIG0101"]},, area_filter='pilsetas',, TIME=['2025'],, top=5,, sort_mode='descending'), # Returns top 5 highest with most males as percentage of population in pilsetas (towns and cities), print(result[0]), 'https://data.stat.gov.lv/pxweb/lv/OSP_PUB/START__POP__IR__IRE/RIG010'}, ]), [{'code': 'LV0027210', 'text': '..Durbe'}, {'code': 'TOTAL', 'text': 'Pavisam'}, {'code': 'M', 'text': 'Vīrieši'}, {'code': '2025', 'text': '2025'}], 'val
  • CSPLV_mcp_test_get_topic_content Available contents of the topic from Official Statistics Portal of Latvia (CSP or Centrālā statistikas pārvalde). Returns: The dictionary of the contents of the topic, where key is the topic content and value is the topic content code., , >>> # First get topic code, ... get_topics('vide'), 'ENV'}, >>> # Then use this code to get content, ... print(get_topic_content('ENV')), 'VI', 'Atkritumu apsaimniekošana': 'AK', 'Agro-vides rādītāji': 'AV',..., >>> get_topics('Iedzīvotāji'), 'POP'}, >>> print(get_topic_content('POP')), 'IR', 'Dzimstība': 'ID', 'Mirstība': 'IM', 'Nāves cēloņi': 'NC',...
  • CSPLV_mcp_test_get_topics Available topics from Official Statistics Portal of Latvia (CSP or Centrālā statistikas pārvalde). **IMPORTANT**: Always try get_tables_by_keyword() function before and only use this if the former function fails to retrieve the right table. Returns: The dictionary of topics, where key is topic name and value is topic code., , >>> get_topics('vide'), 'ENV'}, >>> print(get_topics()), 'POP', 'Darbs': 'EMP', 'Sociālā aizsardzība un veselība': 'VES',...

From Hugging Face Spaces. Report a problem