Skip to main content
Glama

🚌 Madurai CityBus Model Context Protocol (MCP) Server

npm version rsiva2294/madurai-transit-mcp MCP server License: MIT Powered by MaduraiOne

The official Model Context Protocol (MCP) server for Madurai CityBus public transit, connecting AI assistants (Claude Desktop, Cursor, Gemini, AI Agents) to Madurai's bus route network, official stage fares, stop sequences, and platform bay departures.


⚡ Features

  • Route Discovery: Direct and 1-transfer routing across 966 bus routes and 3,000 stops in Madurai.

  • Official Stage Fares: Authoritative TNSTC stage fare breakdowns (Ordinary, LSS, Express, Deluxe AC).

  • Platform Bay Intelligence: Departure platforms (I/II/III/IV) at Periyar Bus Stand.

  • Bilingual Stop Search: Search stops in English, Tamil Unicode (பெரியார்), or colloquial transliterations.

  • Interactive Deep Links: Automatically returns canonical links (https://maduraione.in/route/...) for live visual route maps.


Related MCP server: Singapore Bus MCP Server

🚀 Quick Setup

1. Claude Desktop

Add this configuration to your claude_desktop_config.json:

  • MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

  • Linux: ~/.config/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "madurai-bus": {
      "command": "npx",
      "args": ["-y", "madurai-transit-mcp"]
    }
  }
}

2. Cursor IDE

Add this to .cursor/mcp.json or in Cursor Settings ➔ Features ➔ MCP:

{
  "mcpServers": {
    "madurai-bus": {
      "command": "npx",
      "args": ["-y", "madurai-transit-mcp"]
    }
  }
}

3. Local Testing with MCP Inspector

You can test all tools interactively using the official MCP Inspector:

npx @modelcontextprotocol/inspector npx -y madurai-transit-mcp

🛠️ Available MCP Tools

search_bus_routes

Find direct and 1-transfer bus routes between two locations in Madurai.

{
  "from": "Periyar",
  "to": "Alagarkovil",
  "max_transfers": 1
}

get_bus_details

Get full route details, spoke category, departure platform bay, and complete stop sequence for a specific bus number.

{
  "bus_number": "44"
}

search_bus_stops

Bilingual search (English & Tamil) for bus stops with spoke classifications and verified GPS coordinates.

{
  "query": "பெரியார்"
}

calculate_fare

Calculate exact official TNSTC stage fares across all service classes (Ordinary, LSS, Express, Deluxe AC).

{
  "boarding_stop": "PERIYAR BUS STAND",
  "alighting_stop": "MGR BUS STAND",
  "bus_number": "77"
}

⚠️ Ground Realities & Disclaimers

Public transit in Tier-2 Indian cities operates differently from Western transit models:

  1. Headway Frequency vs. Timetables: TNSTC Madurai buses operate on shift-based headway frequency rather than published minute-by-minute digital timetables.

  2. Topological vs. Surveyed GPS: Out of ~3,000 stops across the district, ~600 core urban stops have verified survey coordinates. Remaining rural/peri-urban stops are mapped topologically by sequence.

  3. Multi-Leg Transfers: Interchange suggestions use the 7-Spoke Madurai Topological Model and should be treated as guidance. Commuters should verify live platform departures at bus stands.


🌐 Powered By


📄 License

MIT © MaduraiOne

Available Tools

4 tools
calculate_fareB

Calculate the official TNSTC stage fare between any boarding and alighting bus stop in Madurai across Ordinary, LSS, Express, and Deluxe/AC classes based on authoritative stage charts.

ParametersJSON Schema
NameRequiredDescriptionDefault
bus_numberNoOptional specific bus number to calculate exact route-stage fare (e.g. '44', '77', '5').
boarding_stopYesBoarding stop name (e.g. 'PERIYAR BUS STAND', 'PBS', 'Kalavasal').
alighting_stopYesAlighting stop name (e.g. 'MGR BUS STAND', 'Mattuthavani', 'Alagarkovil').

TDQS

