ojp-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., "@ojp-mcpplan a trip from Zurich HB to Bern tomorrow morning at 8am"
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.
ojp-mcp
MCP server for Swiss public transport, backed by the OJP 2.0 API of opentransportdata.swiss. Runs locally over stdio with your own API token.
Proof of concept. This project is not actively maintained. Feel free to reuse and fork it under the MIT license.
Token
Register at https://api-manager.opentransportdata.swiss.
Subscribe to the OJP 2.0 API and copy your token.
Pass it as
OJP_TOKEN(environment only; it never appears in tool output or logs).
Related MCP server: Zügli MCP Server
Setup
Requires Node ≥ 20.
git clone https://github.com/d3orn/ojp-mcp.git
cd ojp-mcp
npm installClaude Code:
claude mcp add ojp -e OJP_TOKEN=<your-token> -- node /absolute/path/to/ojp-mcp/src/index.jsClaude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"ojp": {
"command": "node",
"args": ["/absolute/path/to/ojp-mcp/src/index.js"],
"env": { "OJP_TOKEN": "<your-token>" }
}
}
}Not yet published to npm. Once it is, npx -y ojp-mcp replaces node /absolute/path/to/ojp-mcp/src/index.js.
Tools
Tool | Purpose |
| Stops, addresses, POIs, towns by |
| Trips |
| Departure/arrival board for a |
| All calls of one journey ( |
Places accept a name or an id from search_locations; ambiguous names return candidate ids instead of guessing. Times are Europe/Zurich (input without offset is local time). All tools take language (de default, fr, it, en).
Limits & errors
The OJP API allows 50 calls per minute and 20 000 calls per day per token. Most tools use 1 call. plan_trip uses 1 more for each place given as a name, so up to 4. Pass ids from search_locations to save calls.
Error | Meaning |
| Token wrong, expired, or not subscribed to OJP 2.0 |
| Upstream temporarily unavailable. Retry shortly |
| Rate limit or other upstream rejection. Wait and retry |
| No answer within 15 s |
| Retry with one of the listed ids |
Development
npm install
npm testLicense
This server cannot be deployed
Maintenance
Related MCP Connectors
Swiss Transport MCP — wraps Transport Open Data API (free, no auth)
Swiss trains and public transport: live connections and departures. Official data, free, no key.
Norwegian transport (Entur) and geodata (Kartverket): trips, departures, addresses, elevation.
Canonical SwissTrip MCP — independent SBB/CFF/FFS schedules, prices, and ticket links by SwissTrip.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables querying Swiss public transport (trains, buses, trams, boats) for stations, connections, and station boards via the opendata.ch API.-
- 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
- AlicenseNot gradedqualityBmaintenanceEnables querying Swiss public transport data (stations, departures, connections) from the Transport Open Data API via natural language through an MCP gateway.15 npmMIT
- FlicenseAqualityDmaintenanceConnects AI assistants to Swiss Federal Railways (SBB/CFF/FFS) data: train schedules, station search, ticket prices, and direct ticket purchase links.625 npm-