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.
Clone the repository:
git clone https://github.com/kukapay/nearby-search-mcp.git
cd nearby-search-mcp
Install required dependencies:
# Using uv (recommended)
uv add "mcp[cli]" httpx python-dotenv
# Or using pip
pip install mcp httpx python-dotenv
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"
}
}
}
}
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
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:
keyword="coffee shop"
keyword="food", radius=800, type="restaurant"
keyword="park", radius=2000
The server will automatically detect your location using your IP address and return relevant nearby places matching your search criteria.
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.
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"
]
}
}
}
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.
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.