# SNCF trains

> SNCF trains is an open-source MCP server for maps and travel. MCP server giving AI assistants SNCF train schedules, live delays and disruptions. It runs as a hosted remote server, so there is nothing to install locally.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** API, CLI, Self-hosted
- **Repository:** https://github.com/keized/sncf-mcp
- **MCP Registry name:** io.github.Keized/sncf-mcp
- **Categories:** [maps and travel](https://ai-powered.com/categories/maps-and-travel)
- **Listing updated:** 2026-11-27

## About

This server connects AI assistants to French rail data covering TER, TGV and Intercités trains. It can look up station identifiers by name, list upcoming departures from a station, plan journeys between two stations with their legs, and report current or upcoming service disruptions for a station or line.

Delays, cancellations and skipped stops come from the public GTFS-RT realtime feeds of the national transport dataset, so no extra token is needed for live status. When a feed is unavailable, responses fall back to planned times and say so. Answers are kept compact and expressed in Europe/Paris time.

It suits travellers and developers who want an assistant to answer questions like when the next train leaves or whether a line is disrupted. The server runs read-only, can be hosted locally over streamable HTTP or stdio, and can be protected with a bearer token when exposed publicly.

## Features

- **Station lookup:** Finds SNCF station identifiers from a free-text station name.
- **Live departures:** Lists next departures with realtime delay, cancellation and skipped-stop information.
- **Journey planning:** Returns journeys between two stations with each leg and its realtime delays.
- **Disruption alerts:** Reports current and upcoming service disruptions by station or line.
- **Optional bearer auth:** Can require a bearer token on requests when deployed on a public URL.
- **Docker deployment:** Runs as a container image or locally with uv, over HTTP or stdio.

## Good for

- Checking whether the next TER or TGV from a station is running late
- Planning a train journey between two French cities inside an AI chat
- Looking up current disruptions on a line before travelling
- Giving a personal assistant live rail status without a manual timetable search

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add sncf-mcp --env SNCF_API_TOKEN='<SNCF_API_TOKEN>' --env MCP_AUTH_TOKEN='<MCP_AUTH_TOKEN>' -- docker run -i --rm -e SNCF_API_TOKEN -e MCP_AUTH_TOKEN ghcr.io/keized/sncf-mcp:0.2.0
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "sncf-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "SNCF_API_TOKEN",
        "-e",
        "MCP_AUTH_TOKEN",
        "ghcr.io/keized/sncf-mcp:0.2.0"
      ],
      "env": {
        "SNCF_API_TOKEN": "<SNCF_API_TOKEN>",
        "MCP_AUTH_TOKEN": "<MCP_AUTH_TOKEN>"
      }
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "sncf-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "SNCF_API_TOKEN",
        "-e",
        "MCP_AUTH_TOKEN",
        "ghcr.io/keized/sncf-mcp:0.2.0"
      ],
      "env": {
        "SNCF_API_TOKEN": "<SNCF_API_TOKEN>",
        "MCP_AUTH_TOKEN": "<MCP_AUTH_TOKEN>"
      }
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "sncf-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "SNCF_API_TOKEN",
        "-e",
        "MCP_AUTH_TOKEN",
        "ghcr.io/keized/sncf-mcp:0.2.0"
      ],
      "env": {
        "SNCF_API_TOKEN": "<SNCF_API_TOKEN>",
        "MCP_AUTH_TOKEN": "<MCP_AUTH_TOKEN>"
      }
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "sncf-mcp": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "SNCF_API_TOKEN",
        "-e",
        "MCP_AUTH_TOKEN",
        "ghcr.io/keized/sncf-mcp:0.2.0"
      ],
      "env": {
        "SNCF_API_TOKEN": "<SNCF_API_TOKEN>",
        "MCP_AUTH_TOKEN": "<MCP_AUTH_TOKEN>"
      }
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add sncf-mcp --env SNCF_API_TOKEN='<SNCF_API_TOKEN>' --env MCP_AUTH_TOKEN='<MCP_AUTH_TOKEN>' -- docker run -i --rm -e SNCF_API_TOKEN -e MCP_AUTH_TOKEN ghcr.io/keized/sncf-mcp:0.2.0
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.sncf-mcp]
command = "docker"
args = ["run", "-i", "--rm", "-e", "SNCF_API_TOKEN", "-e", "MCP_AUTH_TOKEN", "ghcr.io/keized/sncf-mcp:0.2.0"]
env = { SNCF_API_TOKEN = "<SNCF_API_TOKEN>", MCP_AUTH_TOKEN = "<MCP_AUTH_TOKEN>" }
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "sncf-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "SNCF_API_TOKEN",
        "-e",
        "MCP_AUTH_TOKEN",
        "ghcr.io/keized/sncf-mcp:0.2.0"
      ],
      "env": {
        "SNCF_API_TOKEN": "<SNCF_API_TOKEN>",
        "MCP_AUTH_TOKEN": "<MCP_AUTH_TOKEN>"
      }
    }
  }
}
```

Or run: gemini mcp add -s user -e SNCF_API_TOKEN='<SNCF_API_TOKEN>' -e MCP_AUTH_TOKEN='<MCP_AUTH_TOKEN>' sncf-mcp docker -- run -i --rm -e SNCF_API_TOKEN -e MCP_AUTH_TOKEN ghcr.io/keized/sncf-mcp:0.2.0

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "sncf-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "SNCF_API_TOKEN",
        "-e",
        "MCP_AUTH_TOKEN",
        "ghcr.io/keized/sncf-mcp:0.2.0"
      ],
      "env": {
        "SNCF_API_TOKEN": "<SNCF_API_TOKEN>",
        "MCP_AUTH_TOKEN": "<MCP_AUTH_TOKEN>"
      }
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "sncf-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "SNCF_API_TOKEN",
        "-e",
        "MCP_AUTH_TOKEN",
        "ghcr.io/keized/sncf-mcp:0.2.0"
      ],
      "env": {
        "SNCF_API_TOKEN": "<SNCF_API_TOKEN>",
        "MCP_AUTH_TOKEN": "<MCP_AUTH_TOKEN>"
      }
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "sncf-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "SNCF_API_TOKEN",
        "-e",
        "MCP_AUTH_TOKEN",
        "ghcr.io/keized/sncf-mcp:0.2.0"
      ],
      "env": {
        "SNCF_API_TOKEN": "<SNCF_API_TOKEN>",
        "MCP_AUTH_TOKEN": "<MCP_AUTH_TOKEN>"
      }
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "sncf-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "SNCF_API_TOKEN",
        "-e",
        "MCP_AUTH_TOKEN",
        "ghcr.io/keized/sncf-mcp:0.2.0"
      ],
      "env": {
        "SNCF_API_TOKEN": "<SNCF_API_TOKEN>",
        "MCP_AUTH_TOKEN": "<MCP_AUTH_TOKEN>"
      }
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "sncf-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "SNCF_API_TOKEN",
        "-e",
        "MCP_AUTH_TOKEN",
        "ghcr.io/keized/sncf-mcp:0.2.0"
      ],
      "env": {
        "SNCF_API_TOKEN": "<SNCF_API_TOKEN>",
        "MCP_AUTH_TOKEN": "<MCP_AUTH_TOKEN>"
      }
    }
  }
}
```

