eladcandroid/rail-mcp-server
If you are the rightful owner of rail-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The Jerusalem Light Rail MCP Server provides easy access to light rail schedules and station information in Jerusalem, designed for deployment on Vercel.
Jerusalem Light Rail MCP Server
Easily access Jerusalem Light Rail schedules and find the nearest stations to any location using this Model Context Protocol (MCP) server. This server is designed to be deployed on Vercel.
Quick Start
Requirements
Vercel Account
This project is designed to be deployed on Vercel, so you'll need a Vercel account.
Node.js
Node.js 18 or later is required to run this project.
Installation
- Clone the repository:
git clone https://github.com/eladcandroid/rail-mcp-server.git
cd rail-mcp-server
- Install dependencies:
npm install
Usage
To run the server locally:
npm run dev
To deploy to Vercel:
npm run deploy
Once deployed, your MCP endpoint will be available at:
https://your-vercel-deployment-url.vercel.app/mcp
You can install this server in Claude AI and interact with it right away.
Using with Claude Desktop
To use this MCP server with Claude Desktop:
-
Make sure you have Node.js installed on your system (prerequisite for npx)
-
Add the following configuration to your Claude Desktop configuration file:
{
"mcpServers": {
"rail-mcp": {
"command": "npx",
"args": ["mcp-remote", "https://rail-mcp.vercel.app/mcp"]
}
}
}
- Claude Desktop will now be able to access the Jerusalem Light Rail tools.
Using with TypeScript SDK
Alternatively, you can test it with any MCP client using the TypeScript SDK:
import { Client } from "@modelcontextprotocol/sdk/client";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp";
const client = new Client({
name: "Light Rail Client",
version: "1.0.0"
});
// Connect to the MCP server
const transport = new StreamableHTTPClientTransport(
new URL("https://your-vercel-deployment-url.vercel.app/mcp")
);
await client.connect(transport);
// Call a tool
const result = await client.callTool({
name: "search-trains-by-name",
arguments: {
fromStationName: "נווה יעקב צפון",
toStationName: "סיירת דוכיפת",
}
});
console.log(result);
Available Tools
-
get-stations
- Get all light rail stations and their IDs -
find-station
- Find a station ID by its Hebrew name- Required arguments:
stationName
(string): The Hebrew name of the station
- Required arguments:
-
get-train-schedule
- Get the train schedule between two stations- Required arguments:
fromStationId
(string): ID of the departure stationtoStationId
(string): ID of the arrival stationdate
(string): Date in format YYYYMMDDtime
(string): Time in format HHMM
- Required arguments:
-
search-trains-by-name
- Search for trains between two stations using Hebrew names- Required arguments:
fromStationName
(string): Hebrew name of the departure stationtoStationName
(string): Hebrew name of the arrival station
- Optional arguments:
date
(string): Date in format YYYYMMDD (default: today)time
(string): Time in format HHMM (default: current time)clientTime
(string): Client's current time in ISO format
- Required arguments:
-
find-nearest-station-to-landmark
- Find the nearest light rail station to any address or location- Required arguments:
landmark
(string): Any location in Jerusalem - street address, landmark, restaurant, etc.
- Optional arguments:
date
(string): Date in format YYYYMMDD (default: today)time
(string): Time in format HHMM (default: current time)clientTime
(string): Client's current time in ISO format
- Required arguments:
The find-nearest-station-to-landmark
tool uses OpenStreetMap's Nominatim API to geocode any location in Jerusalem, calculates distances to all stations, and returns the nearest one with walking distance and train schedules. You can query virtually any location:
- Exact addresses (רחוב יפו 97, ירושלים)
- Neighborhoods (נחלאות, רחביה, בקעה)
- Landmarks (הכותל המערבי, מגדל דוד)
- Restaurants and cafes (קפה אמדו, מחניודה)
- Hotels (מלון המלך דוד)
- Shopping centers (קניון ממילא, קניון מלחה)
- Institutions (האוניברסיטה העברית, יד ושם)
Contributing
We welcome contributions to help improve the Jerusalem Light Rail MCP server. Whether you want to add new tools, enhance existing functionality, or improve documentation, your input is valuable.
For examples of other MCP servers and implementation patterns, see the Model Context Protocol servers repository.
License
This project is licensed under the MIT License.