iett-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@iett-mcp How far is the next 500T from Tersane Köprüsü to 4. Levent?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
iett-mcp
An MCP server for Istanbul public transport. It lets AI assistants like Claude Code, Claude Desktop or Cursor answer questions about İETT bus stops and lines using live data from İETT's official web services.
You: I'm at Tersane Köprüsü in Pendik. How far is the next 500T to 4. Levent? Claude: (calls
search_stops, thenget_live_buses) The nearest one, C-397, is 5 stops away near Aydıntepe İstasyon. Its position was updated 33 seconds ago. The next one is 11 stops behind it.
No API key needed. İETT's data is public.
Tools
Tool | What it does |
| Find bus stops by name, optionally within a district. Ignores Turkish accents and case, so |
| Stops near a latitude/longitude, nearest first, with distance and a rough walking time. Lets users ask about a place ("near Taksim Square") instead of a stop name. |
| Look up a line by code ( |
| List a line's stops in travel order, for each direction. Optional |
| Where a line's buses are right now, placed on the route by their nearest stop. With |
| Scheduled departures from each direction's first stop: today's next buses with the wait, first and last bus, or a whole day grouped by hour, for weekdays, Saturdays or Sundays. |
All tools are read-only.
Related MCP server: TFL MCP Server for Poke
Setup
git clone https://github.com/mohamedzeina/iett-mcp.git && cd iett-mcp
npm install
npm run buildClaude Code:
claude mcp add iett -- node /absolute/path/to/iett-mcp/dist/index.jsIf you open Claude Code inside this folder, it picks up the server from .mcp.json automatically. That version runs from source, so you don't need to build first.
Claude Desktop / Cursor (claude_desktop_config.json / .cursor/mcp.json):
{
"mcpServers": {
"iett": {
"command": "node",
"args": ["/absolute/path/to/iett-mcp/dist/index.js"]
}
}
}How it works
AI assistant ──MCP (stdio)──► server.ts ──► search.ts (local, accent-insensitive search)
│
└──► iett/client.ts (12h in-memory cache)
└──► iett/soap.ts ──SOAP/XML──► api.ibb.gov.tr/iettThe upstream API is SOAP. İETT exposes ASP.NET
.asmxservices. Some return a JSON string inside the XML envelope; the stop-detail service returns an XML DataSet.soap.tsbuilds the envelope (with input escaped), parses both response styles, turns SOAP faults into readable errors, and retries network errors and 5xx responses.Download once, search locally. İETT can't search by name, so the full lists (~15k stops, ~800 lines, about 3.7 MB) are fetched on the first call and cached for 12 hours. Each line's stop list is cached the same way. A failed download is never cached.
Live data has a quota. İETT's fleet service allows about 100 requests per hour. Live positions are cached for 30 seconds per line, every call goes through a 90-per-hour sliding-window budget (
rateLimit.ts), and failed calls aren't retried. When the budget runs out, the tool says when live data will be back.Positions mean more on the route. A raw GPS point says little.
live.tsmatches each bus's nearest stop against the line's stop list, so the tool can say "5 stops away" and flag reports older than 5 minutes.Service days run past midnight. A line's day can run from 05:40 to 00:20, and night lines run 23:40 to 05:20.
schedule.tsuses İETT's listing order, where a jump back of more than 12 hours marks midnight, so "next bus" stays right after midnight. It also checks the previous day's late departures. A "largest gap" rule would fail for lines that only run mornings and evenings.Turkish-aware matching. İETT's data mixes spellings ("Kadiköy", "Sisli", "ŞİŞLİ"), and users type without Turkish characters.
text.tslowercases with Turkish rules (İ→i, I→ı) and strips accents, so every spelling matches.Errors the model can act on. When İETT is down, tools return
isErrorwith a message the assistant can explain, instead of crashing.
Development
npm run dev # run the server from source
npm test # unit + MCP protocol tests (İETT is faked from fixtures)
npm run smoke # live check against the real İETT service
npm run inspect # open the MCP Inspector to call tools by handThe tests connect a real MCP client to the server over an in-memory transport, so they cover tool registration, input validation and response format, not just helper functions.
Roadmap
get_line_stops: ordered stops along a lineget_timetable: scheduled departuresget_live_buses: real-time bus positions for a linefind_stops_near: stops near a coordinateİsbike bike-share stations
Publish to npm and an MCP server registry
Data
Data comes from İETT via the İBB Open Data Portal. This project is not affiliated with İETT or İBB.
License
MIT
Available Tools
6 toolsfind_stops_nearFind İETT bus stops near a locationARead-only
Find Istanbul İETT bus stops near a latitude/longitude, nearest first, with walking-distance estimates. Use it when the user gives a place instead of a stop name: use coordinates you know for well-known places, or ones the user shares. Results include stop codes for get_live_buses.
Inputs: latitude (required), longitude (required), limit, radius_m.
get_line_infoGet İETT bus line infoARead-only
Look up an Istanbul İETT bus line by its code (e.g. '500T', '25G') or find lines by places in their route name (e.g. 'Sarıyer Taksim'). Returns the route endpoints, length, typical trip time and fare type. Note: route names only list a line's two ends, not every stop along the way.
Inputs: line (required), limit.
get_line_stopsGet the stops along an İETT bus lineARead-only
List the stops of an Istanbul İETT bus line in travel order, for each direction. Use it to check whether a line serves a stop, or how many stops lie between two places. Accepts line codes loosely ('78s' finds '78Ş'). Pass 'toward' to get only the direction heading to a place.
Inputs: line (required), toward.
get_live_busesGet live İETT bus positionsARead-only
Show where an Istanbul İETT line's buses are right now, placed on the route by their nearest stop. Pass 'stop_code' (from search_stops) to get only the buses still heading to that stop and how many stops away each one is, which answers 'is my bus close?'. Positions come from İETT's fleet tracking and can lag; some lines have no tracked buses. İETT limits this data to about 100 requests per hour, so avoid polling.
Inputs: line (required), stop_code.
get_timetableGet an İETT line's timetableARead-only
Scheduled departures of an Istanbul İETT line from the first stop of each direction. By default shows today's next departures (Istanbul time) plus the first and last bus; pass 'day' for another day type and 'full' for every departure. Times are at the starting stop, not at stops along the way: to see whether a bus is close to a stop, use get_live_buses. Public holidays may run a different schedule.
Inputs: line (required), day, full, count, +1 more.
search_stopsSearch İETT bus stopsARead-only
Search Istanbul İETT bus stops by name, optionally within a district. Matching ignores Turkish accents and case, so 'kadikoy' finds 'KADIKÖY'. Many places have several stops (one per direction); each result says which way its buses go. Returns stop codes, which other tools accept.
Inputs: query (required), limit, district.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
The six tools are largely distinct: line metadata, line stops, live positions, and timetables don't overlap. The only mild overlap is search_stops vs find_stops_near, both of which return stop codes, and a request like "stops near Kadıköy" could plausibly route to either, though the descriptions do explain when to use each.
All names are snake_case with a verb_noun shape (search_stops, find_stops_near, get_line_info, get_line_stops, get_live_buses, get_timetable). The verb mix between 'search' and 'find' for the two stop-lookup tools is a minor deviation but still predictable.
Six tools is a well-scoped surface for a bus transit API, with each tool covering a distinct query type (stops by name, stops by location, line info, line stops, live vehicles, schedule). Nothing feels redundant or missing at the count level.
The core lifecycle for a transit use case—locate stops, identify a line, list its stops, see live buses, get scheduled departures—is covered, and the descriptions cross-reference how to combine tools. Minor gaps exist: timetables only show departures from the first stop per direction, and there is no journey/route-planning or service-alert tool.
Maintenance
Related MCP Connectors
Read-only Istanbul city data: transport, nearby services, datasets and event discovery/planning.
Get real-time NYC bus arrivals, live vehicle locations, and service alerts. Plan trips between any…
Turkey data API for AI agents: 40 tools + search/call for 230+ endpoints. Addresses (provinces, districts, postal codes, boundaries), validation (IBAN, tax ID/VKN, TCKN, phone, barcode), tax and salary calculators, Official Gazette, exchange rates, gold, crypto, economic indicators, prayer times, holidays and business days, weather, air quality, earthquakes, dam levels, fuel prices, EV charging, power outages, tolls, pharmacies on duty, football standings. Turkish JSON, free plan.
Provide real-time transportation data including bus arrivals, train service alerts, carpark availa…
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides 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.5 npm1ISC
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to access real-time Transport for London data, including tube/bus arrivals, line status, journey planning, and disruptions.1-
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to query live Transport for London data, including service status, arrivals, journey planning, bike points, crowding, and fares.1MIT
- AlicenseAqualityCmaintenanceEnables AI assistants to query live arrivals, vehicle positions, routes, stops, and timetables across the Athens public transport network, with stop lookups by name or coordinate in Greek or Latin script. Results cover OASA buses, trolleys, metro, and tram, falling back to cached reference data when the upstream API is unreachable.101MIT