# vinvuk/apiverket-mcp [Health: Active]

**Category:** 📊 Data Platforms  
**Repository:** https://github.com/vinvuk/apiverket-mcp  
**GitHub Stars:** 2  
**npm Downloads (last month):** 194  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/vinvuk-apiverket-mcp

## Description
Query Swedish public data through Apiverket, including company data, SCB statistics, weather, transport, and more. Install: npx -y apiverket-mcp-server.

## Tools
Capabilities this server exposes over MCP:

- **govdata_discover** — Search and browse available Swedish government data endpoints in the Apiverket API.

Use this tool to find the right endpoint before calling govdata_query. The API covers 139 endpoints across 16 categories including weather, transport, economy, health, environment, parliament, police, education, and more.

Args:
  - query (string, optional): Keyword to search across endpoint names, descriptions, and paths
  - category (string, optional): Filter by category name

When called with no arguments, returns all available categories with endpoint counts.

Examples:
  - Find weather endpoints: query="weather"
  - Browse transport category: category="Transport"
  - Find pension info: query="pension"
  - List all categories: (no arguments)

Returns:
  Matching endpoints with their paths, parameters, and descriptions.
- **govdata_query** — Call any Apiverket API endpoint to retrieve Swedish government data.

Use govdata_discover first to find the right endpoint path and required parameters. Then call this tool with the endpoint path and any path/query parameters.

Args:
  - endpoint (string, required): The API path (e.g. "/v1/weather/{city}")
  - path_params (object, optional): Values for path parameters like {city}, {code}, {id}
  - query_params (object, optional): Query string parameters (q, limit, offset, lat, lon, etc.)

Examples:
  - Current weather in Stockholm:
    endpoint="/v1/weather/{city}", path_params={"city": "stockholm"}
  - Search jobs:
    endpoint="/v1/jobs/search", query_params={"q": "developer", "limit": 5}
  - Train departures from Stockholm Central:
    endpoint="/v1/transport/trains/{station}", path_params={"station": "Cst"}
  - Exchange rates:
    endpoint="/v1/rates"
  - Population by municipality:
    endpoint="/v1/population/{municipalityCode}", path_params={"municipalityCode": "0180"}
  - Police events in Stockholm:
    endpoint="/v1/police/events", query_params={"location": "Stockholm", "limit": 10}
  - Find EV chargers near a location:
    endpoint="/v1/infrastructure/ev-chargers", query_params={"lat": 59.33, "lon": 18.07}

Returns:
  The API response as JSON, containing a "meta" envelope with request info and a "data" object with the actual data.

Error handling:
  - Returns clear error messages if the API is unreachable, the endpoint doesn't exist, or parameters are invalid
  - Large responses are automatically truncated with pagination guidance

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

```json
"mcpServers": {
  "apiverket-mcp": {
    "command": "npx",
    "args": ["-y","apiverket-mcp-server"],
    "env": {
      "GOVDATA_API_URL": "",
      "GOVDATA_API_KEY": ""
    }
  }
}
```

**Requires environment variables:** `GOVDATA_API_URL`, `GOVDATA_API_KEY` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What vinvuk/apiverket-mcp MCP server does

The vinvuk/apiverket-mcp MCP server connects MCP-compatible AI clients to Swedish public data exposed by Apiverket. It provides endpoint discovery before data retrieval, helping an agent identify supported paths, required parameters, and the relevant data category instead of guessing API routes.

The catalog contains 139 endpoints in 16 categories. Supported areas include weather, transport, economy, health, environment, parliament, police, education, municipalities, jobs, culture, tourism, geography, and company data. Returned API results use JSON with a metadata envelope and a data object.

Three MCP tools are documented:

- `govdata_discover` searches endpoint names, descriptions, paths, and categories. With no arguments, it lists available categories and endpoint counts.
- `govdata_query` calls a discovered Apiverket path with optional path and query parameters.
- `govdata_account` shows sanitized key information, account tier, daily usage, company-search and company-lookup quotas, reset timing, and relevant limits.

## How it works

The vinvuk/apiverket-mcp MCP server runs locally over stdio. Discovery uses the built-in endpoint catalog without making an API request. Query operations send the selected path and parameters to Apiverket using the configured API key. Structured failures are returned as recovery guidance, including cases where the API is unreachable, a path is unsupported, or parameters are invalid.

A typical workflow is:

1. Search with `govdata_discover` using a topic such as weather, train departures, pension, or company data.
2. Read the returned endpoint path, parameters, and description.
3. Call `govdata_query` with the required path and query values.
4. Use pagination guidance if the response is truncated.
5. Check `govdata_account` after rate limits or when quota and tier details matter.

Company workflows distinguish searching by name from looking up a known organisation number. Search results can provide an `org_number` for later lookup, while the documented company API does not expose board, officer, owner, or UBO subresources.

## Setup and configuration

Use Node.js 18 or newer. The documented MCP client configuration starts the package with `npx -y apiverket-mcp-server`. Configure these variables:

- `GOVDATA_API_URL`: Apiverket base URL; the documented default is `https://apiverket.se`.
- `GOVDATA_API_KEY`: API credential; `sk_test_demo` is available for sandbox setup, while live keys are used for production data.

The repository can also be built from source with `npm install` followed by `npm run build` after cloning it. The project is licensed under MIT.

## Tools and capabilities

The vinvuk/apiverket-mcp MCP server supports endpoint search by keyword or category, direct calls with path parameters such as city or station, and query parameters such as search terms, coordinates, limits, and offsets. Example data tasks include retrieving Stockholm weather, train departures, exchange rates, municipal population, police events, electric-vehicle chargers, job listings, and company records, provided the corresponding endpoint is discovered first.

## Limitations and notes

An Apiverket API key is required, although the documented sandbox key can be used to verify client setup. Daily limits and company-search or company-lookup quotas vary by key tier. Agents should not infer undocumented paths; discovery is the supported way to select endpoints and understand required parameters. Large responses may be truncated, with pagination instructions returned to the client.

_Full upstream README: https://allmcps.com/mcp/vinvuk-apiverket-mcp/readme_

