digitraffic-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., "@digitraffic-mcp Is the next IC from Helsinki to Tampere on time?"
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.
digitraffic-mcp
An MCP server for live Finnish rail and road traffic. The data comes from Fintraffic Digitraffic, which is open data under CC BY 4.0. You don't need an API key.
All times are Finnish local time (Europe/Helsinki).
Tools
Tool | What it answers |
| Finds a station's short code from its name ("Tampere" → |
| Live departures or arrivals at a station, with estimates, delays, tracks and cancellations |
| Direct trains between two stations, with travel time and live delay |
| One train's current delay, last station, next stop, GPS position and speed, delay causes, and stop-by-stop times |
| Live readings from road weather stations: air and road temperature, wind, precipitation, visibility, road condition, friction and warnings |
| Active incidents, roadworks, weight restrictions and oversize transports. Filter by road number, area or distance from a point |
| Road weather cameras near a point or matching a name |
| The latest camera image, returned as an MCP image so the model can look at the road |
Example questions:
"Is the next IC from Helsinki to Tampere on time?"
"Where is train 9 right now?"
"What's the road surface like on vt4 near Jyväskylä? Show me a camera."
"Any roadworks on road 22 this week?"
Related MCP server: trafikverket-mcp
Setup
npm install # also builds dist/ (via the prepare script)Claude Code
claude mcp add digitraffic -- node /absolute/path/to/digitraffic-mcp/dist/index.js
claude mcp list # check that it connectsReplace /absolute/path/to/digitraffic-mcp with where you cloned the project. Running pwd in the project folder prints it.
Inside a session, /mcp shows the server status and its tools.
Other MCP clients
Clients that use an mcpServers JSON config (for example Claude Desktop's claude_desktop_config.json):
{
"mcpServers": {
"digitraffic": {
"command": "node",
"args": ["/absolute/path/to/digitraffic-mcp/dist/index.js"]
}
}
}Development
npm test # unit + MCP-level tests (offline, fetch is stubbed)
npm run lint # Biome lint
npm run typecheck # tsc, including the check that output schemas match the result types
npm run smoke # end-to-end: starts the server and calls every tool against the live API
npx tsx scripts/call.ts station_board '{"station":"HKI","limit":5}' # ad-hoc tool callLayout:
src/http.ts: the fetch wrapper. It sends theDigitraffic-Userheader, uses gzip, gives each request a 15 s deadline (retry included), retries once on network errors, 429 and 5xx, refuses images over 5 MB, and keeps an in-memory TTL cache capped at 500 entries.src/rail.ts: the rail API calls and pure functions that shape the responses.src/road.ts: road weather, traffic messages and weather cameras.src/server.ts: the MCP tool definitions.src/schemas.ts: the tools' output schemas. Every tool returnsstructuredContentmatching its schema, and the same JSON as text for clients that don't read structured content.
Configuration: set DIGITRAFFIC_USER to change the client identifier sent in the Digitraffic-User header. The default is digitraffic-mcp/<version>, e.g. digitraffic-mcp/0.1.0.
Notes
Station names, traffic message texts and delay-cause names come from the API in Finnish. The server instructions tell the model to translate them.
Station search ignores diacritics ("Jyvaskyla" finds Jyväskylä) and knows a few English names ("Helsinki airport" →
LEN).Camera images come with their capture time and age, plus a warning when the image is over 30 minutes old.
Caching: metadata such as stations and cause codes is kept for 24 hours, station and camera lists for 1 hour, live data for 10–60 seconds.
Attribution: data © Fintraffic / digitraffic.fi, licensed CC BY 4.0.
Available Tools
8 toolsfind_stationFind railway stationARead-only
Search Finnish railway stations by name or short code (e.g. 'Tampere', 'HKI', 'Pasila'). Returns short codes used by other rail tools.
Inputs: query (required), include_non_passenger. Returns: stations
find_weather_camerasFind road weather camerasARead-only
Find Finnish road weather cameras near a point or by name text. Returns camera views (preset ids), image URLs and capture times. Use get_weather_camera_image to look at a view.
Inputs: lat, lon, limit, query. Returns: cameras
get_weather_camera_imageGet weather camera imageARead-only
Fetch the latest JPEG from a road weather camera view, to visually check road and weather conditions.
Inputs: preset_id (required), thumbnail. Returns: caption, mimeType, presetId, capturedAt
road_weatherRoad weatherARead-only
Live readings from Finnish road weather stations: air and road surface temperature, wind, precipitation, visibility, road condition (dry/wet/icy/snowy), friction and warnings. Find stations by coordinates, by name/road text (e.g. 'vt4 Jyväskylä', 'Espoo') or by station id.
Inputs: lat, lon, limit, query, +2 more. Returns: stations
station_boardStation departures/arrivalsARead-only
Live departure or arrival board for a Finnish railway station: upcoming trains with scheduled and estimated times, delay, track and cancellations.
Inputs: station (required), kind, limit, include_all_trains. Returns: kind, trains, station, generatedAt
traffic_messagesTraffic messagesARead-only
Active Finnish road traffic messages: incidents/announcements (accidents, bad driving conditions, closures), roadworks, weight restrictions, or exempted (oversize) transports. Filter by road number, area text (municipality/region), or distance from a point.
Inputs: lat, lon, area, road, +3 more. Returns: type, shown, matched, messages
train_connectionsDirect trains between stationsBRead-only
Direct trains from one Finnish station to another, with departure/arrival times, live delays, tracks and travel time.
Inputs: to (required), from (required), date, after, +1 more. Returns: to, date, from, connections
train_statusTrain statusARead-only
Current status of a train by number: delay, last reported station, next stop, GPS location and speed, delay causes, and the stop-by-stop timetable with actual/estimated times.
Inputs: train_number (required), date, include_pass_through. Returns: via, stops, train, origin, +12 more
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool targets a distinct resource or action: train-specific status, station search, station boards, connections, road readings, traffic messages, camera discovery, and camera image fetching. The two camera tools are clearly split into find vs. fetch, and rail tools separate station-level, train-level, and route-level queries.
The set mixes verb_noun names like find_station and get_weather_camera_image with noun_phrase names like train_status and station_board. It remains readable, but there is no single predictable convention across all eight tools.
Eight tools is well-scoped for a Finnish transport data server spanning rail and road/weather use cases. Each tool has a clear role and no tools appear redundant or unnecessary.
The rail side covers station lookup, station boards, train status, and direct connections, while the road side covers weather readings, traffic messages, and camera discovery/image retrieval. Minor gaps exist, such as no dedicated rail disruption message feed or weather forecast capability, but core workflows are covered.
Maintenance
Related MCP Connectors
Finnish trains (VR, Helsinki commuter): live direct trains and departures. Free, no key.
Belgian trains for AI agents: live journeys, departures, delays, disruptions. Free, no key.
Journeys, departures, line courses, disruptions in Germany; nearby sharing as currently reported.
Live Polish rail data: boards for every station, delays, PLK disruptions, train punctuality.
Related MCP Servers
- AlicenseAqualityCmaintenanceProvides access to real-time Danish road traffic events, roadworks, and queues via public data from Vejdirektoratet, enabling AI assistants to check road conditions without any API keys.3MIT
- AlicenseAqualityCmaintenanceProvides real-time access to Swedish road weather, traffic cameras, road conditions, and traffic flow data from Trafikverket (Swedish Transport Administration). Enables users to query weather stations, cameras, traffic situations, and flow data through natural language.10MIT
- AlicenseNot gradedqualityDmaintenanceProvides real-time Swiss railway information including departures, connections, train composition, occupancy forecasts, disruptions, and pricing, accessible via natural language in over 100 languages.MIT
- AlicenseAqualityBmaintenanceEnables querying Norwegian traffic messages (roadworks, closures, detours) from Statens vegvesen, filtered by route and time window. Supports both current and future travel times, with tools for route-based and general searches.3MIT