by r-huijts
A Model Context Protocol (MCP) server that provides access to NS (Dutch Railways) travel information through Claude AI. This server enables Claude to fetch real-time train travel information and disruptions using the official Dutch NS API.
ns-mcp-server is a Model Context Protocol (MCP) server designed to connect Claude AI with real-time train travel information from the Dutch Railways (NS) via their official API. It essentially transforms your AI assistant into an expert on Dutch train travel, providing up-to-date information on schedules, disruptions, and more.
You can install and use ns-mcp-server in three primary ways:
Using Claude Desktop with NPM Package: Update your Claude configuration file (~/Library/Application Support/Claude/claude_desktop_config.json
) to include the ns-mcp-server
command and your NS API key. You can obtain an API key from the NS API Portal.
Using Smithery: Utilize the Smithery CLI to automatically install the NS Travel Information Server with the command npx -y @smithery/cli install ns-server --client claude
.
From Source: Clone the repository, install dependencies (npm install
), copy the example environment file (cp .env.example .env
), and add your NS API key to the .env
file. Then, update your Claude configuration file with the path to the built index.js
and your API key. Remember to restart Claude Desktop after making changes.
An NS_API_KEY
environment variable is required for all installation methods.
ns-mcp-server offers comprehensive access to NS train information through various endpoints:
Real-time Train Information:
Pricing Information:
Station Information:
Additional Features:
This MCP server can be used for a wide range of real-world scenarios, including:
Q: Where can I get an NS API key? A: You can obtain an API key from the NS API Portal.
Q: What environment variable is required for this server?
A: The NS_API_KEY
environment variable is required and must contain your NS API key.
Q: What kind of information can I get about stations? A: You can access details like facilities, accessibility features, platform layouts, OV-fiets availability, and location information for stations.
Q: Does this server support multiple languages? A: Yes, information is available in both Dutch and English.
Transform your AI assistant into a Dutch railways expert! This MCP server connects Claude to real-time NS (Nederlandse Spoorwegen) travel information, making it your perfect companion for navigating the Netherlands by train.
You can install this server in three ways:
Update your Claude configuration file (~/Library/Application Support/Claude/claude_desktop_config.json
):
{
"mcpServers": {
"ns-server": {
"command": "npx",
"args": [
"-y",
"ns-mcp-server"
],
"env": {
"NS_API_KEY": "your_api_key_here"
}
}
}
}
You can get an API key from NS API Portal
To install NS Travel Information Server automatically via Smithery:
npx -y @smithery/cli install ns-server --client claude
npm install
cp .env.example .env
.env
file:
NS_API_KEY=your_api_key_here
Then update your Claude configuration file:
{
"mcpServers": {
"ns-server": {
"command": "node",
"args": [
"/path/to/ns-server/build/index.js"
],
"env": {
"NS_API_KEY": "your_api_key_here"
}
}
}
}
Make sure to:
/path/to/ns-server
with the actual path to your installationenv
section. It can be obtained from here https://apiportal.ns.nl/product#product=NsAppAfter updating the configuration, restart Claude Desktop for the changes to take effect.
Variable | Description |
---|---|
NS_API_KEY | Your NS API key (required) |
This MCP server provides comprehensive access to NS train information through the following endpoints:
This project is licensed under the MIT License - see the LICENSE file for details
Reviews feature coming soon
Stay tuned for community discussions and feedback