The AI Assistant docs only show command and args. If the env block is ignored, use Junie for this server.

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "sncf-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "SNCF_API_TOKEN",
        "-e",
        "MCP_AUTH_TOKEN",
        "ghcr.io/keized/sncf-mcp:0.2.0"
      ],
      "env": {
        "SNCF_API_TOKEN": "<SNCF_API_TOKEN>",
        "MCP_AUTH_TOKEN": "<MCP_AUTH_TOKEN>"
      }
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "sncf-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "SNCF_API_TOKEN",
        "-e",
        "MCP_AUTH_TOKEN",
        "ghcr.io/keized/sncf-mcp:0.2.0"
      ],
      "env": {
        "SNCF_API_TOKEN": "<SNCF_API_TOKEN>",
        "MCP_AUTH_TOKEN": "<MCP_AUTH_TOKEN>"
      }
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "sncf-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "SNCF_API_TOKEN",
        "-e",
        "MCP_AUTH_TOKEN",
        "ghcr.io/keized/sncf-mcp:0.2.0"
      ],
      "env": {
        "SNCF_API_TOKEN": "<SNCF_API_TOKEN>",
        "MCP_AUTH_TOKEN": "<MCP_AUTH_TOKEN>"
      }
    }
  }
}
```

## Tools

From the tool list in its README, going by the names, 1 of 4 tools reads data; 3 names don't say. From the server's own tool labels and tool names; not verified by us.

- `find_station` (name suggests: reads): Station ids by name
- `departures`: Next departures with realtime delay, cancellation and skipped stop
- `journeys`: Journeys with legs and realtime delays
- `disruptions`: Current and upcoming disruptions (service alerts)

## FAQ

### Do I need a token to use the realtime data?

Realtime delay and disruption feeds need no token. The SNCF API key is required for the schedule and journey tools.

### How do I get the SNCF API token?

You can request a free developer token from the SNCF developer page, and it arrives by email.

### Which clients can connect to SNCF trains?

It works with Claude Code, claude.ai, ChatGPT, Cursor and other MCP clients over streamable HTTP, or over stdio for local launches.

### What happens if the realtime feed is down?

Tools return planned times with a realtime_unavailable flag instead of failing.

### Is SNCF trains free?

Yes. SNCF trains is open source, so you can use and self-host it for free.

### How do I add SNCF trains to Claude Code?

Run this command in your terminal: claude mcp add sncf-mcp --env SNCF_API_TOKEN='<SNCF_API_TOKEN>' --env MCP_AUTH_TOKEN='<MCP_AUTH_TOKEN>' -- docker run -i --rm -e SNCF_API_TOKEN -e MCP_AUTH_TOKEN ghcr.io/keized/sncf-mcp:0.2.0

### What are the best alternatives to SNCF trains?

The closest alternatives to SNCF trains are Europe Rail Watch MCP, MCP Server Tfl, Tfl MCP Server, ViaggiaTreno and DealLabs.

## Where this comes from

- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Europe Rail Watch MCP](https://ai-powered.com/mcp/europe-rail-watch-mcp): Europe Rail Watch MCP is a paid MCP server for maps and travel.
- [MCP Server Tfl](https://ai-powered.com/mcp/mcp-server-tfl): MCP Server Tfl is an open-source MCP server for maps and travel.
- [Tfl MCP Server](https://ai-powered.com/mcp/tfl-mcp-server): Tfl MCP Server is an open-source MCP server for maps and travel.
- [ViaggiaTreno](https://ai-powered.com/mcp/viaggiatreno): ViaggiaTreno is an open-source MCP server for maps and travel.
- [DealLabs](https://ai-powered.com/mcp/deallabs): DealLabs is a free MCP server for maps and travel.
- [Italy Trains (ViaggiaTreno)](https://ai-powered.com/mcp/italy-trains-viaggiatreno): Italy Trains (ViaggiaTreno) is an open-source MCP server for maps and travel.
- [Swiss Public Transport](https://ai-powered.com/mcp/swiss-public-transport): Swiss Public Transport is an open-source MCP server for maps and travel.
- [Charlotte Area Transit (CATS)](https://ai-powered.com/mcp/charlotte-area-transit-cats): Charlotte Area Transit (CATS) is an open-source MCP server for maps and travel.

---
Source: https://ai-powered.com/mcp/sncf-trains
