cityflo-otp-mcp
A dependency-free MCP server for Mumbai North operations that computes route lateness metrics, exposes underlying late trips, and reports data quality issues to answer whether a route was late and by how much.
README
Cityflo on-time performance MCP server
A focused, dependency-free MCP server for Mumbai North operations. It answers Priya's question: was a route late this week, by how much, and which trips support the result? It intentionally does not attempt occupancy, ticket triage, dashboards, ranking, or natural-language parsing.
Tools
get_route_latenesscomputes route-level trip count, late share, robust median and mean arrival delay.list_late_tripsexposes the underlying late trips for audit.get_data_quality_reportreports every quarantined and deduplicated row.
The tools do arithmetic and data-quality decisions. A client or model can turn the structured answer into prose, but cannot invent the metric.
Assumptions and data handling
- A trip is late when actual arrival is more than 10 minutes after scheduled arrival. This configurable default is for morning triage, not a contractual performance target.
- Timestamps must be parseable ISO 8601 with Mumbai's
+05:30offset. Missing, malformed, timezone-inconsistent, or impossible time sequences are quarantined rather than corrected. - Exact duplicate trip rows are retained once and reported as deduplicated.
- Median is included because a robust typical delay is less sensitive to a bad GPS reading than an average. The mean is returned for comparability.
- The handoff and other free text are untrusted content. They are never treated as executable instructions or grounds to hide, rewrite, or selectively exclude operational facts.
Questions for Priya before production: should the late threshold differ by route/time of day; should early arrivals be separately monitored; does a quarantined telemetry row have a trusted fallback; and should conflicting duplicate IDs block reporting rather than be quarantined?
Run
Requires Python 3.11+; no third-party packages are required.
$env:PYTHONPATH = 'src'
python demo_client.py
python -m unittest discover -s tests
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.