dresden-opendata-mcp

kiliankoe/dresden-opendata-mcp

3.2

If you are the rightful owner of dresden-opendata-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

The Dresden OpenData MCP Server provides AI agents with access to Dresden's OpenData Portal, simplifying the discovery, fetching, and processing of open civic datasets.

Tools
5
Resources
0
Prompts
0

Dresden OpenData MCP Server

A Model Context Protocol (MCP) server that provides AI agents (or your toaster) with access to Dresden's OpenData Portal, enabling these systems to automatically discover, fetch, and process open civic datasets published by the city or other providers.

I personally find Dresden's OpenData portal extremely useful, but cumbersome to work with and find fitting datasets. This tries to make that a bit easier. Here's an example interaction with Claude using this MCP server to find a dataset on Dresden's streets.

Installation

Prerequisites

  • Go 1.21 or higher
  • An MCP-compatible AI client (e.g. Claude Desktop)

Building from Source

git clone https://github.com/kiliankoe/dresden-opendata-mcp.git
cd dresden-opendata-mcp

make build

make install

Configuration

The server can be configured using environment variables:

REQUEST_TIMEOUT_MS=30000

MCP Tools

The server provides the following MCP tools:

list_datasets

List all available datasets from the Dresden OpenData portal.

{
  "limit": 100  // Optional, max datasets to return
}

search_datasets

Search for datasets using keywords.

Important search tips:

  • Use German search terms for better results (e.g., "Straßenbahn" instead of "tram")
  • The underlying API has limited search capabilities - try multiple queries with:
    • Different synonyms (e.g., "ÖPNV", "Nahverkehr", "öffentlicher Verkehr")
    • Various forms (singular/plural, abbreviations)
    • More bureaucratic/official terms
  • Consider broader or narrower terms if initial searches don't yield results
{
  "query": "Straßenbahn",
  "limit": 30
}

get_dataset_info

Get detailed information about a specific dataset.

{
  "id": "dataset-id"  // Dataset ID, Node ID, or Layer ID
}

fetch_dataset

Fetch dataset content in a specified format.

{
  "id": "dataset-id",
  "format": "GeoJSON"  // CSV, JSON, GeoJSON, WMS, WFS
}

query_dataset

Query datasets using OGC API parameters.

{
  "layerId": "L124",
  "limit": 50,
  "offset": 0
}

Usage with Claude Desktop

Add the server to your Claude Desktop configuration:

{
  "mcpServers": {
    "dresden-opendata": {
      "command": "/path/to/dresden-opendata-mcp"
    }
  }
}

Example Usage

// Search for tram routes (use German terms)
const datasets = await client.call('search_datasets', {
  query: 'Straßenbahn'
});

// Fetch specific dataset
const tramData = await client.call('fetch_dataset', {
  id: 'tram-network',
  format: 'GeoJSON'
});

// Query dataset features
const results = await client.call('query_dataset', {
  layerId: 'L124',
  limit: 50
});

Development

make build

make test

make fmt

Note: The server communicates via stdin/stdout using the MCP protocol. Running make run directly will cause the server to wait for MCP protocol messages, which may appear as if it's hanging. This is normal - the server should be used with an MCP client. You can use MCP Inspector to directly introspect this server or set up a client like Claude Desktop, see above.

Architecture

The server consists of several key components:

  • Portal Client: Handles communication with Dresden's OpenData APIs
  • MCP Tools: Implements the MCP protocol tools for dataset operations
  • Configuration: Manages environment-based configuration