1. Conduid
  2. Developer Tools
  3. Swiss Transport MCP
MCP server · Developer Tools

Swiss Transport MCP

Swiss Transport MCP server (based on the transport.opendata.ch API)

Unclaimed last commit 8 months ago devtools
34Low

Scored 7 months ago · breakdown

About Swiss Transport MCP

Swiss Transport MCP is an MCP server published by pierrick1213 in the Developer Tools category: swiss Transport MCP server (based on the transport.opendata.ch API).

The repository has 4 stars and 0 forks, with the last commit 8 months ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues before depending on it in production.

Install

From source
git clone https://github.com/pierrick1213/swiss-transport-mcp

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about Swiss Transport MCP

Powered by Claude · Grounded in docs

I know everything about Swiss Transport MCP. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ✓README presentThe repository ships documentation.

5 checks have not been run yet.

README

Swiss Transport MCP Server 🇨🇭🚉

.NET CI Docker Image Version (latest by date)

A Model Context Protocol (MCP) server that provides real-time access to the Swiss public transport network. This server gives AI models (like Claude, ChatGPT, etc.) the ability to search for stations, query departures, and find route connections across Switzerland.

The data is powered by the excellent OpenData.ch API: https://transport.opendata.ch/docs.html

🛠️ Features (Tools)

This MCP server exposes three main tools to your AI agent:

  • GetLocations: Search for locations, stations, points of interest (POI), or addresses (e.g., "Basel", "Lausanne"). Returns coordinates and distance.
  • GetStationboard: Get the next departing connections leaving from a specific station (e.g., "Aarau"). Shows destinations, lines, departure times, platforms, and current delays.
  • GetConnections: Find a journey from point A to point B (e.g., from "Genève" to "Zürich"). Returns the duration, number of transfers, and detailed steps for the journey.

🚀 How to use this MCP Server

You can use the public server directly, or run this server yourself via Docker or locally using .NET.

Option 1: Using the Public Server (Easiest)

You don't need to install anything! The server is already hosted and available for public use. Simply add the following configuration to your MCP client config file (e.g., claude_desktop_config.json):

{
  "mcpServers": {
    "swiss-transport": {
      "type": "http",
      "url": "https://swiss-transport.pa-nas.ch/mcp"
    }
  }
}

Option 2: Using Docker (Self-hosted)

The easiest way to self-host this server is to run the official Docker image available on Docker Hub: 👉 https://hub.docker.com/repository/docker/pickcool/swiss-transport-mcp

Start the server using Docker:

docker run -d -p 5263:8080 --name swiss-transport-mcp pickcool/swiss-transport-mcp:latest

Then, configure your MCP client to connect to it via HTTP:

{
  "mcpServers": {
    "swiss-transport": {
      "type": "http",
      "url": "http://localhost:5263/mcp"
    }
  }
}

Option 3: Running locally with .NET

If you prefer to run it locally or want to contribute to the code, you need .NET 10.0 SDK installed.

1. Test via HTTP locally

You can run the API normally to test the endpoints using the provided .http file:

git clone https://github.com/pierrick1213/swiss-transport-mcp.git
cd swiss-transport-mcp/swiss-transport-mcp
dotnet run

Once running, you can use the swiss-transport-mcp.http file in Visual Studio or VS Code to send test requests.

2. Configure in your MCP Client

Make sure your server is running (dotnet run), then configure your AI client to connect via HTTP. Add this to your MCP configuration file:

{
  "mcpServers": {
    "swiss-transport": {
      "type": "http",
      "url": "http://localhost:5263/mcp"
    }
  }
}

🧠 How it works under the hood

This server is built using ASP.NET Core 10.0 and the ModelContextProtocol.AspNetCore package. It operates over HTTP, which makes it easy to integrate, scale, and test via standard HTTP clients.

When your AI model decides it needs train information, the MCP client sends a JSON-RPC request to this server via HTTP POST. The server queries the transport.opendata.ch API, cleans and formats the JSON response specifically to be easily digestible by LLMs, and returns the result in the HTTP response.

🤝 Contributing

Contributions are welcome! Feel free to open an issue or submit a Pull Request.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

README copy captured when this server was indexed; it may lag the repository. The original is authoritative.

Questions

About Swiss Transport MCP

How do I install Swiss Transport MCP?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is Swiss Transport MCP safe to use with an AI agent?

Its trust score is 34 out of 100 (low). It passes 1 of the 1 static security checks run so far. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Swiss Transport MCP still maintained?

The last commit was 8 months ago. That's long enough that you should check whether the maintainer is responding to issues before depending on it.