npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

apiverket-mcp-server

v1.0.0

Published

MCP server for querying Swedish government data via Apiverket API

Readme

Apiverket MCP Server

An MCP (Model Context Protocol) server that gives AI assistants access to 120+ Swedish public data endpoints via the Apiverket API. Works with Claude Code, Claude Desktop, Cursor, VS Code, and any MCP-compatible client.

What it does

Two tools, one goal: let AI assistants query Swedish public data using natural language.

| Tool | Purpose | |------|---------| | govdata_discover | Search and browse 120+ endpoints across 16 categories | | govdata_query | Call any endpoint and get structured JSON data |

Ask "What's the weather in Stockholm?" or "Show train delays from Gothenburg" — the AI finds the right endpoint, fills in parameters, and returns the data.

Categories

Business & Companies, Culture & Media, Demographics, Economy & Finance, Education, Environment & Nature, Geography, Government & Safety, Health & Medicine, Jobs & Labor, Social Insurance, Telecom, Tourism, Transport & Infrastructure, Weather & Climate

Quick start

Claude Code / Claude Desktop

Add to your MCP config (~/.claude/claude_code_config.json or Claude Desktop settings):

{
  "mcpServers": {
    "apiverket": {
      "command": "node",
      "args": ["/path/to/apiverket-mcp/dist/index.js"],
      "env": {
        "GOVDATA_API_URL": "https://apiverket.se",
        "GOVDATA_API_KEY": "sk_test_demo"
      }
    }
  }
}

Cursor / VS Code

Add to .cursor/mcp.json or .vscode/mcp.json:

{
  "servers": {
    "apiverket": {
      "command": "node",
      "args": ["/path/to/apiverket-mcp/dist/index.js"],
      "env": {
        "GOVDATA_API_URL": "https://apiverket.se",
        "GOVDATA_API_KEY": "sk_test_demo"
      }
    }
  }
}

npx (no install)

{
  "mcpServers": {
    "apiverket": {
      "command": "npx",
      "args": ["-y", "apiverket-mcp-server"],
      "env": {
        "GOVDATA_API_URL": "https://apiverket.se",
        "GOVDATA_API_KEY": "sk_test_demo"
      }
    }
  }
}

Build from source

git clone https://github.com/vinvuk/apiverket-mcp.git
cd apiverket-mcp
npm install
npm run build

Configuration

| Variable | Default | Description | |----------|---------|-------------| | GOVDATA_API_URL | http://localhost:3010 | Apiverket API base URL | | GOVDATA_API_KEY | sk_test_demo | API key (sk_test_* for sandbox, sk_live_* for production) |

The test key (sk_test_demo) returns sandbox data for all endpoints — no signup required.

Tools

govdata_discover

Search and browse available endpoints.

# List all categories
govdata_discover()

# Search by keyword
govdata_discover(query: "electricity prices")

# Browse a category
govdata_discover(category: "Weather & Climate")

# Search within a category
govdata_discover(query: "forecast", category: "Weather")

govdata_query

Call any endpoint with parameters.

# Current weather
govdata_query(endpoint: "/v1/weather/{city}", path_params: {city: "stockholm"})

# Job search
govdata_query(endpoint: "/v1/jobs/search", query_params: {q: "developer", limit: 5})

# Exchange rates
govdata_query(endpoint: "/v1/rates")

# Train departures
govdata_query(endpoint: "/v1/transport/trains/{station}", path_params: {station: "Cst"})

# Electricity prices by area
govdata_query(endpoint: "/v1/energy/electricity/{area}", path_params: {area: "SE3"})

# Company lookup
govdata_query(endpoint: "/v1/companies/{orgNumber}", path_params: {orgNumber: "5568710426"})

# Police events
govdata_query(endpoint: "/v1/police/events", query_params: {limit: 10})

# VAT validation
govdata_query(endpoint: "/v1/vat/{vatNumber}", path_params: {vatNumber: "SE556871042601"})

How it works

  1. The MCP server runs as a local process using stdio transport
  2. Your AI client sends tool calls via the MCP protocol
  3. govdata_discover searches the built-in endpoint catalog (no API call needed)
  4. govdata_query makes authenticated HTTP requests to the Apiverket API
  5. Responses over 25,000 characters are truncated with pagination guidance

Requirements

  • Node.js >= 18
  • An Apiverket API key (or use sk_test_demo for sandbox)

License

MIT