bus-scheduling-mcp
Bus Scheduling MCP Server
This is a Model Context Protocol (MCP) server designed to interface with the Bus Scheduling Backend system. It allows MCP-compatible LLM clients (like Claude Desktop, Cursor, Cline, etc.) to access scheduling data, read KPIs, list routes, and trigger/monitor optimization algorithms.
Prerequisites
Node.js (v18 or higher recommended)
The accompanying Python backend must be running (by default on
http://127.0.0.1:8000).
Installation
Install dependencies:
npm installBuild the TypeScript code:
npm run build
Configuration
If your backend is running on a different URL, you can configure it via a .env file in the root of this /mcp-server directory.
Example .env:
API_BASE_URL=http://localhost:8000/apiRunning the Server
For standard usage as an MCP Server:
Point your MCP client configuration (e.g. cline_mcp_settings.json or equivalent) to the built index.js file.
Example Cursor/Claude config:
{
"mcpServers": {
"bus-scheduling": {
"command": "node",
"args": ["/absolute/path/to/mcp-server/build/index.js"]
}
}
}For development:
Run the development watcher (useful if you are actively modifying the MCP server code):
npm run devAvailable Tools
The server exposes the following tools directly to the AI:
Dashboard & Metrics
scheduling_get_kpi: Fetch KPIs (vehicle status, departures, punctuality).scheduling_get_trends: Get passenger flow trends.
Routes & Data
scheduling_list_routes: List active bus routes.scheduling_get_route_details: Fetch stations and departures for a specific route.
Plans & Gantt
scheduling_list_plans: List all saved scheduling plans.scheduling_get_gantt_data: Get task formats for Gantt charts.
Optimization
scheduling_get_optimization_algorithms: List available optimization scripts.scheduling_run_optimization: Trigger an algorithm task.scheduling_get_optimization_status: Check the status of a running algorithm task.
Testing & Evaluations
You can inspect the capabilities of this server directly using the official MCP inspector:
npx @modelcontextprotocol/inspector node build/index.js10 comprehensive use cases and checks are available in evaluations.xml in this project's root folder.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/uwmyuan/transit-scheduling-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server