B3.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the outputs are based on 'authoritative stage charts' but does not describe what the return value looks like, how ambiguous stop names are handled, what happens when bus_number is omitted, or any side effects. The lack of such details makes it thin for a tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, well-structured sentence that front-loads the core function and scope. Every phrase serves a purpose, with no redundancy or filler. It is appropriately sized for the information it conveys.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite having a moderate parameter count and no output schema, the description omits essential context: it does not clarify what the tool returns (e.g., fare amount, breakdown by class), how it handles multiple stops with the same name, or the effect of the optional bus_number parameter on the calculation. An agent would need to infer these details, making it incomplete for reliable invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all three parameters. The description adds no additional parameter-specific meaning beyond mentioning service classes, which are not directly tied to any parameter. Per the baseline rule, with full schema coverage, a score of 3 is appropriate; the description neither enhances nor detracts from parameter understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific verb ('Calculate') and resource ('official TNSTC stage fare') with a defined scope (boarding and alighting bus stop in Madurai across specified service classes). It distinguishes itself from sibling tools like search_bus_routes and get_bus_details by focusing on fare calculation, so an agent can readily identify its unique purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for fare calculation but does not explicitly state when to use this tool over siblings. There are no exclusions or explicit alternatives mentioned. An agent could infer from context, but the guidance is not explicit, so it scores at the implied level rather than clear context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_bus_detailsA

Lookup route details, platform bay at Periyar Bus Stand, spoke category, and stop sequence for a specific Madurai bus number (e.g. '44', '77', '11A', '5'). By default returns key transit milestones for token efficiency; set verbose=true for the complete numbered stop list.

ParametersJSON Schema
NameRequiredDescriptionDefault
verboseNoSet to true to return the full numbered list of all intermediate stops. Default is false (returns key milestones).
bus_numberYesBus number to inspect (e.g. '44', '77', '11A', '5', '48P').

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Since no annotations are provided, the description carries the full burden of behavioral disclosure. It explicitly describes the default behavior (returns key milestones for token efficiency) and the verbose behavior (complete numbered stop list), which is a critical behavioral trait. It also lists the types of information returned. However, it does not mention any side effects, authentication, or error handling, which would be useful but not essential for a read-only lookup.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences with no redundancy. The first sentence front-loads the purpose and scope, and the second sentence explains the token-efficiency behavior and how to override it. Every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite the lack of an output schema, the description lists the key return elements (route details, platform bay, spoke category, stop sequence) and explains the verbose toggle, giving the agent enough to know what to expect. Minor gaps remain, such as error behavior or exact response structure, but these are secondary for a simple lookup tool with only two parameters.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, giving a baseline of 3. The description adds value beyond the schema by clarifying the default vs. verbose behavior for the 'verbose' parameter and providing real examples for 'bus_number' that illustrate the accepted format. This helps the agent understand how to set parameters appropriately.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('Lookup') and resource ('route details, platform bay at Periyar Bus Stand, spoke category, and stop sequence') for a specific Madurai bus number. It provides concrete examples of bus numbers ('44', '77', '11A', '5') and clearly differentiates from the sibling search tools by focusing on a specific bus rather than searching across routes or stops.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when a specific bus number is known, but does not explicitly state when to use this tool versus alternatives like search_bus_routes or search_bus_stops. No mention of 'use this when you have an exact bus number; use search when you don't' or any other exclusion criteria. The guidance is implicit at best.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_bus_routesA

Search bus routes between two stops in Madurai. Returns direct buses and 1-transfer options with stop counts, PBS platform bays, official TNSTC stage fares, and canonical visual map links. By default returns key milestones for token efficiency; set verbose=true for complete stop sequences.

