sncf-mcp-server
v1.0.1
Published
SNCF Model Context Protocol Server for Claude
Downloads
12
Maintainers
Readme
SNCF MCP Server
A Model Context Protocol (MCP) server for accessing French railway (SNCF) transportation data with Claude AI.
Overview
This MCP server allows Claude to:
- Search for train journeys between French stations
- Get information about train stations including facilities
- Access real SNCF data through their API
Quick Start
The quickest way to use this server is with npx:
npx sncf-mcp-server --api-key=YOUR_SNCF_API_KEYYou need to register for an SNCF API key at SNCF Open Data.
Connecting to Claude Desktop
To add the SNCF MCP server to Claude Desktop:
Locate the Claude configuration directory:
- Windows:
%USERPROFILE%\AppData\Roaming\Claude - macOS:
~/Library/Application Support/Claude - Linux:
~/.config/Claude
- Windows:
Create or edit the
claude_desktop_config.jsonfile:{ "mcpServers": { "sncf": { "command": "npx", "args": [ "-y", "sncf-mcp-server", "--api-key=YOUR_SNCF_API_KEY" ] } } }Restart Claude Desktop
Example Queries
Once connected, you can ask Claude:
- "What trains can I take from Paris to Lyon tomorrow morning?"
- "What facilities are available at Marseille Saint-Charles station?"
- "Find me a train from Bordeaux to Nice next Friday"
For Developers
If you want to run the server locally from source:
- Clone the repository
- Install dependencies:
npm install - Create a
.envfile with your SNCF API key:SNCF_API_KEY=your_api_key_here - Run the server:
node index.js
Available Tools
The server provides two tools to Claude:
- search_train_journeys - Find train connections between stations
- get_station_info - Get information about a train station
Debugging
If you encounter issues:
Check Claude Desktop logs:
- Windows:
%USERPROFILE%\AppData\Roaming\Claude\Logs - macOS:
~/Library/Logs/Claude - Linux:
~/.config/Claude/logs
- Windows:
Run with more logging:
npx sncf-mcp-server --api-key=YOUR_KEY --debug
License
MIT
Credits
Built for the Model Context Protocol which was developed by Anthropic for Claude.
