Skip to main content
Glama

izmirmcp

A read-only Model Context Protocol server that gives AI agents trustworthy access to İzmir's open city data.

CI License: MIT Python 3.11+ MCP Tools

Language: English · Türkçe

Contents

Related MCP server: Calgary Open Data MCP Server

English

This README is the primary English document; a full Turkish version is in README.tr.md.

Why izmirmcp

  • 36 tools across transit, city services, water, environment and the open-data catalog.

  • One envelope for every answer: ok, summary, data, freshness, sources, limits, warnings, next_queries, error, result_info (contract).

  • Honest failures: an unavailable upstream is a typed error (source_unavailable, source_timeout, source_rate_limited), never silently empty data.

  • Hardened HTTP surface: body caps, rate limits, API keys, Origin allowlist, structured logs.

  • Stable contract: tool names and schemas only change additively (policy).

Quick start

uvx (PyPI, from v0.1.0):

uvx izmir-mcp stdio

Docker / GHCR:

docker run --rm -i ghcr.io/zexy2/izmir-mcp python -m app.stdio      # stdio
docker run -p 8000:8000 -v izmir-data:/data ghcr.io/zexy2/izmir-mcp  # HTTP on /mcp/

From source:

python3.11 -m venv .venv && .venv/bin/pip install -e ".[dev]"
.venv/bin/python -m app.stdio   # or: python -m app.main (Streamable HTTP, http://127.0.0.1:8000/mcp/)

Generic stdio config (most clients use this mcpServers shape):

{
  "mcpServers": {
    "izmir": { "command": "uvx", "args": ["izmir-mcp", "stdio"] }
  }
}

Client

Config location

Guide

OpenAI Codex CLI

~/.codex/config.toml · codex mcp add

setup

Claude Code

claude mcp add · .mcp.json

setup

Claude Desktop

claude_desktop_config.json

setup

Cursor

~/.cursor/mcp.json · .cursor/mcp.json

setup

VS Code / Copilot

.vscode/mcp.json (servers key)

setup

Zed

settings.json (context_servers)

setup

Gemini CLI

~/.gemini/settings.json · gemini mcp add

setup

Cline

cline_mcp_settings.json

setup

More options: install guide, client setup guides (TR).

Tools

Full input/output contracts: tool reference.

Transit

Tool

Purpose

izmir_transit_stations

Metro, İZBAN, İZDENİZ stations and piers

izmir_transit_schedule

Published metro/İZBAN/İZDENİZ timetables

izmir_tram_lines

Tram lines

izmir_tram_schedule

Tram stations and headways for a line

izmir_bus_stops

Search ESHOT stops by name or location

izmir_bus_arrivals

Buses approaching a stop (live)

izmir_bus_line_arrivals

Approaching buses of one line at a stop

izmir_bus_live_positions

Live bus positions on a line

izmir_bus_departures

Scheduled GTFS departures (not live ETA)

izmir_bus_routes

ESHOT route summary and stop sequences

izmir_gtfs_status

Local GTFS store status and calendar window

izmir_transport_disruptions

ESHOT, Metro and İZDENİZ notices

izmir_fare

İZBAN fare between two stations

izmir_plan_trip

Direct public-transport options between two places

izmir_mobility_nearby

All transport options near a point

izmir_traffic_history

Arterial speed/duration history (not live)

izmir_traffic_cameras

Traffic camera locations (no stream)

izmir_parking_fees

İZELMAN parking tariffs

City services

Tool

Purpose

izmir_nearby

Parking, on-duty pharmacies, stations, stops, taxis, chargers nearby

izmir_city_services_nearby

WiFi, İzmirim Kart top-up points, libraries

izmir_pharmacies_all

All pharmacies, not only on-duty

izmir_market_schedule

District market calendar

izmir_market_prices

Wholesale market prices

izmir_events

Culture and arts events

izmir_neighborhood_profile

Neighbourhood population and buildings

izmir_cbs_layer

Allowlisted İBB GIS layers

Water

Tool

Purpose

izmir_water_status

İZSU dam levels and outage feed status

izmir_dam_status

Dam status by date and dam name

izmir_water_production

İZSU water production snapshot

Environment

Tool

Purpose

izmir_air_quality

Air-quality measurements by date and station

Data & server

Tool

Purpose

izmir_health

Local readiness and published limits

izmir_search_datasets

Search the İzmir Open Data (CKAN) catalog

