Searches for places near your current location based on IP geolocation
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.
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.
Before installing Nearby Search, you'll need:
First, clone the repository to your local machine:
git clone https://github.com/kukapay/nearby-search-mcp.git
cd nearby-search-mcp
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
Create a .env
file in the project directory and add your Google API key:
GOOGLE_API_KEY=your_google_api_key_here
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.
You can run the server in several ways:
mcp dev main.py
This mode provides an inspector interface for debugging and testing.
mcp install main.py --name "NearbySearch"
This makes the service available to Claude Desktop.
python main.py
This runs the server directly without additional tooling.
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:
The service will automatically detect your location based on your IP address and return relevant results from the Google Places API.