Skip to content
MCP server

SNCF trains

MCP server giving AI assistants SNCF train schedules, live delays and disruptions

SNCF trains is an open-source MCP server for maps and travel. It runs as a hosted remote server, so there is nothing to install locally.

Pricing
Open source
Platforms
API, CLI, Self-hosted
Runs
Remotely
Access
Needs a secret key or token
Version
0.2.0
Listing updated

Similar MCP servers

Install

Add with the CLI

Run in a 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

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

Or share it with your project

Add to .mcp.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 Code setup guide

Add to claude_desktop_config.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.

Claude Desktop setup guide

Add to ~/.cursor/mcp.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.

Cursor setup guide

Add to ~/.copilot/mcp-config.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.

VS Code setup guide

Add with the CLI

Run in a terminal

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

Or add to config.toml

Add to ~/.codex/config.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>" }

Codex setup guide

Add to your client's MCP settings (most use this shape)

{
  "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>"
      }
    }
  }
}
  • Gemini CLI and Antigravity

    Gemini CLI

    Add to ~/.gemini/settings.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

    Antigravity

    Add to ~/.gemini/config/mcp_config.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.

    Gemini CLI and Antigravity setup guide

  • Devin Desktop (formerly Windsurf)

    Add to ~/.config/devin/mcp_config.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.

    Devin Desktop setup guide

  • Cline

    Add to cline_mcp_settings.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.

    Cline setup guide

  • Zed

    Add to Zed settings.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.

    Zed setup guide

  • JetBrains AI Assistant and Junie

    AI Assistant

    Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add

    {
      "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.

    Junie

    Add to ~/.junie/mcp/mcp.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.

    JetBrains AI Assistant and Junie setup guide

  • Kiro

    Add to ~/.kiro/settings/mcp.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.

    Kiro setup guide

Using several servers? Build one config file with the MCP config generator.

Configuration

  • SNCF_API_TOKENSNCF API keyRequired
  • MCP_AUTH_TOKENOptional bearer token required on requests

About SNCF trains

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.

Tools this server provides (4)

Taken from the project documentation; the running server may differ.

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_stationName 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)

What it does

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

Pricing

Open source

SNCF trains 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.

How AIPoweredBot checks servers