Skip to main content

MCP server for Swedish statistical data discovery and export

Project description

Data Platform MCP Server

MCP (Model Context Protocol) server for AI agents to discover, fetch, and export Swedish statistical data.

Tools

  • discover_datasets - AI-powered smart search for datasets
  • get_dataset_details - Get measures, breakdowns, and time ranges
  • fetch_data - Fetch actual data rows for direct answers
  • build_export_link - Generate CSV/JSON download links
  • build_search_link - Link to app search page
  • build_session_link - Deep link to preload data in the app

Installation

The package is available on PyPI and installs automatically via uvx:

# No manual installation needed - uvx handles it automatically
# Just add to your MCP client config (see below)

For development:

cd backend/mcp-server
pip install -e .

Usage with MCP Clients

Add to your MCP client config:

Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "utforska-data": {
      "command": "uvx",
      "args": ["utforska-data-mcp"]
    }
  }
}

Windsurf (~/.codeium/windsurf/mcp_config.json):

{
  "mcpServers": {
    "utforska-data": {
      "command": "uvx",
      "args": ["utforska-data-mcp"]
    }
  }
}

Cursor/Cline: Same configuration format.

The package installs automatically on first use. No manual installation required!

Configuration

The server connects to the production backend by default. No environment variables needed for normal use.

For development:

  • MCP_BACKEND_URL - Backend API URL (default: https://data-platform-production.up.railway.app)
  • MCP_APP_URL - Frontend app URL (default: https://utforskadata.se)
  • MCP_DEFAULT_LANG - Default language (default: sv)

Example Flows

Quick Answer

  1. discover_datasets("housing prices in Sweden")
  2. get_dataset_details(dataset_id) - check measures/breakdowns
  3. fetch_data(dataset_id, measure="Average price") - get data
  4. Answer the question with the data
  5. Offer build_export_link() and build_search_link()

Deep Dive

  1. Same as above
  2. build_session_link(selections=[...]) - create link to continue in app

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

utforska_data_mcp-1.0.0.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

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

utforska_data_mcp-1.0.0-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file utforska_data_mcp-1.0.0.tar.gz.

File metadata

  • Download URL: utforska_data_mcp-1.0.0.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for utforska_data_mcp-1.0.0.tar.gz
Algorithm Hash digest
SHA256 5d1597e3d12b5357cc5923cbe8b163aa7105ddcc56df0c212929e8cc7ba81a44
MD5 28af346a19b0f4198a7f9eb7b088725a
BLAKE2b-256 7af45c19742e5bb43a97c4cf5036a77013fbc8045c4caebb96cf08c478d1b90a

See more details on using hashes here.

File details

Details for the file utforska_data_mcp-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for utforska_data_mcp-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4fdfb0713f4d9d2e1d3fe4102fa4d17e29abe1f7d6cf3bd69b0b601e7cf78a6f
MD5 33491128082aeb6b6f1b86ad25a6968b
BLAKE2b-256 044bbc1dd255c9dab012af4b7391e34ff61365e99d185d7a6a139e42116ae064

See more details on using hashes here.

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