Skip to main content
Glama
README.md
# pxweb-mcp

MCP server for accessing statistical data via the PxWeb API v2.

## Quick Start

```bash
npx -y @jarib/pxweb-mcp
npx -y @jarib/pxweb-mcp --transport streamable-http --port 3000
```



## Known PxWeb v2 Instances

| Organization | URL |
|--------------|-----|
| Statistics Norway (SSB) | `https://data.ssb.no/api/pxwebapi/v2` |
| Statistics Sweden (SCB) | `https://statistikdatabasen.scb.se/api/v2` |

Use the `--url` option to connect to a different instance:

```bash
npx @jarib/pxweb-mcp --url https://statistikdatabasen.scb.se/api/v2
```


## Development

```bash
pnpm install
pnpm build
node build/index.js
```



## Configuration


```json
{
  "mcpServers": {
    "pxweb": {
      "type": "http",
      "url": "http://localhost:3000/mcp"
    }
  }
}
```

## Links

- [PxWeb API v2 (GitHub)](https://github.com/PxTools/PxWebApi)
- [SSB API Documentation](https://www.ssb.no/en/api/pxwebapiv2)
- [SCB API Documentation](https://www.scb.se/en/services/open-data-api/pxwebapi/)
- [MCP Protocol](https://modelcontextprotocol.io)

## License

MIT

TDQS

A4/5.0

Scored across 6 tools

Disambiguation4/5

Tools are mostly separable: search_tables and list_recent_tables both discover tables but use different criteria, and query_table/get_code_list have unique roles. The only mild overlap is get_table_info versus fetch_metadata, where the descriptions distinguish basic overview from detailed query-building metadata.

Naming Consistency5/5

All tool names follow the same verb_noun snake_case pattern (search_tables, query_table, get_code_list, etc.). The use of fetch instead of get in fetch_metadata is a minor synonym variation but does not break the overall pattern.

Tool Count5/5

Six tools is a well-scoped size for a statistical data server, covering discovery, metadata inspection, code lists, and querying. Each tool has a distinct role and none feels like filler.

Completeness5/5

The tool set supports the full user workflow: find tables, inspect metadata, resolve code lists, and query data. For a read-only public statistics API, there are no obvious missing operations that would create dead ends.

Maintenance

ActivityInactive
ResponsivenessNo issues