Skip to main content

MCP server for Kolada API

Project description

Kolada MCP Server

https://modelcontextprotocol.io

Kolada MCP Server enables seamless integration between Large Language Models (LLMs) and Kolada, Sweden’s comprehensive municipal and regional statistical database. It provides structured access to thousands of Key Performance Indicators (KPIs), facilitating rich, data-driven analysis, comparisons, and explorations of public sector statistics.

Overview

Kolada MCP Server acts as intelligent middleware between LLM-based applications and the Kolada database, allowing easy querying and analyzing of data related to Swedish municipalities and regions. With semantic search capabilities and robust analysis tools, Kolada MCP significantly simplifies navigating and interpreting the vast array of KPIs in Kolada.

Example Queries

Ask Kolada MCP Server complex questions requiring data analysis:

  • Where in Sweden should a family move to find affordable housing, good schools, and healthcare?
  • Investigate the connection between unemployment and mental illness in Västernorrland.
  • Identify municipalities with the highest increase in preschool quality over the last five years.
  • Create a dashboard visualizing municipalities with the best and worst public transportation.

Features

  • Semantic Search: Natural language queries for KPIs.
  • Category Filtering: Access KPIs grouped by thematic areas.
  • Municipal & Regional Data Retrieval: Fetch KPI data or historical time series.
  • Multi-Year Comparative Analysis: Evaluate KPI performance changes across municipalities.
  • Cross-KPI Correlation: Analyze relationships between KPIs.

Available Tools

  1. list_operating_areas: Retrieve available KPI categories.
  2. get_kpis_by_operating_area: List KPIs under a category.
  3. search_kpis: Discover KPIs using semantic search.
  4. get_kpi_metadata: Access detailed KPI metadata.
  5. fetch_kolada_data: Retrieve KPI values.
  6. analyze_kpi_across_municipalities: In-depth municipal KPI analysis.
  7. compare_kpis: Evaluate KPI correlations.
  8. list_municipalities: List municipality IDs and names.

Quick Start

Kolada MCP Server includes pre-cached KPI metadata. Delete kpi_embeddings.npz to refresh.

Installation

Use uv to install Kolada MCP dependencies:

uv sync

Running Locally for Development

Start the server locally:

uv run mcp dev server.py

Open MCP Inspector at http://localhost:5173 to test and debug.

Claude Desktop Integration

Edit your claude_desktop_config.json to add Kolada MCP Server:

Docker Image (Local Build)

"KoladaDocker": {
  "args": [
    "run",
    "-i",
    "--rm",
    "--name",
    "kolada-mcp-managed",
    "kolada-mcp:local"
  ],
  "command": "docker",
  "env": {}
}

Prebuilt Container via PyPI

"KoladaPyPI": {
  "args": ["kolada-mcp"],
  "command": "/Users/hugi/.cargo/bin/uvx"
}

Local UV Execution (without Docker)

Replace [path to kolada-mcp] with your local directory:

"KoladaLocal": {
  "args": [
    "--directory",
    "[path to kolada-mcp]/src/kolada_mcp",
    "run",
    "kolada-mcp"
  ],
  "command": "uv"
}

Restart Claude Desktop after updating.

Contributing

Contributions are welcome! Submit issues, enhancements, or PRs on GitHub.

Disclaimer

Kolada MCP Server is independently developed, not endorsed by or affiliated with RKA or other organizations.

License

Kolada MCP Server is licensed under the Apache License 2.0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kolada_mcp-0.1.35.tar.gz (17.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kolada_mcp-0.1.35-py3-none-any.whl (17.9 MB view details)

Uploaded Python 3

File details

Details for the file kolada_mcp-0.1.35.tar.gz.

File metadata

  • Download URL: kolada_mcp-0.1.35.tar.gz
  • Upload date:
  • Size: 17.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for kolada_mcp-0.1.35.tar.gz
Algorithm Hash digest
SHA256 716afc96e9b852deb22666898c8a66f69308a932d03a583a21e4682569d641a6
MD5 6668e275ed9d8929a6d0c089f9748c84
BLAKE2b-256 c4b16b5fe61e718c80e3af8f927ccd0f6d612d70adce32fba754660095888926

See more details on using hashes here.

Provenance

The following attestation bundles were made for kolada_mcp-0.1.35.tar.gz:

Publisher: release.yml on aerugo/kolada-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file kolada_mcp-0.1.35-py3-none-any.whl.

File metadata

  • Download URL: kolada_mcp-0.1.35-py3-none-any.whl
  • Upload date:
  • Size: 17.9 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for kolada_mcp-0.1.35-py3-none-any.whl
Algorithm Hash digest
SHA256 d80a141531084c475b9d5152ea40c0670057a851717a0ed497f8d292b4d781d5
MD5 1b58202589453f3cf675b3c4c58d54d9
BLAKE2b-256 e31062710ddd736078146a25f500dca12b3f15d86b74fb70ff6d151833d1f51a

See more details on using hashes here.

Provenance

The following attestation bundles were made for kolada_mcp-0.1.35-py3-none-any.whl:

Publisher: release.yml on aerugo/kolada-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page