Skip to main content
Glama
MapmyIndia Mappls MCP Server

MapmyIndia Mappls MCP Server

MapmyIndia (Mappls) MCP Server (FastMCP)

A high-performance Model Context Protocol (MCP) server for MapmyIndia (Mappls) REST APIs, built using the FastMCP open-source framework.

This server enables AI assistants (such as Claude, Gemini, ChatGPT, Cursor, and Antigravity) to query geographic data, perform geocoding, generate driving & walking directions, calculate distance matrix ETAs, discover points of interest (POIs), and look up eLoc place details across India.


Features

  • FastMCP Framework: Built on Prefect HQ's fastmcp Python framework for automatic schema generation, robust validation, and low latency.

  • Flexible Authentication:

    • Static Access Token Mode: Pass a direct bearer MAPPLS_ACCESS_TOKEN.

    • OAuth 2.0 Client Credentials Flow: Pass MAPPLS_CLIENT_ID and MAPPLS_CLIENT_SECRET for automated token generation and pre-expiry refreshing.

  • Comprehensive Mappls Tools:

    • mappls_geocode: Convert location names to lat/long coordinates & eLoc codes.

    • mappls_reverse_geocode: Convert coordinates to formatted address details.

    • mappls_autosuggest: Live predictive location search suggestions.

    • mappls_get_directions: Route directions (driving, biking, walking, trucking) with turn-by-turn steps.

    • mappls_distance_matrix: N-to-M travel time and distance matrix calculations.

    • mappls_snap_to_road: Snap noisy GPS coordinate traces to road networks.

    • mappls_search_nearby: Discover POIs (restaurants, ATMs, hospitals, EV chargers, fuel stations) nearby.

    • mappls_place_details: Retrieve rich attributes for any 6-character Mappls eLoc code.

    • mappls_text_search: AI smart place search with spelling correction.

  • Built-in MCP Prompts: Pre-configured templates like plan_itinerary and optimize_logistics_hub.

  • Dual Transport Support: Run via stdio (for desktop apps) or sse (for HTTP microservices).

  • Offline / Mock Mode: Runs seamlessly in dry-run mode when API keys are not provided.


Related MCP server: mcp-tomtom

Installation & Setup

1. Requirements

  • Python 3.10 or higher

  • MapmyIndia (Mappls) Developer Credentials or Access Token (from Mappls Console)

2. Environment Configuration

Clone or copy this repository, then create a .env file from .env.example:

cp .env.example .env

Edit .env and fill in your Mappls token or client credentials:

# Option A: Direct Access Token (Recommended for Token Input)
MAPPLS_ACCESS_TOKEN=your_access_token_here

# Option B: Client Credentials
MAPPLS_CLIENT_ID=your_client_id_here
MAPPLS_CLIENT_SECRET=your_client_secret_here

MCP_TRANSPORT=stdio

3. Install Package

Install the package in editable mode:

pip install -e .

Or install with development dependencies:

pip install -e ".[dev]"

Quick Setup for Anyone (Run via uvx directly from GitHub)

Anyone can use this MCP server directly from GitHub without cloning or local installation by using uvx (included with uv).

1. Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "mappls": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/Bhupendrajee07/MMI-MCP.git",
        "mmi-mcp"
      ],
      "env": {
        "MAPPLS_CLIENT_ID": "YOUR_MAPPLS_CLIENT_ID",
        "MAPPLS_CLIENT_SECRET": "YOUR_MAPPLS_CLIENT_SECRET"
      }
    }
  }
}

2. Antigravity / Cursor / VS Code (mcp_config.json)

{
  "mcpServers": {
    "mappls": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/Bhupendrajee07/MMI-MCP.git",
        "mmi-mcp"
      ],
      "env": {
        "MAPPLS_ACCESS_TOKEN": "YOUR_MAPPLS_ACCESS_TOKEN"
      }
    }
  }
}

Local Development & Usage

Run via Stdio (Default)

mmi-mcp
# or
python -m mmi_mcp.server --transport stdio

Run via SSE (HTTP Server)

python -m mmi_mcp.server --transport sse --host 127.0.0.1 --port 8000

Running Tests

Run the unit and integration test suite:

$env:PYTHONPATH="src"; python -m pytest tests/ -v

License

MIT License

Available Tools

9 tools
mappls_autosuggestMappls AutosuggestA

Auto-suggest location search predictions for user input as text is typed. Returns ranked place recommendations.

Inputs: query (required), zoom, location. Returns: object

mappls_distance_matrixMappls Distance MatrixA

Calculate travel distances and durations matrix between multiple origin and destination points in India.

Inputs: origins (required), destinations (required), profile. Returns: object

mappls_geocodeMappls GeocodeA

Geocode an address or location text to retrieve latitude, longitude, eLoc code, and standardized address details in India.

Inputs: address (required), region. Returns: object

mappls_get_directionsMappls Get DirectionsB

Get driving, walking, biking, or trucking navigation directions between origin and destination coordinates/eLocs in India.

Inputs: origin (required), destination (required), profile, resource, +1 more. Returns: object

mappls_place_detailsMappls Place DetailsB

Retrieve rich location attributes and details for a location using its 6-character Mappls eLoc code.

Inputs: eloc (required). Returns: object

mappls_reverse_geocodeMappls Reverse GeocodeA

Reverse geocode a pair of geographic coordinates (latitude and longitude) to get the corresponding formatted address and administrative details.

Inputs: latitude (required), longitude (required). Returns: object

mappls_search_nearbyMappls Search NearbyA

Search points of interest (POIs) such as restaurants, fuel stations, ATMs, EV chargers, hospitals, hotels near given coordinates.

Inputs: keywords (required), latitude (required), longitude (required), page, +1 more. Returns: object

mappls_snap_to_roadMappls Snap To RoadA

Snap raw GPS coordinates trace to the nearest road network segments to smooth GPS noise.

Inputs: coordinates (required), profile. Returns: object

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 9 tools

    Disambiguation4/5

    Each tool maps to a distinct location API operation: geocoding, reverse geocoding, typeahead suggestions, routing, distance matrix, road snapping, nearby POI search, place details, and text search. The only real overlap is between autosuggest and text_search, but their descriptions clarify the intended use cases.

    Naming Consistency4/5

    All tools share a consistent mappls_ prefix and snake_case format. Most names follow a verb-plus-object style like get_directions or search_nearby, though a few are bare nouns such as distance_matrix and place_details, so the pattern is clean but not perfectly uniform.

    Tool Count5/5

    Nine tools is well-scoped for a location/mapping server. Each tool covers a distinct workflow with no obvious redundancy, and the count is within the ideal range for an MCP toolset.

    Completeness4/5

    The server covers the core read-only location lifecycle well: geocode and reverse geocode, place search and details, directions, distance matrix, and map matching. Advanced features like static map rendering or route optimization are absent, but common mapping workflows have no critical gaps.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers