MCP server for Swedish statistical data discovery and export
Project description
Utforska Data MCP Server
MCP server package for discovering datasets, fetching filtered data, creating deep links, and generating reports from Utforska Data.
Package: utforska-data-mcp
Tooling Surface
discover_datasetsget_dataset_detailsfetch_databuild_export_linkbuild_session_linkgenerate_reportbuild_session_export_link
discover_datasets and generate_report also support Apps SDK output templates (widget resources).
Run Modes
1) MCP stdio (client launches via uvx)
{
"mcpServers": {
"utforska-data": {
"command": "uvx",
"args": ["utforska-data-mcp"]
}
}
}
2) Streamable HTTP (standalone)
cd backend/mcp-server
uv run utforska-data-mcp-http
Defaults:
- MCP endpoint:
http://localhost:8080/mcp/ - Health:
http://localhost:8080/health
3) Embedded in main API server
backend/api_server.py mounts MCP on /mcp.
Configuration
MCP_BACKEND_URL(default:https://utforskadata.se)MCP_APP_URL(default:https://utforskadata.se)MCP_SESSION_API_URL(optional override for session create/load API)MCP_DEFAULT_LANG(svoren, defaultsv)
HTTP mode options:
MCP_HTTP_HOST(default0.0.0.0)MCP_HTTP_PORT(default8080)MCP_HTTP_PATH(default/mcp)MCP_HTTP_STATELESS(defaulttrue)MCP_HTTP_JSON_RESPONSE(defaultfalse)
Local Development
cd backend/mcp-server
pip install -e .
or run package scripts directly via uv run.
Switching from a Kolada-only MCP Server
If someone already has a Kolada MCP server, migration can be minimal if they keep the same interaction pattern.
Fastest path (endpoint swap)
- Keep their MCP client/tooling layer.
- Point backend calls to Utforska endpoints instead:
- discovery:
POST /api/ai/discover - details:
GET /api/v2/datasets/{id} - data:
GET /api/v2/datasets/{id}/data - export:
GET /api/v2/datasets/{id}/export
- discovery:
- Restrict to Kolada when needed via source filters (
sources: ["kolada"]). - Keep existing response contract in their MCP wrapper if they need backward compatibility.
If they adopt this MCP package directly
- Replace MCP server command with
uvx utforska-data-mcp. - Optionally set:
MCP_BACKEND_URLto their Utforska backend hostMCP_APP_URLto their app host
Data model differences to account for
Compared with a Kolada-only service, Utforska adds:
- Multi-source dataset IDs (not only Kolada IDs)
- Normalized
content_measuresandbreakdowns - Optional session creation/loading deep links
If they currently use direct DB access instead of HTTP APIs, they would need mapping to:
datasetsdataset_valuesdimension_mappingsmetric_aggregations
Using HTTP endpoints is usually much faster and safer than binding to internal tables directly.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file utforska_data_mcp-1.0.3.tar.gz.
File metadata
- Download URL: utforska_data_mcp-1.0.3.tar.gz
- Upload date:
- Size: 42.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ac8f15fdc8363361e75220d79f9110a9f6855d13b17222406666a57dd3aeac1
|
|
| MD5 |
058cbb236d9b0ff3935e818775f06b19
|
|
| BLAKE2b-256 |
653c48b7e6bab2fdcb831d68f39f02e4c0f25de602c620e643f211e235b0a814
|
File details
Details for the file utforska_data_mcp-1.0.3-py3-none-any.whl.
File metadata
- Download URL: utforska_data_mcp-1.0.3-py3-none-any.whl
- Upload date:
- Size: 50.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08cac9c718077fa97c9a2bd5e2e90c657daa1ffdd82ce1b0a922433a12cd6152
|
|
| MD5 |
86f4af8bf811f5933e270ef212340dd2
|
|
| BLAKE2b-256 |
63825a125f96b5d32437a811d20024f89ce18de45b61e84b01ae6170fd8ccad1
|