# Google Maps MCP Server (`reverberant_equality/mcp-google-maps`) Actor

MCP server for Google Maps / Local Business Search. Search places, get business details, and find nearby businesses via AI agents and MCP-compatible tools.

- **URL**: https://apify.com/reverberant\_equality/mcp-google-maps.md
- **Developed by:** [Jordan C](https://apify.com/reverberant_equality) (community)
- **Categories:** Developer tools, AI, MCP servers
- **Stats:** 0 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.01 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Google Maps MCP Server

A Model Context Protocol (MCP) server for Google Maps and local business search. Provides AI agents with tools to search for places, get business details, and find nearby locations — all using Cheerio-based scraping (no Puppeteer/Playwright required).

### Features

- **search\_places(query, location)** – Search Google Maps for businesses matching a query
- **get\_place\_details(place\_name, location)** – Get detailed info including reviews, hours, and photos
- **find\_nearby(latitude, longitude, radius, type)** – Find businesses near GPS coordinates

### Quick Start

#### Prerequisites

- Node.js 18+
- npm

#### Install & Run

```bash
## Clone and install
cd mcp-google-maps
npm install

## Build TypeScript
npm run build

## Run in stdio mode (for MCP-compatible AI agents)
npm start:stdio

## Run in HTTP mode
npm start:http
```

### MCP Integration

#### Claude Desktop / AI Agent Setup

Add this to your MCP client configuration:

```json
{
  "mcpServers": {
    "google-maps": {
      "command": "node",
      "args": ["/path/to/mcp-google-maps/dist/index.js"],
      "env": {}
    }
  }
}
```

#### HTTP Mode

The server also runs as an HTTP API on port 3000:

```bash
node dist/index.js --http
```

**List tools:**

```
GET http://localhost:3000/mcp/tools
```

**Call a tool:**

```
POST http://localhost:3000/mcp
Content-Type: application/json

{
  "tool": "search_places",
  "args": {
    "query": "coffee shop",
    "location": "New York"
  }
}
```

### Tools Reference

#### `search_places`

Search Google Maps for places matching a query in a location.

**Parameters:**
| Parameter  | Type   | Required | Description                     |
|-----------|--------|----------|---------------------------------|
| `query`   | string | Yes      | What to search for              |
| `location`| string | Yes      | Where to search                 |

**Example:**

```json
{
  "tool": "search_places",
  "args": {
    "query": "pizza",
    "location": "San Francisco, CA"
  }
}
```

**Response:**

```json
[
  {
    "name": "Tony's Pizza Napoletana",
    "address": "1570 Stockton St, San Francisco",
    "rating": 4.5,
    "ratingCount": 4723,
    "phone": "+14158359888",
    "website": "https://tonyspizza.com",
    "category": null,
    "placeId": "12345"
  }
]
```

#### `get_place_details`

Get detailed information about a specific place.

**Parameters:**
| Parameter    | Type   | Required | Description                     |
|-------------|--------|----------|---------------------------------|
| `place_name`| string | Yes      | Name of the place               |
| `location`  | string | Yes      | Where the place is located      |

**Example:**

```json
{
  "tool": "get_place_details",
  "args": {
    "place_name": "Central Park",
    "location": "New York, NY"
  }
}
```

#### `find_nearby`

Find businesses near specific coordinates.

**Parameters:**
| Parameter   | Type   | Required | Default     | Description                  |
|------------|--------|----------|-------------|------------------------------|
| `latitude` | number | Yes      | –           | Center latitude              |
| `longitude`| number | Yes      | –           | Center longitude             |
| `radius`   | number | No       | 1000        | Search radius in meters      |
| `type`     | string | No       | "business"  | Type of place to search      |

**Example:**

```json
{
  "tool": "find_nearby",
  "args": {
    "latitude": 40.7580,
    "longitude": -73.9855,
    "radius": 500,
    "type": "restaurant"
  }
}
```

### Apify Deployment

#### Deploy to Apify

```bash
## Login (if not already logged in)
apify login

## Push to Apify
apify push
```

The actor will be available at `https://console.apify.com/actors/reverberant_equality/mcp-google-maps`.

#### Environment Variables

| Variable | Default | Description              |
|----------|---------|--------------------------|
| `PORT`   | `3000`  | HTTP server port         |

### Architecture

- **TypeScript** – Fully typed with strict mode
- **Express** – HTTP server for MCP transport
- **MCP SDK** – Model Context Protocol implementation
- **Cheerio** – Lightweight HTML scraping (no headless browser needed)
- **Axios** – HTTP client for fetching Google Maps pages
- **Stdio Transport** – Native MCP stdio mode for AI agent integration

### Limitations

- Google Maps is heavily JavaScript-rendered; Cheerio-only scraping may not capture all results
- Results quality depends on Google's server-rendered HTML structure
- Rate limiting may apply with frequent requests
- Some fields (phone, website, hours) may not always be available

### License

MIT

# Actor input Schema

## `tool` (type: `string`):

The tool to call

## `query` (type: `string`):

Search query (for search\_places tool)

## `location` (type: `string`):

Location (for search\_places and get\_place\_details tools)

## `place_name` (type: `string`):

Name of the place (for get\_place\_details tool)

## `latitude` (type: `number`):

Latitude (for find\_nearby tool)

## `longitude` (type: `number`):

Longitude (for find\_nearby tool)

## `radius` (type: `number`):

Search radius in meters (for find\_nearby tool)

## `type` (type: `string`):

Type of place to search for (for find\_nearby tool)

## Actor input object example

```json
{
  "tool": "search_places",
  "query": "pizza",
  "radius": 1000,
  "type": "business"
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "tool": "search_places",
    "query": "pizza"
};

// Run the Actor and wait for it to finish
const run = await client.actor("reverberant_equality/mcp-google-maps").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "tool": "search_places",
    "query": "pizza",
}

# Run the Actor and wait for it to finish
run = client.actor("reverberant_equality/mcp-google-maps").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "tool": "search_places",
  "query": "pizza"
}' |
apify call reverberant_equality/mcp-google-maps --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=reverberant_equality/mcp-google-maps",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/nYaaakdVPqBanvYSO/builds/3s6bK4lJ0X4lILZ6o/openapi.json