izmir_get_dataset

Dataset metadata and resources

izmir_get_resource_schema

DataStore resource columns

izmir_query_resource

Filtered DataStore records (no SQL)

izmir_datastore_query

One safe SELECT over a local copy

Prompts and resources

  • Workflow prompts: gunun_ozeti, veri_kesfi, toplu_ulasim, otobus, pazar_ve_duyurular, sehir_hizmetleri, nobetci_eczane, rota_karsilastir, bugun_ne_yapsam, su_durumu_raporu, eczane_ve_ulasim, sehir_simdi.

  • Resources: izmir://coverage, izmir://sources, izmir://schema/catalog, izmir://reference/fares, izmir://reference/lines.

See MCP interface.

Example conversations

  1. "Konak to Karşıyaka: ferry, metro + İZBAN or bus — which is faster and cheaper?"

  2. "Is there a market in Bornova today, and how are air quality and transport notices?"

  3. "Any water outage in Buca, and how full are the dams?" (the İZSU outage API sometimes returns 500; the agent sees a typed error)

  4. "On-duty pharmacy in Karşıyaka and buses arriving at the nearest stop?"

  5. "What is the state of İzmir right now for transport, air and water?"

Architecture

flowchart LR
  C[MCP client] -->|stdio / Streamable HTTP| S[izmirmcp server]
  S --> G[HTTP guards: auth, rate limit, Origin]
  S --> T[36 tools + resources + prompts]
  T --> V[services: envelope, freshness, typed errors]
  V --> K[connectors + cache]
  V --> L[(local SQLite: GTFS, DataStore copies)]
  K --> U[İzmir open data: CKAN, openapi.izmir.bel.tr, ESHOT, İZSU, İZDENİZ]

Configuration

All settings are IZMIR_MCP_* environment variables. Before exposing HTTP publicly, set IZMIR_MCP_API_KEYS, IZMIR_MCP_REQUIRE_AUTH=true and IZMIR_MCP_ALLOWED_HOSTS. See configuration and deployment. Health endpoints: /healthz, /readyz (never checks upstream), /status (monitoring).

Data sources and disclaimer

Data comes from İzmir Büyükşehir Belediyesi open data (CKAN and openapi.izmir.bel.tr), ESHOT, İZSU, İZBAN, İZDENİZ and İzmir Metro; reference points are © OpenStreetMap contributors (ODbL 1.0). Status per source: sources, reachability. Known gaps (no live traffic index, no İZBAN notice feed, GTFS calendar expiry): limits.

This is an unofficial project. Data may be stale or incomplete; verify critical information (e.g. pharmacies by phone) with the publishing institution. Public access does not imply a data licence.

Security

Report vulnerabilities privately: SECURITY.md. Threat model: docs/security.md; scan results: docs/development/reports/security-report.md.

Contributing

See CONTRIBUTING.md and the Code of Conduct. Tests run offline: .venv/bin/python -m pytest -q (development).

Documentation

Response contract · Tool reference · MCP interface · Deployment · Configuration · Data sources · Source reachability · Monitoring · Privacy · Security / threat model · Security report · API access · Browser and CORS · Local SQL · Place resolution · GTFS schedule · Registry · Tool migration policy · Development · Limits · Install (EN) · Install (TR) · Launch drafts

License and acknowledgements

Code is released under the MIT License.

The architecture, the response envelope and several resilience components are adapted from istanbulmcp by Kerim Batuhan Baran (MIT). Some endpoint references follow IzmirMCP and izmir-open-data-py (Apache-2.0). Full notices, including the list of adapted files: NOTICE. City data licences belong to the publishing institutions.

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
      Provides real-time access to İzmir's public transportation data, including bus locations, schedules, and route information for ESHOT, İZBAN, Metro, and Tram services. It enables AI assistants to perform transit queries, calculate fares, and locate nearby stations using the Model Context Protocol.
      30 npm
      1
      ISC
    • F
      license
      Not graded
      quality
      D
      maintenance
      Provides AI agents with live, structured access to Singapore government open data including weather, transport, property, and company registry via 35 well-described tools.
      1
      -
    • A
      license
      A
      quality
      B
      maintenance
      Enables AI assistants to query Turkey's public data, including central-bank FX rates, earthquake catalog, weather forecasts, public holidays, and offline validation of Turkish ID, tax, and IBAN numbers, with sourced and timestamped responses.
      44
      88 npm
      1
      MIT