izmirmcp
A read-only Model Context Protocol server that gives AI agents trustworthy access to İzmir's open city data.
Language: English · Türkçe
Contents
- Why izmirmcp · Quick start · Tools · Prompts and resources
- Examples · Architecture · Configuration
- Data sources · Security · Contributing · License
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
- "Konak to Karşıyaka: ferry, metro + İZBAN or bus — which is faster and cheaper?"
- "Is there a market in Bornova today, and how are air quality and transport notices?"
- "Any water outage in Buca, and how full are the dams?" (the İZSU outage API sometimes returns 500; the agent sees a typed error)
- "On-duty pharmacy in Karşıyaka and buses arriving at the nearest stop?"
- "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. Endpoint lists adapted from Apache-2.0 projects (halilcengel/IzmirMCP, AtaCanYmc/izmir-open-data-py) are attributed in NOTICE. The architecture and response contract are inspired by istanbulmcp. City data licences belong to the publishing institutions.
Metadata
Release files for izmir-mcp 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| izmir_mcp-0.1.0.tar.gz | 500.9 kB | With provenance | Details for izmir_mcp-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| izmir_mcp-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for izmir_mcp-0.1.0-py3-none-any.whl |
Total release size: 712.6 kB
Release files / izmir_mcp-0.1.0.tar.gz
| Download URL | izmir_mcp-0.1.0.tar.gz |
|---|---|
| Size | 500.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
badde252d2e57b37ab5b8ead3697b97a1ca9c14e45d5e2f6f31a971587d1763a
|
|
BLAKE2b-256 checksum How to use checksums |
ab7e11343cfaf45f29ad04e49106818a95c348f77c3546887a41ceb01eb686ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.
Transparency logRelease files / izmir_mcp-0.1.0-py3-none-any.whl
| Download URL | izmir_mcp-0.1.0-py3-none-any.whl |
|---|---|
| Size | 211.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c8266a2218798eca4a860dc95f214e9272ad5e59b3bac6e374557b695e61a9ed
|
|
BLAKE2b-256 checksum How to use checksums |
b9cece056de6424f9dfb8894ed424f6e25714658b1a488c9310fa1230da051aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.
Transparency logSecurity for izmir-mcp 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for izmir_mcp-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.