Skip to main content
Glama
MCP Server for pymdurs

MCP Server for pymdurs

by rupeelab17

mcp_pymdurs

Urban geometry for AI agents — an HTTP MCP server that wraps pymdurs collectors (buildings, DEM, LCZ, cadastre, roads, water) behind Robyn JSON-RPC.

Inspired by mcp_pymdu, rebuilt for uv · Python 3.14 · Robyn · pymdurs.

Python 3.14 uv Robyn License: GPL-3.0

Robyn MCP is experimental. Transport is HTTP JSON-RPC on /mcp (not FastMCP stdio). All tools are async.


Why

Need

What you get

Give Claude / agents French urban layers

One MCP endpoint, nine tools

Plotly HTML maps

pymdurs_building_to_image / pymdurs_lcz_to_image

Typed contracts

Same Pydantic models for MCP input_schema and REST /api/*

Interactive maps

Plotly HTML via as_html=true

Default study area: La Rochelle
[-1.152704, 46.181627, -1.139893, 46.18699] (WGS84) → collectors reproject to EPSG:2154.


Related MCP server: Proto OS

Quick start

uv sync
uv run python -m mcp_pymdurs
# or: uv run mcp-pymdurs

Listen

0.0.0.0:8080 (MCP_PYMDURS_HOST / MCP_PYMDURS_PORT)

Health

GET /

Defaults

GET /defaults

MCP

POST /mcp

Docs

/docs · /openapi.json

Smoke test:

bash examples/curl_mcp.sh
curl -sS -X POST http://localhost:8080/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'

Architecture

┌──────────────┐     JSON-RPC      ┌─────────────┐     pymdurs      ┌─────────────┐
│ Claude / curl│ ───────────────▶  │  Robyn :8080│ ───────────────▶ │ IGN / gouv  │
│ mcp-remote   │   POST /mcp       │  async tools│   Building, Dem… │ data.gouv   │
└──────────────┘                   └──────┬──────┘                  └─────────────┘
                                          │
                                   POST /api/*  (Pydantic → 422 on bad body)

Schemas live in mcp_pymdurs/schemas.py.
Note: app.py must keep real (non-stringified) type annotations — no from __future__ import annotations — so Robyn can detect BaseModel params.


MCP tools

Tool

Returns

get_bbox_area

Square WGS84 bbox from lat / lon / bbox_area (km²)

fetch_buildings

Buildings JSON summary, or Plotly HTML if as_html

fetch_dem

DEM / MNT TIFF + mask paths

fetch_lcz

Local Climate Zones (data.gouv zip + pymdurs)

fetch_cadastre

Cadastre parcels

fetch_roads

IGN roads

fetch_water

IGN water bodies

pymdurs_building_to_image

Buildings Plotly HTML

pymdurs_lcz_to_image

LCZ Plotly HTML via pymdurs

Also registered:

  • Resource pymdurs://defaults/bbox — default bbox / CRS / output path

  • Prompt urban_explore — suggested agent workflow

REST mirrors

Same payloads, Pydantic-validated (robyn[pydantic]):

POST /api/bbox · /api/buildings · /api/dem · /api/lcz · /api/cadastre · /api/roads · /api/water


Claude Desktop

Claude Desktop config is stdio-only. Do not put a "url" field in claude_desktop_config.json (it can wipe mcpServers). Bridge with mcp-remote:

  1. Start the server: uv run python -m mcp_pymdurs

  2. Edit config

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

    • Windows: %APPDATA%\Claude\claude_desktop_config.json

  3. Merge:

{
  "mcpServers": {
    "pymdurs": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "http://127.0.0.1:8080/mcp"]
    }
  }
}
  1. Fully quit and reopen Claude Desktop (needs Node.js / npx).

Alternative with mcp-proxy:

{
  "mcpServers": {
    "pymdurs": {
      "command": "uvx",
      "args": [
        "mcp-proxy",
        "--transport",
        "streamablehttp",
        "http://127.0.0.1:8080/mcp"
      ]
    }
  }
}

Clients with native HTTP MCP (e.g. Claude Code) can use "type": "http" + "url": "http://127.0.0.1:8080/mcp" — no bridge.


Requirements


License

GPL-3.0-or-later — see LICENSE.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server generated from an OpenAPI Specification, exposing tools via HTTP. It allows clients to invoke API operations using JSON-RPC 2.0 requests.
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Provides a JSON-RPC MCP server that exposes policy-governed agent tools, including paid tools, tool muxing, and OpenAPI-to-MCP conversion, enabling agents to discover, coordinate, and execute tasks within the ProtoOS ecosystem.
      5
      1
      Apache 2.0
    • A
      license
      Not graded
      quality
      C
      maintenance
      Serves MCP tools and resources over a Streamable HTTP endpoint, letting clients invoke methods such as echo through JSON-RPC 2.0 requests. Its methods are generated from an OpenAPI Specification file and can be customized via environment variables for port and API URL.
      MIT