Provides Israeli public transport information including location search, route guidance, and transit directions
A Model Context Protocol (MCP) server that provides access to the Israeli transport api.
This is the Unofficial MCP of Bus Nearby API, You can check this API here.
https://github.com/user-attachments/assets/147ee388-e9c0-4f97-82e7-71d4d6534de0
Setup the MCP server:
{
"mcpServers": {
"busnearby-docker": {
"command": "docker",
"args": ["run", "--rm", "-i", "shmuelc/busnearby-mcp:latest"]
}
}
}
Clone this repo
Navigate to repo foler
Build and setup the MCP server:
docker build -t busnearby-mcp .
Add this to mcp.json
{
"mcpServers": {
"busnearby": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"--name",
"busnearby-mcp-cursor",
"busnearby-mcp"
],
"env": {}
}
}
}
Install dependencies:
npm install
Build the project:
npm run build
Test the MCP server:
npm start
Add to your Cursor MCP configuration:
{
"mcpServers": {
"busnearby": {
"command": "node",
"args": ["/Users/shmuel/Desktop/personal/busnearby-mcp/dist/main.js"],
"env": {}
}
}
}
Important: Replace the path with your actual project path.
Restart Cursor to load the new MCP server
geocode
Convert location queries to coordinates.
Parameters:
locale
: "he" or "en" (Hebrew or English)query
: Location string (e.g., "תל אביב" or "Tel Aviv")Example:
{
"locale": "he",
"query": "תל אביב"
}
directions
Get transit directions between locations.
Parameters:
fromPlace
: Starting location ("address::lat,lng")toPlace
: Destination ("address::lat,lng")locale
: "he" or "en" (default: "he")arriveBy
: Optimize for arrival time (default: false)wheelchair
: Wheelchair accessible (default: false)mode
: Transport modes (default: "WALK,TRANSIT")numItineraries
: Number of routes (default: 3)date
: Trip date (YYYY-MM-DD, optional)time
: Trip time (HH:MM, optional)# Build the image
docker build -t busnearby-mcp .
# Run with docker-compose
docker-compose up -d
# Run interactively for testing
docker run --rm -i busnearby-mcp
# Test MCP protocol
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{"tools":{}},"clientInfo":{"name":"test","version":"1.0.0"}}}' | docker run --rm -i busnearby-mcp
npm install
npm run dev
npm run build
npm start
npm run test:e2e
docker build --no-cache -t busnearby-mcp .
docker logs busnearby-mcp
docker images | grep busnearby-mcp
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{"tools":{}},"clientInfo":{"name":"test","version":"1.0.0"}}}' | docker run --rm -i busnearby-mcp
This MCP server interfaces with the Bus Nearby API to provide:
All responses follow standard MCP protocol formatting with proper error handling.
Feel free to:
Getting Started:
All contributions are welcome and appreciated!