# SNCF — how to use (mcp.ai)

Connect your SNCF account and use 9 tools for developer tools straight from your AI agent. Connect with your own API key. Access SNCF passenger-information data for train journeys, stations, schedules, service status, and transport-network discovery.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_sncf?ms=1787291220000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `sncf_find_nearby_places`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/sncf`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/sncf/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/sncf/find/nearby/places` — Find SNCF stations, stops, or points of interest near a geographic coordinate.
  - body: { limit?: integer, latitude: number, longitude: number, region_id?: string, place_type?: string, distance_meters?: integer }
- `POST https://api.mcp.ai/api/sncf/get/service/status` — Get SNCF network service disruptions and affected lines, stations, or vehicle journeys for a time window. Returns one page; pass next_cursor back to continue.
  - body: { depth?: integer, limit?: integer, since?: string, until?: string, region_id?: string, next_cursor?: string }
- `POST https://api.mcp.ai/api/sncf/get/station/board` — Get upcoming departures or arrivals for an SNCF station, including scheduled and realtime times and disruption context.
  - body: { limit?: integer, region_id?: string, board_type?: string, station_id: string, from_datetime?: string, data_freshness?: string, direction_type?: string, duration_seconds?: integer }
- `POST https://api.mcp.ai/api/sncf/get/transport/object` — Get details for one SNCF network, line, route, station, stop, mode, company, or vehicle journey by canonical ID.
  - body: { depth?: integer, object_id: string, region_id?: string, collection: string }
- `POST https://api.mcp.ai/api/sncf/list/coverage` — Get the SNCF transport-data coverage region and its current production horizon.
- `POST https://api.mcp.ai/api/sncf/list/transport/objects` — Browse one supported SNCF transport-object collection, such as lines, networks, routes, stations, or vehicle journeys.
  - body: { depth?: integer, limit?: integer, region_id?: string, collection: string, next_cursor?: string, data_freshness?: string }
- `POST https://api.mcp.ai/api/sncf/plan/journey` — Plan SNCF train journeys between two station/place IDs or coordinates for a requested departure or arrival time.
  - body: { datetime?: string, to_place: string, region_id?: string, from_place: string, wheelchair?: boolean, max_journeys?: integer, max_transfers?: integer, traveler_type?: string, data_freshness?: string, datetime_represents?: string, max_duration_seconds?: integer }
- `POST https://api.mcp.ai/api/sncf/search/places` — Find SNCF stations, addresses, administrative areas, or points of interest by name and return IDs usable for journeys and station boards.
  - body: { near?: string, depth?: integer, limit?: integer, query: string, region_id?: string, place_type?: string }
- `POST https://api.mcp.ai/api/sncf/search/transport/objects` — Search SNCF networks, modes, lines, routes, stations, or stop points by name and return canonical transport-object IDs.
  - body: { depth?: integer, query: string, region_id?: string, object_type?: string }

## Example prompts
- "What can I do in SNCF?"
- "Show me a summary of my SNCF account"

## More
- Page: https://mcp.ai/sncf
- Agent spec (llms.txt): https://mcp.ai/sncf/llms.txt
- Postman collection: https://mcp.ai/sncf/postman.json
