Nearby Places MCP server

Integrates with Google Places API to provide location-based place discovery using IP-based detection, enabling users to find nearby businesses, restaurants, or services without manually entering coordinates.
Back to servers
Provider
kukapay
Release date
Mar 17, 2025
Language
Python
Stats
9 stars

This MCP server provides nearby place searches with automatic IP-based location detection, integrating with Google's Places API to find local businesses and points of interest based on your current location.

Installation

Prerequisites

  • Python 3.10 or higher
  • Google Cloud Platform API Key with Places API enabled
  • Internet connection

Setup Steps

  1. Clone the repository:

    git clone https://github.com/kukapay/nearby-search-mcp.git
    cd nearby-search-mcp
    
  2. Install required dependencies:

    # Using uv (recommended)
    uv add "mcp[cli]" httpx python-dotenv
    
    # Or using pip
    pip install mcp httpx python-dotenv
    
  3. Configure your client by adding the following to your MCP client configuration:

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

Usage

Starting the Server

You can run the server in several ways:

  • Development mode with MCP Inspector:

    mcp dev main.py
    
  • Install in Claude Desktop:

    mcp install main.py --name "NearbySearch"
    
  • Direct execution:

    python main.py
    

Using the Search Feature

The server provides a single tool endpoint:

search_nearby

This tool searches for places near your current location (detected automatically via your IP address).

Parameters:

  • keyword (required): What you're looking for (e.g., "coffee shop", "grocery store")
  • radius (optional): Search radius in meters (defaults to 1500)
  • type (optional): Specific place type filter (e.g., "restaurant", "cafe")

Example usage:

  • Search for coffee shops within default radius: keyword="coffee shop"
  • Find restaurants within 800 meters: keyword="food", radius=800, type="restaurant"
  • Locate nearby parks: keyword="park", radius=2000

The server will automatically detect your location using your IP address and return relevant nearby places matching your search criteria.

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later