olamaps-mcp-server

rdsdd2021/olamaps-mcp-server

3.1

If you are the rightful owner of olamaps-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

OlaMaps MCP Server provides AI assistants with access to OlaMaps API services optimized for India, including geocoding, reverse geocoding, directions, and places search.

Tools
5
Resources
0
Prompts
0

OlaMaps MCP Server

A Model Context Protocol (MCP) server that provides AI assistants with access to OlaMaps API services including geocoding, reverse geocoding, directions, and places search specifically optimized for India.

Features

  • Geocoding: Convert addresses to coordinates
  • Reverse Geocoding: Convert coordinates to addresses
  • Directions: Get routing information between locations
  • Places Search: Find businesses and points of interest
  • India-focused: Optimized for Indian locations and addresses

Installation

Using npx (Recommended)

npx olamaps-mcp-server

Global Installation

npm install -g olamaps-mcp-server

Local Development

git clone https://github.com/rdsdd2021/olamaps-mcp-server.git
cd olamaps-mcp-server
npm install
npm run build
npm start

Configuration

MCP Client Configuration

Add to your MCP client configuration (e.g., Claude Desktop):

{
  "mcpServers": {
    "olamaps": {
      "command": "npx",
      "args": ["olamaps-mcp-server"],
      "env": {
        "OLAMAPS_API_KEY": "your_api_key_here"
      }
    }
  }
}

API Key

You'll need an OlaMaps API key. Get one from OlaMaps Platform.

Set the OLAMAPS_API_KEY environment variable with your API key.

Available Tools

1. olamaps_geocode

Convert an address or place name to geographic coordinates.

Parameters:

  • address (string): Address or place name to geocode

Example:

{
  "address": "Connaught Place, New Delhi"
}

2. olamaps_reverse_geocode

Convert geographic coordinates to a human-readable address.

Parameters:

  • latitude (number): Latitude coordinate
  • longitude (number): Longitude coordinate

Example:

{
  "latitude": 28.6315,
  "longitude": 77.2167
}

3. olamaps_directions

Get directions between two locations with route information.

Parameters:

  • origin (string): Starting location (address or lat,lng)
  • destination (string): Destination location (address or lat,lng)
  • mode (string, optional): Transportation mode ('driving', 'walking', 'cycling')

Example:

{
  "origin": "India Gate, New Delhi",
  "destination": "Red Fort, New Delhi", 
  "mode": "driving"
}

4. olamaps_search_places

Search for places, businesses, or points of interest.

Parameters:

  • query (string): Search query for places
  • location (object, optional): Location bias with latitude and longitude
  • radius (number, optional): Search radius in meters

Example:

{
  "query": "restaurants near me",
  "location": {"latitude": 28.6315, "longitude": 77.2167},
  "radius": 1000
}

5. olamaps_place_details

Get detailed information about a specific place.

Parameters:

  • place_id (string): The place ID to get details for

Example:

{
  "place_id": "ChIJL_P_CXMEDTkRw0ZdG-0GVvw"
}

Usage Examples

With Claude Desktop

Once configured, you can ask Claude:

  • "Find the coordinates for Bangalore Palace"
  • "Get directions from Mumbai Airport to Gateway of India"
  • "What's the address for coordinates 19.0760, 72.8777?"
  • "Search for hospitals near Connaught Place"

Development

Building

npm run build

Running in Development

npm run dev

Testing

npm test

API Documentation

This server integrates with the following OlaMaps API endpoints:

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the file for details.

Support