MCP server for data.bs.ch OpenDataSoft API v2.1.
uv syncuv run main.pynpx @modelcontextprotocol/inspector uv run main.pyuvx --from git+https://github.com/DCC-BS/mcp-data-bs data-bs-mcpAdd to your OpenCode config:
{
"mcpServers": {
"data-bs": {
"command": "uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/data-bs-mcp",
"run",
"main.py"
]
}
}
}Add to your Cursor config (~/.cursor/mcp.json):
{
"mcpServers": {
"data-bs": {
"command": "uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/data-bs-mcp",
"run",
"main.py"
]
}
}
}List available datasets with optional filtering.
get_datasets(limit=10, offset=0, search="luft", refine="publisher:Statistisches Amt")
Get detailed metadata for a specific dataset.
get_dataset(dataset_id="100113")
Query records from a dataset with ODSQL filtering.
get_records(dataset_id="100113", where="pm25 > 10", limit=100, order_by="time DESC")
Get available facet values for filtering.
get_facets(facet="publisher") # Options: publisher, keyword, theme, features, modified, language
Get download URL for dataset export.
export_dataset_url(dataset_id="100113", format="csv", where="sensornr=240")
Formats: csv, json, geojson, xlsx, shp, parquet, gpx, kml, rdfxml, jsonld, turtle