Back to MCP Catalog

Nearby Search MCP Server

Location ServicesPython
Find nearby places using IP-based location detection
Available Tools

search_nearby

Searches for places near your current location based on IP geolocation

keywordradiustype

Nearby Search is a location service that helps you discover places around your current location without requiring GPS permissions. It uses IP-based geolocation to determine your approximate position and then leverages the Google Places API to find relevant businesses and points of interest nearby. With customizable search parameters including keywords, radius, and place types, this tool makes it easy to find restaurants, coffee shops, gas stations, or any other places of interest in your vicinity. The service is particularly useful for applications that need location-based recommendations without requiring precise user location data.

Overview

Nearby Search is a Model Context Protocol (MCP) server that enables location-based place discovery using IP geolocation and the Google Places API. This service allows you to find businesses and points of interest near your current location without requiring GPS permissions.

Prerequisites

Before installing Nearby Search, you'll need:

  • Python 3.10 or higher
  • A Google Cloud Platform account with Places API enabled
  • A Google API key with Places API access
  • Basic familiarity with command-line operations

Installation

Step 1: Clone the Repository

First, clone the repository to your local machine:

git clone https://github.com/kukapay/nearby-search-mcp.git
cd nearby-search-mcp

Step 2: Install Dependencies

You can install the required dependencies using either uv (recommended) or pip:

# Using uv
uv add "mcp[cli]" httpx python-dotenv

# Or using pip
pip install mcp httpx python-dotenv

Step 3: Configure Environment Variables

Create a .env file in the project directory and add your Google API key:

GOOGLE_API_KEY=your_google_api_key_here

Client Configuration

To use Nearby Search with Claude or other MCP-compatible clients, add the following configuration to your client settings:

{
  "mcpServers": {
    "nearby-search": {
      "command": "uv",
      "args": ["--directory", "/path/to/nearby-search-mcp", "run", "main.py"],
      "env": {
        "GOOGLE_API_KEY": "your_google_api_key_here"
      }
    }
  }
}

Replace /path/to/nearby-search-mcp with the actual path to the cloned repository on your system, and your_google_api_key_here with your Google API key.

Running the Server

You can run the server in several ways:

Development Mode with MCP Inspector

mcp dev main.py

This mode provides an inspector interface for debugging and testing.

Install in Claude Desktop

mcp install main.py --name "NearbySearch"

This makes the service available to Claude Desktop.

Direct Execution

python main.py

This runs the server directly without additional tooling.

Usage Examples

Once the server is running, you can use it to search for nearby places. Here are some example queries you might use in your MCP-compatible client:

  • "Find coffee shops near me"
  • "Search for gas stations within 2000 meters"
  • "Look for Italian restaurants in my area"

The service will automatically detect your location based on your IP address and return relevant results from the Google Places API.

Limitations

  • IP-based geolocation is less accurate than GPS
  • Results are dependent on Google Places API coverage in your area
  • API rate limits may apply based on your Google Cloud Platform account

Related MCPs

Google Maps
Location ServicesTypeScript

Access Google Maps API functionality for geocoding, place search, directions, and more

GeoPy Geocoding
Location ServicesPython

Geocoding service for converting addresses to coordinates and vice versa

IP Geolocation
Location ServicesPython

Get detailed geolocation information about IP addresses

About Model Context Protocol

Model Context Protocol (MCP) allows AI models to access external tools and services, extending their capabilities beyond their training data.

Generate Cursor Documentation

Save time on coding by generating custom documentation and prompts for Cursor IDE.