ParametersJSON Schema
NameRequiredDescriptionDefault
toYesDestination stop or landmark in Madurai (e.g. 'Alagarkovil', 'Thirunagar', 'Airport').
fromYesOrigin stop or landmark in Madurai (e.g. 'Periyar', 'Mattuthavani', 'Goripalayam', 'பெரியார்').
verboseNoSet to true to return full intermediate stop lists for every leg. Default is false (key milestones).
max_transfersNoMaximum transfers allowed: 0 for direct only, 1 for up to 1-transfer. Default is 1.

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses the default behavior of returning key milestones for token efficiency, the verbose flag to get complete stop lists, and the output categories (fares, platform bays, map links). This is sufficient for a read-only search tool, though it does not explicitly state that it has no side effects or mention any rate limits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two well-structured sentences with no wasted words. The first sentence captures the core purpose and returns, and the second explains the default and verbose toggle. Information is front-loaded and easy to scan.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a search tool with 4 parameters and no output schema, the description covers the purpose, return content, and parameter-driven behavior (verbose, transfers). It omits edge cases or error handling, but these are minor for a straightforward route search, and the return description is helpful given no output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description adds some value by explaining the default for verbose (token efficiency) and implicitly confirming the default of max_transfers (1-transfer options), but it does not elaborate on the format or constraints beyond what the schema already states.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('Search'), a resource ('bus routes between two stops in Madurai'), and enumerates the return contents (stop counts, PBS platform bays, TNSTC fares, map links). This clearly distinguishes it from sibling tools like get_bus_details, search_bus_stops, and calculate_fare, which target different concerns.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description clearly indicates the tool is for finding routes between two stops, and the sibling names imply alternatives, but there is no explicit statement of when to use this tool versus when to use get_bus_details, search_bus_stops, or calculate_fare. The context is clear but exclusions are only implicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_bus_stopsA

Bilingual (English and Tamil) autocomplete and search for bus stops across Madurai. Returns canonical name, Tamil script name, spoke corridor, route frequency, and verified GPS coordinates if available.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesStop name, landmark, or Tamil transliteration to search (e.g. 'Periyar', 'Mattuthavani', 'பெரியார்', 'Meenakshi Temple').

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description discloses that GPS coordinates are 'verified' and 'if available', indicating optionality, and mentions bilingual and autocomplete behavior. However, it does not explicitly state this is a read-only operation, nor does it explain result format, pagination, or error conditions. With no annotations, the description carries full burden and provides only partial behavioral transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with key attributes (bilingual, autocomplete, search) and lists return fields without redundancy. It is concise and well-organized, though it could be slightly more compact without losing clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple one-parameter tool with no output schema, the description lists the returned fields but does not specify the return structure (e.g., array of objects, count, sorting). It also omits any limit or pagination behavior, leaving some ambiguity about what an agent should expect from the invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already achieves 100% coverage with a rich description of the 'query' parameter, including examples in English and Tamil. The tool description adds no additional parameter semantics beyond what the schema provides, so the baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states a specific verb (search) and resource (bus stops) with a defined scope (across Madurai) and lists explicit return fields. It is easily distinguishable from siblings like search_bus_routes (routes) and get_bus_details (specific bus details), making it evident this is the stop-search tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for finding bus stops, but it does not provide explicit guidance on when to use this tool versus alternatives such as search_bus_routes or get_bus_details. There are no mentions of exclusions, prerequisites, or alternative routing conditions, leaving usage largely inferred from the tool name and purpose.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 4 tool updatesv1.0.4
    • First observedcalculate_fare
    • First observedget_bus_details
    • First observedsearch_bus_routes
    • First observedsearch_bus_stops

TDQS

A4/5.0

Scored across 4 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: finding routes between stops, retrieving details for a specific bus number, searching stops, and calculating fares. No overlapping functionality, so an agent can easily select the right tool.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern in snake_case (search_bus_routes, get_bus_details, search_bus_stops, calculate_fare). This creates a predictable and uniform naming convention.

Tool Count5/5

With only 4 tools, the server is well-scoped for its narrow domain of Madurai bus transit. Each tool serves a necessary function, and the count is within the ideal 3-15 range.

Completeness4/5

The tool surface covers the core transit workflows: route search, bus details, stop lookup, and fare calculation. Missing features like schedule or real-time tracking are not implied by the domain scope, so only minor gaps exist.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers