# Stat Lv [Health: Active]

**Category:** 🧮 Data Science Tools  
**Repository:** https://github.com/pipeworx-io/mcp-stat-lv  
**GitHub Stars:** 0  
**npm Downloads (last month):** 457  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/stat-lv

## Description
Statistics Latvia / Official Statistics Portal (data.stat.gov.lv) PxWeb MCP.

## Tools
Capabilities this server exposes over MCP:

- **subjects** — Navigate the subject tree. Root (empty path) lists database folders (e.g. OSP_PUB); drill into sub-paths — entries with type "l" are folders, type "t" are tables.
- **table_meta** — Table definition (dimensions, valid values). Use the bare table path with no ".px" suffix.
- **query_table** — Pull data from a table. body is a PxWeb query object. Use the bare table path with no ".px" suffix.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "stat-lv": {
    "command": "npx",
    "args": ["-y","@pipeworx/mcp-stat-lv"]
  }
}
```

## Documentation

## What the Stat Lv MCP server does

The Stat Lv MCP server gives MCP-compatible clients access to Statistics Latvia’s Official Statistics Portal, data.stat.gov.lv. It works with the portal’s PxWeb data structure, where statistical content is organized into database folders, subfolders, and tables.

Agents can first explore the subject tree, then inspect a table’s schema before requesting data. This workflow helps identify the correct table path, dimensions, and permitted values instead of guessing query parameters. The server is intended for questions that depend on Latvia’s official statistical datasets.

## How it works

The Stat Lv MCP server exposes three pack-specific tools:

- `subjects` traverses the portal hierarchy. An empty path lists top-level database folders, such as `OSP_PUB`; deeper paths reveal folders and tables. Folder entries use type `l`, while table entries use type `t`.
- `table_meta` returns a table definition, including its dimensions and valid values. The path should identify the table without a `.px` suffix.
- `query_table` sends a PxWeb query object to a selected table and returns the requested data. It also expects the bare table path without `.px`.

The hosted pack endpoint is `https://gateway.pipeworx.io/stat-lv/mcp`. Its tool listing includes the three Stat Lv tools and shared Pipeworx gateway tools, including routing and discovery functions. The full gateway is available at `https://gateway.pipeworx.io/mcp`; both endpoints access the same gateway and data sources, while the pack endpoint lists Stat Lv tools directly.

## Setup and configuration

For a hosted connection, add the endpoint as an MCP server in a compatible client. The README specifically shows Claude Desktop, Cursor, and Windsurf configurations using the `url` field.

The Stat Lv MCP server can also run locally over stdio with the npm package `@pipeworx/mcp-stat-lv`:

```json
{
  "mcpServers": {
    "stat-lv": {
      "command": "npx",
      "args": ["-y", "@pipeworx/mcp-stat-lv"]
    }
  }
}
```

Running `npx -y @pipeworx/mcp-stat-lv` starts the local process. In this mode, the process handles MCP initialization, tool listing, and tool calls for the pack’s own tools without the shared gateway meta-tools or `ask_pipeworx` routing.

## Tools and capabilities

The Stat Lv MCP server supports a practical discovery-to-query sequence. Use `subjects` to locate a relevant table, `table_meta` to learn which dimensions and values it accepts, and `query_table` to request the selected slice of data. The query body must follow the PxWeb query format expected by the target table.

The hosted gateway also supports calling tools through HTTP. For example, the subjects tool can be invoked with a POST request to `/v1/tools/stat_lv_subjects` and a JSON body containing a `path`. Tool inspection and pack discovery are available through the gateway’s documented HTTP endpoints.

## Limitations and notes

The hosted pack endpoint does not list only the three pack-specific tools; shared Pipeworx tools are included as well. Its exact tool scope can change, so the connection’s `initialize` response is authoritative. Use the local stdio mode when only the Stat Lv tools are wanted and gateway routing is unnecessary.

Queries require valid PxWeb paths and request bodies. Table paths must omit `.px`, and the available dimension values should be obtained from `table_meta` before calling `query_table`.

The package is licensed under MIT.

_Full upstream README: https://allmcps.com/mcp/stat-lv/readme_

