@cablate/mcp-google-map 0.0.65 → 0.0.68
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.codex-plugin/plugin.json +4 -4
- package/README.md +100 -331
- package/README.zh-TW.md +102 -327
- package/examples/agent-skill-demo.md +18 -5
- package/package.json +1 -1
- package/plugin.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-google-map",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "Use
|
|
3
|
+
"version": "0.0.68",
|
|
4
|
+
"description": "Use Google Maps for place research, travel planning, and local SEO through focused Skills and a standalone CLI—no MCP setup required.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CabLate",
|
|
7
7
|
"url": "https://github.com/cablate"
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"skills": "./skills/",
|
|
21
21
|
"interface": {
|
|
22
22
|
"displayName": "Google Maps CLI",
|
|
23
|
-
"shortDescription": "
|
|
24
|
-
"longDescription": "Three focused Skills guide an AI agent to use the @cablate/mcp-google-map CLI for
|
|
23
|
+
"shortDescription": "Google Maps, travel planning, and local SEO without MCP setup.",
|
|
24
|
+
"longDescription": "Three focused Skills guide an AI agent to use the @cablate/mcp-google-map standalone CLI for place research, evidence-backed travel planning, and local SEO analysis. The plugin does not start or register an MCP server.",
|
|
25
25
|
"developerName": "CabLate",
|
|
26
26
|
"category": "Productivity",
|
|
27
27
|
"capabilities": [
|
package/README.md
CHANGED
|
@@ -1,114 +1,101 @@
|
|
|
1
|
+
# Google Maps for AI agents
|
|
2
|
+
|
|
3
|
+
**Stop rebuilding place search, routing, and location workflows for every AI app.**
|
|
4
|
+
|
|
5
|
+
`@cablate/mcp-google-map` turns Google Maps Platform into 18 read-only agent tools and three focused Skills. An agent can find real places, verify routes, compare options, build practical itineraries, or audit local search visibility—through MCP or a standalone CLI.
|
|
6
|
+
|
|
7
|
+
You choose the integration model: Codex Plugin when you want Skills without MCP setup, stdio for desktop MCP clients, or Streamable HTTP for shared and remote deployments.
|
|
8
|
+
|
|
9
|
+
<p align="center"><b>English</b> · <a href="./README.zh-TW.md">繁體中文</a></p>
|
|
10
|
+
|
|
11
|
+
<p align="center"><img src="./assets/banner.webp" alt="Google Maps tools and workflows for AI agents" width="800"></p>
|
|
12
|
+
|
|
1
13
|
<p align="center">
|
|
2
14
|
<a href="https://www.npmjs.com/package/@cablate/mcp-google-map"><img src="https://img.shields.io/npm/v/@cablate/mcp-google-map" alt="npm version"></a>
|
|
3
15
|
<a href="https://www.npmjs.com/package/@cablate/mcp-google-map"><img src="https://img.shields.io/npm/dm/@cablate/mcp-google-map" alt="npm downloads"></a>
|
|
4
|
-
<a href="https://github.com/cablate/mcp-google-map/
|
|
5
|
-
<a href="./LICENSE"><img src="https://img.shields.io/github/license/cablate/mcp-google-map" alt="license"></a>
|
|
16
|
+
<a href="https://github.com/cablate/mcp-google-map/actions/workflows/ci.yml"><img src="https://github.com/cablate/mcp-google-map/actions/workflows/ci.yml/badge.svg" alt="CI status"></a>
|
|
17
|
+
<a href="./LICENSE"><img src="https://img.shields.io/github/license/cablate/mcp-google-map" alt="MIT license"></a>
|
|
6
18
|
</p>
|
|
7
19
|
|
|
8
|
-
|
|
9
|
-
<img src="./assets/banner.webp" alt="MCP Google Maps — AI-Powered Geospatial Tools" width="800">
|
|
10
|
-
</p>
|
|
20
|
+
## Why use it?
|
|
11
21
|
|
|
12
|
-
|
|
22
|
+
Giving an agent a raw Maps API is only the beginning. Useful answers often require several dependent calls: resolve a place, preserve its identity, search around it, check opening details, calculate travel time, and explain what was actually verified. This project packages that work into one consistent interface.
|
|
13
23
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
24
|
+
- **Move from lookup to outcome.** Atomic tools handle geocoding, place details, directions, weather, air quality, and maps. Composite tools explore areas, compare candidates, optimize stops, and measure local rankings.
|
|
25
|
+
- **Use the same capabilities with or without MCP.** The standalone `exec` CLI works with Agent Skills and automation; the MCP server exposes the same 18 tools over stdio or HTTP.
|
|
26
|
+
- **Give agents workflow guidance, not just function names.** Three Skills cover general map research, evidence-backed travel planning, and local SEO. Codex loads their full instructions only when a request matches.
|
|
27
|
+
- **Keep deployment and credentials under your control.** Run locally or self-host. API keys remain in your environment or request headers, with per-session isolation for HTTP deployments.
|
|
28
|
+
- **Start narrow and grow later.** Register only the tools you need with `GOOGLE_MAPS_ENABLED_TOOLS`, or use the full catalog.
|
|
17
29
|
|
|
18
|
-
<p align="center">
|
|
19
|
-
<img src="./assets/demo-grid-en.png" alt="Travel planning demo — Kyoto 2-day, Tokyo outdoor, Japan 5-day, Bangkok budget" width="800">
|
|
20
|
-
</p>
|
|
30
|
+
<p align="center"><img src="./assets/demo-grid-en.png" alt="Examples of travel planning with checked places and routes" width="800"></p>
|
|
21
31
|
|
|
22
|
-
|
|
23
|
-
- **3 modes** — stdio, StreamableHTTP, standalone exec CLI
|
|
24
|
-
- **3 Agent Skills** — focused workflows for general maps, travel planning, and local SEO ([`skills/`](./skills/))
|
|
32
|
+
## What can an agent do?
|
|
25
33
|
|
|
26
|
-
|
|
34
|
+
| Outcome | How the project helps |
|
|
35
|
+
|---|---|
|
|
36
|
+
| Find and evaluate real places | Natural-language and nearby search, place details, ratings, hours, reviews, and distance comparison |
|
|
37
|
+
| Build a trip that works geographically | Candidate discovery, along-route stops, travel-time checks, multi-stop optimization, weather, and static maps |
|
|
38
|
+
| Research a neighborhood | Multi-category exploration plus targeted distance, elevation, timezone, weather, and air-quality checks |
|
|
39
|
+
| Plan field work or deliveries | Route matrices and optimized stop ordering for up to 25 stops |
|
|
40
|
+
| Audit local search visibility | Geographic grid ranking, competitor discovery, ARP, ATRP, and SoLV metrics |
|
|
41
|
+
| Enrich location data | Single or batch geocoding, reverse geocoding, and structured JSON output |
|
|
27
42
|
|
|
28
|
-
|
|
43
|
+
These are data and planning tools, not guarantees of safety, accessibility, opening status, or ranking outcomes. Applications displaying Places reviews, photos, or AI summaries must follow the [content attribution and storage guidance](./skills/_shared/content-attribution.md).
|
|
44
|
+
|
|
45
|
+
## Choose your integration
|
|
46
|
+
|
|
47
|
+
| Use | Best for | What runs |
|
|
29
48
|
|---|---|---|
|
|
30
|
-
|
|
|
31
|
-
|
|
|
32
|
-
|
|
|
33
|
-
|
|
|
34
|
-
| Distance matrix | Yes | No |
|
|
35
|
-
| Place details | Yes | No |
|
|
36
|
-
| Timezone | Yes | No |
|
|
37
|
-
| Weather | Yes | Yes |
|
|
38
|
-
| Air quality | Yes | No |
|
|
39
|
-
| Map images | Yes | No |
|
|
40
|
-
| Composite tools (explore, plan, compare) | Yes | No |
|
|
41
|
-
| Open source | MIT | No |
|
|
42
|
-
| Self-hosted | Yes | Google-managed only |
|
|
43
|
-
| Agent Skill | Yes | No |
|
|
44
|
-
|
|
45
|
-
### Quick Start
|
|
49
|
+
| **Codex Plugin** | Asking Codex map, travel, or local SEO questions without MCP configuration | A matching Skill loads on demand and calls the standalone CLI |
|
|
50
|
+
| **Standalone CLI** | Scripts, automation, and other Skill-compatible agents | One stateless command returns JSON |
|
|
51
|
+
| **MCP stdio** | Claude Desktop, Cursor, VS Code, and other local MCP clients | The client starts a local MCP process |
|
|
52
|
+
| **Streamable HTTP** | Multi-session, containerized, LAN, or remote access | A self-hosted server exposes `/mcp` |
|
|
46
53
|
|
|
47
|
-
|
|
48
|
-
# stdio (Claude Desktop, Cursor, etc.)
|
|
49
|
-
npx @cablate/mcp-google-map --stdio
|
|
54
|
+
All options require Node.js 18+ and a Google Maps Platform API key. Live calls may be billable. Enable the APIs needed by your selected tools; common place and route workflows require **Places API (New)**, **Routes API**, and often **Geocoding API**.
|
|
50
55
|
|
|
51
|
-
|
|
52
|
-
npx @cablate/mcp-google-map exec geocode '{"address":"Tokyo Tower"}'
|
|
56
|
+
## Start with Codex—no MCP required
|
|
53
57
|
|
|
54
|
-
|
|
55
|
-
|
|
58
|
+
```bash
|
|
59
|
+
codex plugin marketplace add cablate/mcp-google-map --ref main
|
|
60
|
+
codex plugin add mcp-google-map@cablate
|
|
56
61
|
```
|
|
57
62
|
|
|
58
|
-
|
|
63
|
+
Set `GOOGLE_MAPS_API_KEY` in the environment where Codex runs, then start a new conversation. Verify the local setup without making a Google API request:
|
|
59
64
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
65
|
+
```bash
|
|
66
|
+
npx -y @cablate/mcp-google-map doctor
|
|
67
|
+
```
|
|
63
68
|
|
|
64
|
-
|
|
65
|
-
|------|-------------|
|
|
66
|
-
| `maps_search_nearby` | Find places near a location by type (restaurant, cafe, hotel, etc.). Supports filtering by radius, rating, and open status. |
|
|
67
|
-
| `maps_search_places` | Free-text place search (e.g., "sushi restaurants in Tokyo"). Supports location bias, rating, open-now filters. |
|
|
68
|
-
| `maps_place_details` | Get full details for a place by its place_id — reviews, phone, website, hours. Optional `maxPhotos` param returns photo URLs. |
|
|
69
|
-
| `maps_geocode` | Convert an address or landmark name into GPS coordinates. |
|
|
70
|
-
| `maps_reverse_geocode` | Convert GPS coordinates into a street address. |
|
|
71
|
-
| `maps_distance_matrix` | Calculate travel distances and times between multiple origins and destinations. Driving mode supports `avoid_tolls` and `avoid_highways`. |
|
|
72
|
-
| `maps_directions` | Get step-by-step navigation between two points with route details. Driving mode supports `avoid_tolls` and `avoid_highways`. |
|
|
73
|
-
| `maps_elevation` | Get elevation (meters above sea level) for geographic coordinates. |
|
|
74
|
-
| `maps_timezone` | Get timezone ID, name, UTC/DST offsets, and local time for coordinates. |
|
|
75
|
-
| `maps_weather` | Get current weather conditions or forecast — temperature, humidity, wind, UV, precipitation. |
|
|
76
|
-
| `maps_air_quality` | Get air quality index, pollutant concentrations, and health recommendations by demographic group. |
|
|
77
|
-
| `maps_static_map` | Generate a map image with markers, paths, or routes — returned inline for the user to see directly. |
|
|
78
|
-
| `maps_batch_geocode` | Geocode up to 50 addresses in one call — returns coordinates for each. |
|
|
79
|
-
| `maps_search_along_route` | Search for places along a route between two points — ranked by minimal detour time. |
|
|
80
|
-
| **Composite Tools** | |
|
|
81
|
-
| `maps_explore_area` | Explore what's around a location — searches multiple place types and gets details in one call. |
|
|
82
|
-
| `maps_plan_route` | Plan an optimized multi-stop route — uses Routes API waypoint optimization (up to 25 stops) for efficient ordering. Driving mode supports `avoid_tolls` and `avoid_highways`. |
|
|
83
|
-
| `maps_compare_places` | Compare places side-by-side — searches, gets details, and optionally calculates distances. |
|
|
84
|
-
| `maps_local_rank_tracker` | Track a business's local search ranking across a geographic grid — like LocalFalcon. Supports up to 3 keywords for batch scanning. Returns rank at each point, top-3 competitors, and metrics (ARP, ATRP, SoLV). |
|
|
69
|
+
Success means the `node`, `package`, and `api-key` checks pass and `live-api` is skipped. Use `doctor --live` only when you intend to send potentially billable checks to Geocoding, Places, and Routes.
|
|
85
70
|
|
|
86
|
-
|
|
71
|
+
Try asking:
|
|
87
72
|
|
|
88
|
-
>
|
|
73
|
+
> Plan a practical two-day Kyoto itinerary. Group nearby places, check travel times, and explain any opening-hour assumptions.
|
|
89
74
|
|
|
90
|
-
|
|
75
|
+
Codex selects `google-maps` for general location research, `google-maps-travel-planning` for itineraries, or `google-maps-local-seo` for business visibility analysis. The plugin does not register or start an MCP server. See the [no-MCP walkthrough](./examples/agent-skill-demo.md) for a reproducible example.
|
|
91
76
|
|
|
92
|
-
|
|
77
|
+
## Use the standalone CLI
|
|
93
78
|
|
|
94
|
-
|
|
79
|
+
Every MCP tool also has a short CLI name:
|
|
95
80
|
|
|
96
81
|
```bash
|
|
97
|
-
|
|
98
|
-
|
|
82
|
+
npx -y @cablate/mcp-google-map exec geocode '{"address":"Tokyo Tower"}'
|
|
83
|
+
npx -y @cablate/mcp-google-map exec search-places '{"query":"quiet cafes in Kyoto"}'
|
|
84
|
+
npx -y @cablate/mcp-google-map exec directions '{"origin":"Tokyo Station","destination":"Tokyo Skytree","mode":"transit"}'
|
|
99
85
|
```
|
|
100
86
|
|
|
101
|
-
|
|
87
|
+
Each call is stateless. Successful calls return `{ "success": true, "data": ... }` on stdout; failures exit nonzero and write structured JSON to stderr.
|
|
102
88
|
|
|
103
|
-
|
|
89
|
+
For bulk address enrichment:
|
|
104
90
|
|
|
105
|
-
|
|
106
|
-
-
|
|
107
|
-
|
|
91
|
+
```bash
|
|
92
|
+
npx @cablate/mcp-google-map batch-geocode -i addresses.txt -o results.json
|
|
93
|
+
cat addresses.txt | npx @cablate/mcp-google-map batch-geocode -i -
|
|
94
|
+
```
|
|
108
95
|
|
|
109
|
-
|
|
96
|
+
## Connect an MCP client
|
|
110
97
|
|
|
111
|
-
|
|
98
|
+
### stdio
|
|
112
99
|
|
|
113
100
|
```json
|
|
114
101
|
{
|
|
@@ -116,301 +103,83 @@ Works with Claude Desktop, Cursor, VS Code, and any MCP client that supports std
|
|
|
116
103
|
"google-maps": {
|
|
117
104
|
"command": "npx",
|
|
118
105
|
"args": ["-y", "@cablate/mcp-google-map", "--stdio"],
|
|
119
|
-
"env": {
|
|
120
|
-
"GOOGLE_MAPS_API_KEY": "YOUR_API_KEY"
|
|
121
|
-
}
|
|
106
|
+
"env": { "GOOGLE_MAPS_API_KEY": "YOUR_API_KEY" }
|
|
122
107
|
}
|
|
123
108
|
}
|
|
124
109
|
}
|
|
125
110
|
```
|
|
126
111
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
```json
|
|
130
|
-
{
|
|
131
|
-
"env": {
|
|
132
|
-
"GOOGLE_MAPS_API_KEY": "YOUR_API_KEY",
|
|
133
|
-
"GOOGLE_MAPS_ENABLED_TOOLS": "maps_geocode,maps_directions,maps_search_places"
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
Omit or set to `*` for all 18 tools (default).
|
|
112
|
+
To reduce tool-list context, add a comma-separated allowlist such as `"GOOGLE_MAPS_ENABLED_TOOLS": "maps_geocode,maps_directions,maps_search_places"`. Omit it or use `*` to expose all tools.
|
|
139
113
|
|
|
140
|
-
###
|
|
141
|
-
|
|
142
|
-
For multi-session deployments, per-request API key isolation, or remote access:
|
|
114
|
+
### Streamable HTTP
|
|
143
115
|
|
|
144
116
|
```bash
|
|
145
|
-
npx @cablate/mcp-google-map --port 3000 --apikey "YOUR_API_KEY"
|
|
146
|
-
|
|
147
|
-
# Bind to all interfaces for remote access (e.g. Docker, LAN)
|
|
148
|
-
npx @cablate/mcp-google-map --host 0.0.0.0 --port 3000 --apikey "YOUR_API_KEY"
|
|
117
|
+
npx @cablate/mcp-google-map --host 127.0.0.1 --port 3000 --apikey "YOUR_API_KEY"
|
|
149
118
|
```
|
|
150
119
|
|
|
151
|
-
Then configure your MCP client:
|
|
152
|
-
|
|
153
120
|
```json
|
|
154
121
|
{
|
|
155
122
|
"mcpServers": {
|
|
156
123
|
"google-maps": {
|
|
157
124
|
"type": "http",
|
|
158
|
-
"url": "http://
|
|
125
|
+
"url": "http://127.0.0.1:3000/mcp"
|
|
159
126
|
}
|
|
160
127
|
}
|
|
161
128
|
}
|
|
162
129
|
```
|
|
163
130
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
- **Transport**: stdio (`--stdio`) or Streamable HTTP (default)
|
|
167
|
-
- **Tools**: 18 Google Maps tools (14 atomic + 4 composite) — filterable via `GOOGLE_MAPS_ENABLED_TOOLS`
|
|
168
|
-
|
|
169
|
-
### CLI Exec Mode (Agent Skill)
|
|
170
|
-
|
|
171
|
-
Use tools directly without running the MCP server:
|
|
172
|
-
|
|
173
|
-
```bash
|
|
174
|
-
npx @cablate/mcp-google-map exec geocode '{"address":"Tokyo Tower"}'
|
|
175
|
-
npx @cablate/mcp-google-map exec search-places '{"query":"ramen in Tokyo"}'
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
All 18 tools available: `geocode`, `reverse-geocode`, `search-nearby`, `search-places`, `place-details`, `directions`, `distance-matrix`, `elevation`, `timezone`, `weather`, `air-quality`, `static-map`, `batch-geocode-tool`, `search-along-route`, `explore-area`, `plan-route`, `compare-places`, `local-rank-tracker`. See [`skills/`](./skills/) for the Skill definitions and full parameter docs.
|
|
179
|
-
|
|
180
|
-
To use the **Agent Skill without MCP**:
|
|
131
|
+
Bind to `0.0.0.0` only when the server must accept external connections. For multi-tenant deployments, prefer the `X-Google-Maps-API-Key` request header so keys remain isolated by session.
|
|
181
132
|
|
|
182
|
-
|
|
183
|
-
2. Make Node.js 18+ and `npx` available to the agent, and set `GOOGLE_MAPS_API_KEY` in its environment. Prefer the environment variable to `--apikey`, which can expose a key in shell history or process listings.
|
|
184
|
-
3. Ask the agent a location question. The Skill guides it to call the standalone CLI, for example `npx -y @cablate/mcp-google-map exec geocode '{"address":"Tokyo Tower"}'`. No MCP server or MCP client configuration is needed.
|
|
133
|
+
## Tool catalog
|
|
185
134
|
|
|
186
|
-
|
|
135
|
+
| Group | Tools |
|
|
136
|
+
|---|---|
|
|
137
|
+
| Places and discovery | `maps_search_places`, `maps_search_nearby`, `maps_place_details`, `maps_explore_area`, `maps_compare_places`, `maps_search_along_route` |
|
|
138
|
+
| Location and routing | `maps_geocode`, `maps_reverse_geocode`, `maps_directions`, `maps_distance_matrix`, `maps_plan_route`, `maps_batch_geocode` |
|
|
139
|
+
| Context and visualization | `maps_elevation`, `maps_timezone`, `maps_weather`, `maps_air_quality`, `maps_static_map` |
|
|
140
|
+
| Local SEO | `maps_local_rank_tracker` |
|
|
187
141
|
|
|
188
|
-
|
|
142
|
+
All 18 tools declare `readOnlyHint: true` and `destructiveHint: false`. Exact parameters, response shapes, and workflow recipes live in the [tool reference](./skills/google-maps/references/tools-api.md).
|
|
189
143
|
|
|
190
|
-
|
|
144
|
+
## API key and Google Cloud setup
|
|
191
145
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
```bash
|
|
195
|
-
npx @cablate/mcp-google-map batch-geocode -i addresses.txt -o results.json
|
|
196
|
-
cat addresses.txt | npx @cablate/mcp-google-map batch-geocode -i -
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
Input: one address per line. Output: JSON with `{ total, succeeded, failed, results[] }`. Default concurrency: 20 parallel requests.
|
|
146
|
+
The key must belong to a Google Cloud project with billing enabled and restrictions compatible with the runtime. The [setup and diagnostics guide](./skills/_shared/setup-and-diagnostics.md) maps each capability to its required API and explains common failures.
|
|
200
147
|
|
|
148
|
+
Credential priority is:
|
|
201
149
|
|
|
150
|
+
1. `X-Google-Maps-API-Key` HTTP request header
|
|
151
|
+
2. `--apikey` command-line option
|
|
152
|
+
3. `GOOGLE_MAPS_API_KEY` environment variable
|
|
202
153
|
|
|
203
|
-
|
|
154
|
+
Prefer environment variables or request headers. Command-line secrets can appear in shell history and process listings.
|
|
204
155
|
|
|
205
|
-
|
|
156
|
+
## Trust and limits
|
|
206
157
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
"transport": "streamableHttp",
|
|
213
|
-
"url": "http://localhost:3000/mcp",
|
|
214
|
-
"headers": {
|
|
215
|
-
"X-Google-Maps-API-Key": "YOUR_API_KEY"
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
2. **Command Line**
|
|
222
|
-
|
|
223
|
-
```bash
|
|
224
|
-
mcp-google-map --apikey YOUR_API_KEY
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
3. **Environment Variable** (.env file or command line)
|
|
228
|
-
```env
|
|
229
|
-
GOOGLE_MAPS_API_KEY=your_api_key_here
|
|
230
|
-
MCP_SERVER_PORT=3000
|
|
231
|
-
MCP_SERVER_HOST=0.0.0.0
|
|
232
|
-
```
|
|
158
|
+
- Place and route facts come from the Google Maps Platform APIs enabled for your project; weather availability has regional limitations.
|
|
159
|
+
- A successful API response does not prove accessibility, safety, legal suitability, or real-time availability.
|
|
160
|
+
- The package preserves source and disclosure metadata where returned, but your interface remains responsible for compliant attribution and storage.
|
|
161
|
+
- HTTP mode supports per-session API-key isolation and DNS rebinding protection.
|
|
162
|
+
- This project is MIT licensed and self-hostable. See [SECURITY.md](./SECURITY.md) for vulnerability reporting and [Security Assessment Clarifications](./SECURITY_ASSESSMENT.md) for the review checklist.
|
|
233
163
|
|
|
234
164
|
## Development
|
|
235
165
|
|
|
236
|
-
### Local Development
|
|
237
|
-
|
|
238
166
|
```bash
|
|
239
|
-
# Clone the repository
|
|
240
167
|
git clone https://github.com/cablate/mcp-google-map.git
|
|
241
168
|
cd mcp-google-map
|
|
242
|
-
|
|
243
|
-
# Install dependencies
|
|
244
|
-
npm install
|
|
245
|
-
|
|
246
|
-
# Set up environment variables
|
|
247
|
-
cp .env.example .env
|
|
248
|
-
# Edit .env with your API key
|
|
249
|
-
|
|
250
|
-
# Build the project
|
|
169
|
+
npm ci
|
|
251
170
|
npm run build
|
|
252
|
-
|
|
253
|
-
# Start the server
|
|
254
|
-
npm start
|
|
255
|
-
|
|
256
|
-
# Or run in development mode
|
|
257
|
-
npm run dev
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
### Testing
|
|
261
|
-
|
|
262
|
-
```bash
|
|
263
|
-
# Run smoke tests (no API key required for basic tests)
|
|
171
|
+
npm run test:unit
|
|
264
172
|
npm test
|
|
265
|
-
|
|
266
|
-
# Run full E2E tests (requires GOOGLE_MAPS_API_KEY)
|
|
267
|
-
npm run test:e2e
|
|
268
173
|
```
|
|
269
174
|
|
|
270
|
-
|
|
175
|
+
Live E2E calls require `GOOGLE_MAPS_API_KEY` and may be billable: `npm run test:e2e`.
|
|
271
176
|
|
|
272
|
-
|
|
273
|
-
src/
|
|
274
|
-
├── cli.ts # CLI entry point
|
|
275
|
-
├── config.ts # Tool registration and server config
|
|
276
|
-
├── index.ts # Package exports
|
|
277
|
-
├── core/
|
|
278
|
-
│ └── BaseMcpServer.ts # MCP server with streamable HTTP transport
|
|
279
|
-
├── services/
|
|
280
|
-
│ ├── NewPlacesService.ts # Google Places API (New) client
|
|
281
|
-
│ ├── PlacesSearcher.ts # Service facade layer
|
|
282
|
-
│ ├── RoutesService.ts # Google Routes API client (directions, distance matrix, waypoint optimization)
|
|
283
|
-
│ └── toolclass.ts # Google Maps API client (geocoding, timezone, elevation, static map)
|
|
284
|
-
├── tools/
|
|
285
|
-
│ └── maps/
|
|
286
|
-
│ ├── searchNearby.ts # maps_search_nearby tool
|
|
287
|
-
│ ├── searchPlaces.ts # maps_search_places tool
|
|
288
|
-
│ ├── placeDetails.ts # maps_place_details tool
|
|
289
|
-
│ ├── geocode.ts # maps_geocode tool
|
|
290
|
-
│ ├── reverseGeocode.ts # maps_reverse_geocode tool
|
|
291
|
-
│ ├── distanceMatrix.ts # maps_distance_matrix tool
|
|
292
|
-
│ ├── directions.ts # maps_directions tool
|
|
293
|
-
│ ├── elevation.ts # maps_elevation tool
|
|
294
|
-
│ ├── timezone.ts # maps_timezone tool
|
|
295
|
-
│ ├── weather.ts # maps_weather tool
|
|
296
|
-
│ ├── airQuality.ts # maps_air_quality tool
|
|
297
|
-
│ ├── staticMap.ts # maps_static_map tool
|
|
298
|
-
│ ├── batchGeocode.ts # maps_batch_geocode tool
|
|
299
|
-
│ ├── searchAlongRoute.ts # maps_search_along_route tool
|
|
300
|
-
│ ├── exploreArea.ts # maps_explore_area (composite)
|
|
301
|
-
│ ├── planRoute.ts # maps_plan_route (composite)
|
|
302
|
-
│ ├── comparePlaces.ts # maps_compare_places (composite)
|
|
303
|
-
│ └── localRankTracker.ts # maps_local_rank_tracker (composite)
|
|
304
|
-
└── utils/
|
|
305
|
-
├── apiKeyManager.ts # API key management
|
|
306
|
-
└── requestContext.ts # Per-request context (API key isolation)
|
|
307
|
-
tests/
|
|
308
|
-
└── smoke.test.ts # Smoke + E2E test suite
|
|
309
|
-
skills/
|
|
310
|
-
├── google-maps/ # General place, route, and environment workflow
|
|
311
|
-
│ ├── SKILL.md
|
|
312
|
-
│ └── references/tools-api.md # Tool parameters + generic recipes
|
|
313
|
-
├── google-maps-travel-planning/ # Day-trip and itinerary workflow
|
|
314
|
-
│ ├── SKILL.md
|
|
315
|
-
│ └── references/travel-planning.md
|
|
316
|
-
├── google-maps-local-seo/ # Business visibility and grid-rank workflow
|
|
317
|
-
│ ├── SKILL.md
|
|
318
|
-
│ └── references/local-seo.md
|
|
319
|
-
└── _shared/ # On-demand resources used by all three Skills
|
|
320
|
-
├── setup-and-diagnostics.md
|
|
321
|
-
└── content-attribution.md
|
|
322
|
-
.agents/
|
|
323
|
-
├── plugins/marketplace.json # CabLate marketplace catalog
|
|
324
|
-
└── skills/project-docs/ # Maintainer-only development Skill
|
|
325
|
-
.codex-plugin/plugin.json # Codex compatibility manifest
|
|
326
|
-
plugin.json # Portable Agent Plugin manifest
|
|
327
|
-
```
|
|
177
|
+
Contributions are welcome. Read [CONTRIBUTING.md](./CONTRIBUTING.md) before opening a pull request. Release history is in [CHANGELOG.md](./CHANGELOG.md).
|
|
328
178
|
|
|
329
|
-
##
|
|
179
|
+
## Acknowledgements
|
|
330
180
|
|
|
331
|
-
|
|
332
|
-
- **Node.js** - Runtime environment
|
|
333
|
-
- **@googlemaps/places** - Google Places API (New) for place search and details
|
|
334
|
-
- **Google Routes API** - Directions, distance matrix, and waypoint optimization via REST
|
|
335
|
-
- **@googlemaps/google-maps-services-js** - Geocoding, timezone, elevation
|
|
336
|
-
- **@modelcontextprotocol/sdk** - MCP protocol implementation (v1.27+)
|
|
337
|
-
- **Express.js** - HTTP server framework
|
|
338
|
-
- **Zod** - Schema validation
|
|
339
|
-
|
|
340
|
-
## Security
|
|
341
|
-
|
|
342
|
-
- API keys are handled server-side
|
|
343
|
-
- Per-session API key isolation for multi-tenant deployments
|
|
344
|
-
- DNS rebinding protection available for production
|
|
345
|
-
- Input validation using Zod schemas
|
|
346
|
-
|
|
347
|
-
For enterprise security reviews, see [Security Assessment Clarifications](./SECURITY_ASSESSMENT.md) — a 23-item checklist covering licensing, data protection, credential management, tool contamination, and AI agent execution environment verification.
|
|
348
|
-
|
|
349
|
-
To report a vulnerability, see [SECURITY.md](SECURITY.md).
|
|
350
|
-
|
|
351
|
-
## Roadmap
|
|
352
|
-
|
|
353
|
-
### Recent Additions
|
|
354
|
-
|
|
355
|
-
| Tool / Feature | What it unlocks | Status |
|
|
356
|
-
|------|----------------|--------|
|
|
357
|
-
| `maps_static_map` | Map images with pins/routes — multimodal AI can "see" the map | **Done** |
|
|
358
|
-
| `maps_air_quality` | AQI, pollutants — health-aware travel, outdoor planning | **Done** |
|
|
359
|
-
| `maps_batch_geocode` | Geocode up to 50 addresses in one call — data enrichment | **Done** |
|
|
360
|
-
| `maps_search_along_route` | Find places along a route ranked by detour time — trip planning | **Done** |
|
|
361
|
-
| `maps_explore_area` | One-call neighborhood overview (composite) | **Done** |
|
|
362
|
-
| `maps_plan_route` | Optimized multi-stop itinerary (composite) | **Done** |
|
|
363
|
-
| `maps_compare_places` | Side-by-side place comparison (composite) | **Done** |
|
|
364
|
-
| `maps_local_rank_tracker` | Geographic grid rank tracking — local SEO analysis (composite) | **Done** |
|
|
365
|
-
| `GOOGLE_MAPS_ENABLED_TOOLS` | Filter tools to reduce context usage | **Done** |
|
|
366
|
-
|
|
367
|
-
### Planned
|
|
368
|
-
|
|
369
|
-
| Feature | What it unlocks | Status |
|
|
370
|
-
|---------|----------------|--------|
|
|
371
|
-
| `maps_place_photo` | Place photos for multimodal AI — "see" the restaurant ambiance | Planned |
|
|
372
|
-
| Language parameter | Multi-language responses (ISO 639-1) across all tools | Planned |
|
|
373
|
-
| MCP Prompt Templates | `/travel-planner`, `/neighborhood-scout` slash commands in Claude Desktop | Planned |
|
|
374
|
-
| Geo-Reasoning Benchmark | 10-scenario test suite measuring LLM geospatial reasoning accuracy | Research |
|
|
375
|
-
|
|
376
|
-
### Use Cases We're Building Toward
|
|
377
|
-
|
|
378
|
-
These are the real-world scenarios driving our tool decisions:
|
|
379
|
-
|
|
380
|
-
- **Travel planning** — "Plan a day trip in Tokyo" (geocode → search → directions → weather)
|
|
381
|
-
- **Real estate analysis** — "Analyze this neighborhood: schools, commute, flood risk" (search-nearby × N + elevation + distance-matrix)
|
|
382
|
-
- **Logistics optimization** — "Route these 12 deliveries efficiently from the warehouse" (plan-route)
|
|
383
|
-
- **Field sales** — "Visit 6 clients in Chicago, minimize drive time, find lunch spots" (plan-route + search-nearby)
|
|
384
|
-
- **Disaster response** — "Nearest open hospitals? Am I in a flood zone?" (search-nearby + elevation)
|
|
385
|
-
- **Content creation** — "Top 5 neighborhoods in Austin with restaurant density and airport distance" (explore-area + distance-matrix)
|
|
386
|
-
- **Accessibility** — "Wheelchair-accessible restaurants, avoid steep routes" (search-nearby + place-details + elevation)
|
|
387
|
-
- **Local SEO** — "Audit my restaurant's ranking vs competitors within 1km" (search-places + compare-places + explore-area)
|
|
388
|
-
|
|
389
|
-
## Changelog
|
|
390
|
-
|
|
391
|
-
See [CHANGELOG.md](./CHANGELOG.md) for version history.
|
|
181
|
+
Thanks to [@junyinnnn](https://github.com/junyinnnn) for helping add Streamable HTTP support.
|
|
392
182
|
|
|
393
183
|
## License
|
|
394
184
|
|
|
395
|
-
MIT
|
|
396
|
-
|
|
397
|
-
## Contributing
|
|
398
|
-
|
|
399
|
-
Community participation and contributions are welcome! Please read [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, coding guidelines, and the pull request process.
|
|
400
|
-
|
|
401
|
-
- Submit Issues: Report bugs or provide suggestions
|
|
402
|
-
- Create Pull Requests: Submit code improvements
|
|
403
|
-
- Documentation: Help improve documentation
|
|
404
|
-
|
|
405
|
-
## Contact
|
|
406
|
-
|
|
407
|
-
- Email: [reahtuoo310109@gmail.com](mailto:reahtuoo310109@gmail.com)
|
|
408
|
-
- GitHub: [CabLate](https://github.com/cablate/)
|
|
409
|
-
|
|
410
|
-
## Star History
|
|
411
|
-
|
|
412
|
-
<a href="https://glama.ai/mcp/servers/@cablate/mcp-google-map">
|
|
413
|
-
<img width="380" height="200" src="https://glama.ai/mcp/servers/@cablate/mcp-google-map/badge" alt="Google Map Server MCP server" />
|
|
414
|
-
</a>
|
|
415
|
-
|
|
416
|
-
[](https://star-history.dera.page/#cablate/mcp-google-map&Date)
|
|
185
|
+
[MIT](./LICENSE)
|
package/README.zh-TW.md
CHANGED
|
@@ -1,114 +1,101 @@
|
|
|
1
|
-
|
|
2
|
-
<a href="https://www.npmjs.com/package/@cablate/mcp-google-map"><img src="https://img.shields.io/npm/v/@cablate/mcp-google-map" alt="npm version"></a>
|
|
3
|
-
<a href="https://www.npmjs.com/package/@cablate/mcp-google-map"><img src="https://img.shields.io/npm/dm/@cablate/mcp-google-map" alt="npm downloads"></a>
|
|
4
|
-
<a href="https://github.com/cablate/mcp-google-map/stargazers"><img src="https://img.shields.io/github/stars/cablate/mcp-google-map?style=social" alt="GitHub stars"></a>
|
|
5
|
-
<a href="./LICENSE"><img src="https://img.shields.io/github/license/cablate/mcp-google-map" alt="license"></a>
|
|
6
|
-
</p>
|
|
1
|
+
# 給 AI 代理使用的 Google Maps
|
|
7
2
|
|
|
8
|
-
|
|
9
|
-
<img src="./assets/banner.webp" alt="MCP Google Maps — AI 驅動的地理空間工具" width="800">
|
|
10
|
-
</p>
|
|
3
|
+
**不用再為每一個 AI 應用重做地點搜尋、路線與位置工作流程。**
|
|
11
4
|
|
|
12
|
-
|
|
5
|
+
`@cablate/mcp-google-map` 將 Google Maps Platform 整理成 18 個唯讀代理工具與三個用途明確的 Skills。代理可以搜尋真實地點、驗證路線、比較選項、建立可執行的旅行計畫,或分析在地搜尋能見度;既可透過 MCP,也可直接使用獨立 CLI。
|
|
13
6
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
</p>
|
|
7
|
+
整合方式由你決定:不想設定 MCP 時安裝 Codex Plugin;桌面 MCP client 使用 stdio;共享或遠端部署則使用 Streamable HTTP。
|
|
8
|
+
|
|
9
|
+
<p align="center"><a href="./README.md">English</a> · <b>繁體中文</b></p>
|
|
10
|
+
|
|
11
|
+
<p align="center"><img src="./assets/banner.webp" alt="提供給 AI 代理的 Google Maps 工具與工作流程" width="800"></p>
|
|
17
12
|
|
|
18
13
|
<p align="center">
|
|
19
|
-
<img src="
|
|
14
|
+
<a href="https://www.npmjs.com/package/@cablate/mcp-google-map"><img src="https://img.shields.io/npm/v/@cablate/mcp-google-map" alt="npm 版本"></a>
|
|
15
|
+
<a href="https://www.npmjs.com/package/@cablate/mcp-google-map"><img src="https://img.shields.io/npm/dm/@cablate/mcp-google-map" alt="npm 下載數"></a>
|
|
16
|
+
<a href="https://github.com/cablate/mcp-google-map/actions/workflows/ci.yml"><img src="https://github.com/cablate/mcp-google-map/actions/workflows/ci.yml/badge.svg" alt="CI 狀態"></a>
|
|
17
|
+
<a href="./LICENSE"><img src="https://img.shields.io/github/license/cablate/mcp-google-map" alt="MIT 授權"></a>
|
|
20
18
|
</p>
|
|
21
19
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
## 為什麼要用?
|
|
21
|
+
|
|
22
|
+
把原始 Maps API 交給代理只是第一步。真正有用的答案通常依賴一連串呼叫:確認地點、保留同一個地點的識別資訊、搜尋周邊、檢查營業資料、計算旅行時間,再清楚說明哪些內容真的驗證過。本專案把這些工作整理成一致的介面。
|
|
23
|
+
|
|
24
|
+
- **從單次查詢走到可用成果。** 原子工具處理地址解析、地點詳情、導航、天氣、空氣品質與地圖;組合工具可探索區域、比較候選地點、最佳化停靠順序與分析在地排名。
|
|
25
|
+
- **同一套能力可用或不用 MCP。** 獨立 `exec` CLI 適合 Agent Skills 與自動化;MCP server 則透過 stdio 或 HTTP 暴露相同的 18 個工具。
|
|
26
|
+
- **不只提供函式名稱,也提供代理工作方法。** 三個 Skills 分別處理一般地圖研究、具證據的旅行規劃與 Local SEO。Codex 只有在請求符合時才載入完整指令。
|
|
27
|
+
- **部署方式與憑證仍由你控制。** 可在本機執行或自行架設;API key 保留在環境變數或 request header,HTTP 部署亦支援每個 session 隔離。
|
|
28
|
+
- **可以先小規模導入。** 透過 `GOOGLE_MAPS_ENABLED_TOOLS` 只註冊需要的工具,也可直接使用完整工具集。
|
|
29
|
+
|
|
30
|
+
<p align="center"><img src="./assets/demo-grid-zh.png" alt="使用已檢查地點與路線進行旅行規劃的範例" width="800"></p>
|
|
31
|
+
|
|
32
|
+
## 代理能完成什麼?
|
|
25
33
|
|
|
26
|
-
|
|
34
|
+
| 成果 | 本專案提供的能力 |
|
|
35
|
+
|---|---|
|
|
36
|
+
| 搜尋並評估真實地點 | 自然語言與附近搜尋、地點詳情、評分、營業時間、評論與距離比較 |
|
|
37
|
+
| 建立地理上可執行的行程 | 候選地點探索、沿途停靠點、旅行時間檢查、多站最佳化、天氣與靜態地圖 |
|
|
38
|
+
| 研究一個區域 | 多類別區域探索,加上距離、海拔、時區、天氣與空氣品質查詢 |
|
|
39
|
+
| 規劃外勤或配送 | 路線矩陣,以及最多 25 個停靠點的順序最佳化 |
|
|
40
|
+
| 分析在地搜尋能見度 | 地理網格排名、競爭者探索、ARP、ATRP 與 SoLV 指標 |
|
|
41
|
+
| 補全位置資料 | 單筆或批次地址解析、反向地址解析與結構化 JSON 輸出 |
|
|
27
42
|
|
|
28
|
-
|
|
43
|
+
這些是資料與規劃工具,不保證安全、無障礙、即時營業狀態或排名成果。應用程式若顯示 Places 評論、照片或 AI 摘要,必須遵守[內容署名與保存指引](./skills/_shared/content-attribution.md)。
|
|
44
|
+
|
|
45
|
+
## 選擇整合方式
|
|
46
|
+
|
|
47
|
+
| 使用方式 | 適合情境 | 實際執行內容 |
|
|
29
48
|
|---|---|---|
|
|
30
|
-
|
|
|
31
|
-
|
|
|
32
|
-
|
|
|
33
|
-
|
|
|
34
|
-
| 距離矩陣 | 有 | 無 |
|
|
35
|
-
| 地點詳情 | 有 | 無 |
|
|
36
|
-
| 時區查詢 | 有 | 無 |
|
|
37
|
-
| 天氣查詢 | 有 | 有 |
|
|
38
|
-
| 空氣品質 | 有 | 無 |
|
|
39
|
-
| 地圖圖片 | 有 | 無 |
|
|
40
|
-
| 組合工具(探索、規劃、比較) | 有 | 無 |
|
|
41
|
-
| 開源 | MIT | 否 |
|
|
42
|
-
| 自架部署 | 有 | 僅 Google 託管 |
|
|
43
|
-
| Agent Skill | 有 | 無 |
|
|
44
|
-
|
|
45
|
-
### 快速開始
|
|
49
|
+
| **Codex Plugin** | 不設定 MCP,直接讓 Codex 回答地圖、旅行或 Local SEO 問題 | 符合請求的 Skill 按需載入並呼叫獨立 CLI |
|
|
50
|
+
| **獨立 CLI** | 腳本、自動化與其他支援 Skill 的代理 | 單次無狀態命令回傳 JSON |
|
|
51
|
+
| **MCP stdio** | Claude Desktop、Cursor、VS Code 與其他本機 MCP clients | Client 啟動本機 MCP 程序 |
|
|
52
|
+
| **Streamable HTTP** | 多 session、容器、區域網路或遠端存取 | 自架 server 暴露 `/mcp` |
|
|
46
53
|
|
|
47
|
-
|
|
48
|
-
# stdio(Claude Desktop、Cursor 等)
|
|
49
|
-
npx @cablate/mcp-google-map --stdio
|
|
54
|
+
所有方式都需要 Node.js 18+ 與 Google Maps Platform API key,實際 API 呼叫可能產生費用。請啟用所選工具需要的 API;常見地點與路線流程會使用 **Places API (New)**、**Routes API**,通常也需要 **Geocoding API**。
|
|
50
55
|
|
|
51
|
-
|
|
52
|
-
npx @cablate/mcp-google-map exec geocode '{"address":"台北101"}'
|
|
56
|
+
## 從 Codex 開始,不需要 MCP
|
|
53
57
|
|
|
54
|
-
|
|
55
|
-
|
|
58
|
+
```bash
|
|
59
|
+
codex plugin marketplace add cablate/mcp-google-map --ref main
|
|
60
|
+
codex plugin add mcp-google-map@cablate
|
|
56
61
|
```
|
|
57
62
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
感謝 [@junyinnnn](https://github.com/junyinnnn) 協助實作 `streamablehttp` 支援。
|
|
63
|
+
在 Codex 的執行環境設定 `GOOGLE_MAPS_API_KEY`,再開啟新對話。先檢查本機環境,不會送出 Google API 請求:
|
|
61
64
|
|
|
62
|
-
|
|
65
|
+
```bash
|
|
66
|
+
npx -y @cablate/mcp-google-map doctor
|
|
67
|
+
```
|
|
63
68
|
|
|
64
|
-
|
|
65
|
-
|------|------|
|
|
66
|
-
| `maps_search_nearby` | 依類型搜尋附近地點(餐廳、咖啡廳、飯店等),支援半徑、評分、營業中篩選 |
|
|
67
|
-
| `maps_search_places` | 自然語言地點搜尋(如「東京拉麵」),支援位置偏好、評分、營業中篩選 |
|
|
68
|
-
| `maps_place_details` | 以 place_id 取得地點完整資訊 — 評論、電話、網站、營業時間。可選 `maxPhotos` 參數取得照片 URL。 |
|
|
69
|
-
| `maps_geocode` | 將地址或地標名稱轉換為 GPS 座標 |
|
|
70
|
-
| `maps_reverse_geocode` | 將 GPS 座標轉換為街道地址 |
|
|
71
|
-
| `maps_distance_matrix` | 計算多個起點與終點間的旅行距離和時間 |
|
|
72
|
-
| `maps_directions` | 取得兩點間的逐步導航路線 |
|
|
73
|
-
| `maps_elevation` | 查詢地理座標的海拔高度(公尺) |
|
|
74
|
-
| `maps_timezone` | 查詢座標的時區 ID、名稱、UTC/DST 偏移量和當地時間 |
|
|
75
|
-
| `maps_weather` | 查詢當前天氣或預報 — 溫度、濕度、風速、紫外線、降水 |
|
|
76
|
-
| `maps_air_quality` | 查詢空氣品質指數、污染物濃度,以及各族群健康建議 |
|
|
77
|
-
| `maps_static_map` | 產生帶標記、路徑或路線的地圖圖片 — 直接內嵌在對話中 |
|
|
78
|
-
| `maps_batch_geocode` | 一次地理編碼最多 50 個地址 |
|
|
79
|
-
| `maps_search_along_route` | 搜尋兩點間路線沿途的地點 — 依最小繞路時間排序 |
|
|
80
|
-
| **組合工具** | |
|
|
81
|
-
| `maps_explore_area` | 一次呼叫探索某地周邊 — 搜尋多種地點類型並取得詳情 |
|
|
82
|
-
| `maps_plan_route` | 規劃最佳化多站路線 — 地理編碼、最佳順序、回傳導航 |
|
|
83
|
-
| `maps_compare_places` | 並排比較地點 — 搜尋、取得詳情,可選計算距離 |
|
|
84
|
-
| `maps_local_rank_tracker` | 地理網格排名追蹤(類似 LocalFalcon)— 支援最多 3 個關鍵字批量掃描,回傳 ARP、ATRP、SoLV 指標 |
|
|
69
|
+
成功時,`node`、`package` 與 `api-key` 檢查會通過,`live-api` 會略過。只有在你確定要送出可能計費的 Geocoding、Places 與 Routes 測試時,才使用 `doctor --live`。
|
|
85
70
|
|
|
86
|
-
|
|
71
|
+
可以直接問:
|
|
87
72
|
|
|
88
|
-
>
|
|
73
|
+
> 規劃一個實際可行的京都兩日行程。把鄰近地點排在一起、檢查交通時間,並說明營業時間有哪些假設。
|
|
89
74
|
|
|
90
|
-
|
|
75
|
+
Codex 會依請求選擇一般地圖研究、旅行規劃或 Local SEO Skill。Plugin 不會註冊或啟動 MCP server。可參考[非 MCP 完整示範](./examples/agent-skill-demo.md)重現整個流程。
|
|
91
76
|
|
|
92
|
-
|
|
77
|
+
## 使用獨立 CLI
|
|
93
78
|
|
|
94
|
-
|
|
79
|
+
每一個 MCP 工具都有簡短的 CLI 名稱:
|
|
95
80
|
|
|
96
81
|
```bash
|
|
97
|
-
|
|
98
|
-
|
|
82
|
+
npx -y @cablate/mcp-google-map exec geocode '{"address":"台北101"}'
|
|
83
|
+
npx -y @cablate/mcp-google-map exec search-places '{"query":"京都安靜的咖啡廳"}'
|
|
84
|
+
npx -y @cablate/mcp-google-map exec directions '{"origin":"台北車站","destination":"台北101","mode":"transit"}'
|
|
99
85
|
```
|
|
100
86
|
|
|
101
|
-
|
|
87
|
+
每次呼叫皆為無狀態。成功時在 stdout 回傳 `{ "success": true, "data": ... }`;失敗時以非零狀態結束,並在 stderr 輸出結構化 JSON。
|
|
102
88
|
|
|
103
|
-
|
|
89
|
+
批次補全地址可使用:
|
|
104
90
|
|
|
105
|
-
|
|
106
|
-
-
|
|
107
|
-
-
|
|
91
|
+
```bash
|
|
92
|
+
npx @cablate/mcp-google-map batch-geocode -i addresses.txt -o results.json
|
|
93
|
+
cat addresses.txt | npx @cablate/mcp-google-map batch-geocode -i -
|
|
94
|
+
```
|
|
108
95
|
|
|
109
|
-
|
|
96
|
+
## 連接 MCP client
|
|
110
97
|
|
|
111
|
-
|
|
98
|
+
### stdio
|
|
112
99
|
|
|
113
100
|
```json
|
|
114
101
|
{
|
|
@@ -116,295 +103,83 @@ codex plugin add mcp-google-map@cablate
|
|
|
116
103
|
"google-maps": {
|
|
117
104
|
"command": "npx",
|
|
118
105
|
"args": ["-y", "@cablate/mcp-google-map", "--stdio"],
|
|
119
|
-
"env": {
|
|
120
|
-
"GOOGLE_MAPS_API_KEY": "YOUR_API_KEY"
|
|
121
|
-
}
|
|
106
|
+
"env": { "GOOGLE_MAPS_API_KEY": "YOUR_API_KEY" }
|
|
122
107
|
}
|
|
123
108
|
}
|
|
124
109
|
}
|
|
125
110
|
```
|
|
126
111
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
```json
|
|
130
|
-
{
|
|
131
|
-
"env": {
|
|
132
|
-
"GOOGLE_MAPS_API_KEY": "YOUR_API_KEY",
|
|
133
|
-
"GOOGLE_MAPS_ENABLED_TOOLS": "maps_geocode,maps_directions,maps_search_places"
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
不設定或設為 `*` 即啟用全部 18 個工具(預設)。
|
|
139
|
-
|
|
140
|
-
### 方法二:HTTP Server
|
|
112
|
+
若要減少工具清單占用的上下文,可加入 `"GOOGLE_MAPS_ENABLED_TOOLS": "maps_geocode,maps_directions,maps_search_places"`。不設定或使用 `*` 即暴露全部工具。
|
|
141
113
|
|
|
142
|
-
|
|
114
|
+
### Streamable HTTP
|
|
143
115
|
|
|
144
116
|
```bash
|
|
145
|
-
npx @cablate/mcp-google-map --port 3000 --apikey "YOUR_API_KEY"
|
|
146
|
-
|
|
147
|
-
# 綁定所有網路介面以支援遠端存取(例如 Docker、區域網路)
|
|
148
|
-
npx @cablate/mcp-google-map --host 0.0.0.0 --port 3000 --apikey "YOUR_API_KEY"
|
|
117
|
+
npx @cablate/mcp-google-map --host 127.0.0.1 --port 3000 --apikey "YOUR_API_KEY"
|
|
149
118
|
```
|
|
150
119
|
|
|
151
|
-
然後設定你的 MCP 客戶端:
|
|
152
|
-
|
|
153
120
|
```json
|
|
154
121
|
{
|
|
155
122
|
"mcpServers": {
|
|
156
123
|
"google-maps": {
|
|
157
124
|
"type": "http",
|
|
158
|
-
"url": "http://
|
|
125
|
+
"url": "http://127.0.0.1:3000/mcp"
|
|
159
126
|
}
|
|
160
127
|
}
|
|
161
128
|
}
|
|
162
129
|
```
|
|
163
130
|
|
|
164
|
-
|
|
131
|
+
只有 server 確實需要接受外部連線時才綁定 `0.0.0.0`。多租戶部署建議使用 `X-Google-Maps-API-Key` request header,讓不同 session 的 key 保持隔離。
|
|
165
132
|
|
|
166
|
-
|
|
167
|
-
- **工具數**:18 個 Google Maps 工具(14 原子 + 4 組合)— 可透過 `GOOGLE_MAPS_ENABLED_TOOLS` 篩選
|
|
133
|
+
## 工具目錄
|
|
168
134
|
|
|
169
|
-
|
|
135
|
+
| 分類 | 工具 |
|
|
136
|
+
|---|---|
|
|
137
|
+
| 地點與探索 | `maps_search_places`、`maps_search_nearby`、`maps_place_details`、`maps_explore_area`、`maps_compare_places`、`maps_search_along_route` |
|
|
138
|
+
| 位置與路線 | `maps_geocode`、`maps_reverse_geocode`、`maps_directions`、`maps_distance_matrix`、`maps_plan_route`、`maps_batch_geocode` |
|
|
139
|
+
| 環境資訊與視覺化 | `maps_elevation`、`maps_timezone`、`maps_weather`、`maps_air_quality`、`maps_static_map` |
|
|
140
|
+
| Local SEO | `maps_local_rank_tracker` |
|
|
170
141
|
|
|
171
|
-
|
|
142
|
+
全部 18 個工具都宣告 `readOnlyHint: true` 與 `destructiveHint: false`。完整參數、回應格式與工作流程範例見[工具參考](./skills/google-maps/references/tools-api.md)。
|
|
172
143
|
|
|
173
|
-
|
|
174
|
-
npx @cablate/mcp-google-map exec geocode '{"address":"台北101"}'
|
|
175
|
-
npx @cablate/mcp-google-map exec search-places '{"query":"東京拉麵"}'
|
|
176
|
-
```
|
|
144
|
+
## API key 與 Google Cloud 設定
|
|
177
145
|
|
|
178
|
-
|
|
146
|
+
API key 所屬的 Google Cloud project 必須已啟用 billing,且 key restrictions 要與執行環境相容。[設定與診斷指南](./skills/_shared/setup-and-diagnostics.md)列出每項能力需要的 API,以及常見錯誤的處理方式。
|
|
179
147
|
|
|
180
|
-
|
|
148
|
+
憑證優先順序如下:
|
|
181
149
|
|
|
182
|
-
1.
|
|
183
|
-
2.
|
|
184
|
-
3.
|
|
150
|
+
1. `X-Google-Maps-API-Key` HTTP request header
|
|
151
|
+
2. `--apikey` 命令列參數
|
|
152
|
+
3. `GOOGLE_MAPS_API_KEY` 環境變數
|
|
185
153
|
|
|
186
|
-
|
|
154
|
+
建議使用環境變數或 request header。命令列中的秘密可能出現在 shell 歷史或程序清單。
|
|
187
155
|
|
|
188
|
-
|
|
156
|
+
## 信任與限制
|
|
189
157
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
npx @cablate/mcp-google-map batch-geocode -i addresses.txt -o results.json
|
|
196
|
-
cat addresses.txt | npx @cablate/mcp-google-map batch-geocode -i -
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
輸入:每行一個地址。輸出:JSON `{ total, succeeded, failed, results[] }`。預設並行度:20。
|
|
200
|
-
|
|
201
|
-
### API Key 設定
|
|
202
|
-
|
|
203
|
-
API key 可透過三種方式提供(優先順序):
|
|
204
|
-
|
|
205
|
-
1. **HTTP Headers**(最高優先)
|
|
206
|
-
|
|
207
|
-
```json
|
|
208
|
-
{
|
|
209
|
-
"mcp-google-map": {
|
|
210
|
-
"transport": "streamableHttp",
|
|
211
|
-
"url": "http://localhost:3000/mcp",
|
|
212
|
-
"headers": {
|
|
213
|
-
"X-Google-Maps-API-Key": "YOUR_API_KEY"
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
2. **命令列參數**
|
|
220
|
-
|
|
221
|
-
```bash
|
|
222
|
-
mcp-google-map --apikey YOUR_API_KEY
|
|
223
|
-
```
|
|
224
|
-
|
|
225
|
-
3. **環境變數**(.env 檔案或命令列)
|
|
226
|
-
```env
|
|
227
|
-
GOOGLE_MAPS_API_KEY=your_api_key_here
|
|
228
|
-
MCP_SERVER_PORT=3000
|
|
229
|
-
MCP_SERVER_HOST=0.0.0.0
|
|
230
|
-
```
|
|
158
|
+
- 地點與路線事實來自你為專案啟用的 Google Maps Platform APIs;天氣服務有區域限制。
|
|
159
|
+
- API 成功回應不等於已證明無障礙、安全、法律適用性或即時可用性。
|
|
160
|
+
- 套件會保留 API 回傳的來源與揭露 metadata,但你的介面仍有責任符合署名與保存規範。
|
|
161
|
+
- HTTP 模式支援每個 session 的 API key 隔離與 DNS rebinding 防護。
|
|
162
|
+
- 本專案採 MIT 授權且可自行架設。漏洞回報請見 [SECURITY.md](./SECURITY.md);企業審查可參考 [Security Assessment Clarifications](./SECURITY_ASSESSMENT.md)。
|
|
231
163
|
|
|
232
164
|
## 開發
|
|
233
165
|
|
|
234
|
-
### 本地開發
|
|
235
|
-
|
|
236
166
|
```bash
|
|
237
|
-
# 複製專案
|
|
238
167
|
git clone https://github.com/cablate/mcp-google-map.git
|
|
239
168
|
cd mcp-google-map
|
|
240
|
-
|
|
241
|
-
# 安裝依賴
|
|
242
|
-
npm install
|
|
243
|
-
|
|
244
|
-
# 設定環境變數
|
|
245
|
-
cp .env.example .env
|
|
246
|
-
# 編輯 .env 填入你的 API key
|
|
247
|
-
|
|
248
|
-
# 建置專案
|
|
169
|
+
npm ci
|
|
249
170
|
npm run build
|
|
250
|
-
|
|
251
|
-
# 啟動 server
|
|
252
|
-
npm start
|
|
253
|
-
|
|
254
|
-
# 或以開發模式執行
|
|
255
|
-
npm run dev
|
|
256
|
-
```
|
|
257
|
-
|
|
258
|
-
### 測試
|
|
259
|
-
|
|
260
|
-
```bash
|
|
261
|
-
# 執行 smoke tests(基本測試不需要 API key)
|
|
171
|
+
npm run test:unit
|
|
262
172
|
npm test
|
|
263
|
-
|
|
264
|
-
# 執行完整 E2E 測試(需要 GOOGLE_MAPS_API_KEY)
|
|
265
|
-
npm run test:e2e
|
|
266
|
-
```
|
|
267
|
-
|
|
268
|
-
### 專案結構
|
|
269
|
-
|
|
270
|
-
```
|
|
271
|
-
src/
|
|
272
|
-
├── cli.ts # CLI 進入點
|
|
273
|
-
├── config.ts # 工具註冊與 server 設定
|
|
274
|
-
├── index.ts # 套件匯出
|
|
275
|
-
├── core/
|
|
276
|
-
│ └── BaseMcpServer.ts # MCP server(streamable HTTP 傳輸)
|
|
277
|
-
├── services/
|
|
278
|
-
│ ├── NewPlacesService.ts # Google Places API (New) 客戶端
|
|
279
|
-
│ ├── PlacesSearcher.ts # Service facade 層
|
|
280
|
-
│ └── toolclass.ts # Legacy Google Maps API 客戶端
|
|
281
|
-
├── tools/
|
|
282
|
-
│ └── maps/
|
|
283
|
-
│ ├── searchNearby.ts # maps_search_nearby 工具
|
|
284
|
-
│ ├── searchPlaces.ts # maps_search_places 工具
|
|
285
|
-
│ ├── placeDetails.ts # maps_place_details 工具
|
|
286
|
-
│ ├── geocode.ts # maps_geocode 工具
|
|
287
|
-
│ ├── reverseGeocode.ts # maps_reverse_geocode 工具
|
|
288
|
-
│ ├── distanceMatrix.ts # maps_distance_matrix 工具
|
|
289
|
-
│ ├── directions.ts # maps_directions 工具
|
|
290
|
-
│ ├── elevation.ts # maps_elevation 工具
|
|
291
|
-
│ ├── timezone.ts # maps_timezone 工具
|
|
292
|
-
│ ├── weather.ts # maps_weather 工具
|
|
293
|
-
│ ├── airQuality.ts # maps_air_quality 工具
|
|
294
|
-
│ ├── staticMap.ts # maps_static_map 工具
|
|
295
|
-
│ ├── batchGeocode.ts # maps_batch_geocode 工具
|
|
296
|
-
│ ├── searchAlongRoute.ts # maps_search_along_route 工具
|
|
297
|
-
│ ├── exploreArea.ts # maps_explore_area(組合)
|
|
298
|
-
│ ├── planRoute.ts # maps_plan_route(組合)
|
|
299
|
-
│ ├── comparePlaces.ts # maps_compare_places(組合)
|
|
300
|
-
│ └── localRankTracker.ts # maps_local_rank_tracker(組合)
|
|
301
|
-
└── utils/
|
|
302
|
-
├── apiKeyManager.ts # API key 管理
|
|
303
|
-
└── requestContext.ts # Per-request context(API key 隔離)
|
|
304
|
-
tests/
|
|
305
|
-
└── smoke.test.ts # Smoke + E2E 測試套件
|
|
306
|
-
skills/
|
|
307
|
-
├── google-maps/ # 一般地點、路線與環境資訊工作流程
|
|
308
|
-
│ ├── SKILL.md
|
|
309
|
-
│ └── references/tools-api.md # 工具參數 + 一般場景食譜
|
|
310
|
-
├── google-maps-travel-planning/ # 單日與多日行程工作流程
|
|
311
|
-
│ ├── SKILL.md
|
|
312
|
-
│ └── references/travel-planning.md
|
|
313
|
-
├── google-maps-local-seo/ # 商家能見度與地理排名工作流程
|
|
314
|
-
│ ├── SKILL.md
|
|
315
|
-
│ └── references/local-seo.md
|
|
316
|
-
└── _shared/ # 三個 Skills 按需載入的共用資源
|
|
317
|
-
├── setup-and-diagnostics.md
|
|
318
|
-
└── content-attribution.md
|
|
319
|
-
.agents/
|
|
320
|
-
├── plugins/marketplace.json # CabLate marketplace 目錄
|
|
321
|
-
└── skills/project-docs/ # 僅供維護者使用的開發 Skill
|
|
322
|
-
.codex-plugin/plugin.json # Codex 相容 manifest
|
|
323
|
-
plugin.json # 可攜式 Agent Plugin manifest
|
|
324
173
|
```
|
|
325
174
|
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
- **TypeScript** - 型別安全開發
|
|
329
|
-
- **Node.js** - 執行環境
|
|
330
|
-
- **@googlemaps/places** - Google Places API (New) 地點搜尋與詳情
|
|
331
|
-
- **@googlemaps/google-maps-services-js** - Legacy API 地理編碼、導航、距離矩陣、海拔
|
|
332
|
-
- **@modelcontextprotocol/sdk** - MCP 協議實作(v1.27+)
|
|
333
|
-
- **Express.js** - HTTP server 框架
|
|
334
|
-
- **Zod** - Schema 驗證
|
|
335
|
-
|
|
336
|
-
## 安全性
|
|
337
|
-
|
|
338
|
-
- API key 在 server 端處理
|
|
339
|
-
- 多租戶部署的 per-session API key 隔離
|
|
340
|
-
- 正式環境可啟用 DNS rebinding 防護
|
|
341
|
-
- 使用 Zod schemas 進行輸入驗證
|
|
342
|
-
|
|
343
|
-
企業安全審查請參考 [Security Assessment Clarifications](./SECURITY_ASSESSMENT.md) — 涵蓋授權、資料保護、憑證管理、工具污染、AI 代理執行環境驗證的 23 項檢查清單。
|
|
344
|
-
|
|
345
|
-
## 路線圖
|
|
346
|
-
|
|
347
|
-
### 近期新增
|
|
348
|
-
|
|
349
|
-
| 工具 / 功能 | 解鎖場景 | 狀態 |
|
|
350
|
-
|------|----------------|--------|
|
|
351
|
-
| `maps_static_map` | 帶標記/路線的地圖圖片 — 多模態 AI 可「看見」地圖 | **完成** |
|
|
352
|
-
| `maps_air_quality` | AQI、污染物 — 健康出行、戶外規劃 | **完成** |
|
|
353
|
-
| `maps_batch_geocode` | 一次地理編碼最多 50 個地址 — 資料增強 | **完成** |
|
|
354
|
-
| `maps_search_along_route` | 沿路線搜尋地點,依繞路時間排序 — 旅行規劃 | **完成** |
|
|
355
|
-
| `maps_explore_area` | 一次呼叫的社區概覽(組合工具) | **完成** |
|
|
356
|
-
| `maps_plan_route` | 最佳化多站行程(組合工具) | **完成** |
|
|
357
|
-
| `maps_compare_places` | 並排地點比較(組合工具) | **完成** |
|
|
358
|
-
| `maps_local_rank_tracker` | 地理網格排名追蹤 — Local SEO 分析(組合工具) | **完成** |
|
|
359
|
-
| `GOOGLE_MAPS_ENABLED_TOOLS` | 篩選工具以減少上下文用量 | **完成** |
|
|
360
|
-
|
|
361
|
-
### 計畫中
|
|
362
|
-
|
|
363
|
-
| 功能 | 解鎖場景 | 狀態 |
|
|
364
|
-
|---------|----------------|--------|
|
|
365
|
-
| `maps_place_photo` | 地點照片供多模態 AI 使用 — 「看見」餐廳氛圍 | 計畫中 |
|
|
366
|
-
| 語言參數 | 所有工具支援多語言回應(ISO 639-1) | 計畫中 |
|
|
367
|
-
| MCP Prompt Templates | Claude Desktop 中的 `/travel-planner`、`/neighborhood-scout` 斜線指令 | 計畫中 |
|
|
368
|
-
| Geo-Reasoning Benchmark | 10 場景測試套件,衡量 LLM 地理空間推理準確度 | 研究中 |
|
|
175
|
+
即時 E2E 呼叫需要 `GOOGLE_MAPS_API_KEY`,且可能計費:`npm run test:e2e`。
|
|
369
176
|
|
|
370
|
-
|
|
177
|
+
歡迎參與貢獻。送出 pull request 前請先閱讀 [CONTRIBUTING.md](./CONTRIBUTING.md);版本紀錄見 [CHANGELOG.md](./CHANGELOG.md)。
|
|
371
178
|
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
- **旅行規劃** — 「規劃東京一日遊」(geocode → search → directions → weather)
|
|
375
|
-
- **房地產分析** — 「分析這個社區:學校、通勤、洪水風險」(search-nearby × N + elevation + distance-matrix)
|
|
376
|
-
- **物流優化** — 「從倉庫出發,最佳化這 12 個配送地址的路線」(plan-route)
|
|
377
|
-
- **外勤銷售** — 「拜訪芝加哥 6 個客戶,最小化車程,找午餐地點」(plan-route + search-nearby)
|
|
378
|
-
- **災害應變** — 「最近有開的醫院?我在洪水區嗎?」(search-nearby + elevation)
|
|
379
|
-
- **內容創作** — 「Austin 前 5 社區的餐廳密度和機場距離」(explore-area + distance-matrix)
|
|
380
|
-
- **無障礙** — 「輪椅可達的餐廳,避開陡坡路線」(search-nearby + place-details + elevation)
|
|
381
|
-
- **Local SEO** — 「分析我的餐廳在 1 公里內跟競爭對手的排名差距」(search-places + compare-places + explore-area)
|
|
382
|
-
|
|
383
|
-
## 更新日誌
|
|
179
|
+
## 特別感謝
|
|
384
180
|
|
|
385
|
-
|
|
181
|
+
感謝 [@junyinnnn](https://github.com/junyinnnn) 協助加入 Streamable HTTP 支援。
|
|
386
182
|
|
|
387
183
|
## 授權
|
|
388
184
|
|
|
389
|
-
MIT
|
|
390
|
-
|
|
391
|
-
## 貢獻
|
|
392
|
-
|
|
393
|
-
歡迎社群參與和貢獻!
|
|
394
|
-
|
|
395
|
-
- 提交 Issue:回報 bug 或提供建議
|
|
396
|
-
- 建立 Pull Request:提交程式碼改進
|
|
397
|
-
- 文件:協助改善文件
|
|
398
|
-
|
|
399
|
-
## 聯絡
|
|
400
|
-
|
|
401
|
-
- Email: [reahtuoo310109@gmail.com](mailto:reahtuoo310109@gmail.com)
|
|
402
|
-
- GitHub: [CabLate](https://github.com/cablate/)
|
|
403
|
-
|
|
404
|
-
## Star History
|
|
405
|
-
|
|
406
|
-
<a href="https://glama.ai/mcp/servers/@cablate/mcp-google-map">
|
|
407
|
-
<img width="380" height="200" src="https://glama.ai/mcp/servers/@cablate/mcp-google-map/badge" alt="Google Map Server MCP server" />
|
|
408
|
-
</a>
|
|
409
|
-
|
|
410
|
-
[](https://star-history.dera.page/#cablate/mcp-google-map&Date)
|
|
185
|
+
[MIT](./LICENSE)
|
|
@@ -1,16 +1,29 @@
|
|
|
1
1
|
# Agent Skill demo (no MCP server)
|
|
2
2
|
|
|
3
|
-
This walkthrough
|
|
3
|
+
This walkthrough verifies the no-MCP path end to end: the plugin's Agent Skills choose a geographic workflow, and the npm package CLI performs the API call. You do not need an MCP client or server.
|
|
4
4
|
|
|
5
5
|
## 1. Install the Skills
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Install the Codex plugin from the CabLate marketplace:
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
```bash
|
|
10
|
+
codex plugin marketplace add cablate/mcp-google-map --ref main
|
|
11
|
+
codex plugin add mcp-google-map@cablate
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Start a new conversation after installation. For a manual installation in another Skill-compatible agent, clone a chosen release tag and copy the whole `skills/` tree according to that client's instructions. Keep the three Skill folders and `_shared/` together. Installing the npm package alone does not register a Skill.
|
|
15
|
+
|
|
16
|
+
Check that your agent can discover `google-maps`, `google-maps-travel-planning`, and `google-maps-local-seo`, and can run shell commands. Provide a Google Maps Platform API key to the agent's environment as `GOOGLE_MAPS_API_KEY` through your normal secret-management method; never paste it into the prompt or commit it. Node.js 18+ and `npx` must be available. Enable Places API (New) and Routes API for workflows that use them.
|
|
10
17
|
|
|
11
18
|
## 2. Validate without an API call
|
|
12
19
|
|
|
13
|
-
|
|
20
|
+
For a marketplace installation, run:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npx -y @cablate/mcp-google-map doctor
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
For a cloned repository, install and build the package, then run the same check against the checkout:
|
|
14
27
|
|
|
15
28
|
```bash
|
|
16
29
|
npm ci
|
|
@@ -18,7 +31,7 @@ npm run build
|
|
|
18
31
|
node dist/cli.js doctor
|
|
19
32
|
```
|
|
20
33
|
|
|
21
|
-
|
|
34
|
+
Success means the Node.js, package, and API-key checks pass and `live-api` is skipped. This check makes no Google API requests. To test Geocoding, Places (New), and Routes, run the same command with `--live`; those calls may be billable.
|
|
22
35
|
|
|
23
36
|
## 3. Try one live request
|
|
24
37
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cablate/mcp-google-map",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.68",
|
|
4
4
|
"mcpName": "io.github.cablate/google-map",
|
|
5
5
|
"description": "18 Google Maps tools for AI agents — geocode, search, directions, weather, air quality, local rank tracking, map images via MCP server or standalone CLI",
|
|
6
6
|
"type": "module",
|
package/plugin.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
|
|
3
3
|
"name": "mcp-google-map",
|
|
4
|
-
"version": "0.0.
|
|
5
|
-
"description": "Use
|
|
4
|
+
"version": "0.0.68",
|
|
5
|
+
"description": "Use Google Maps for place research, travel planning, and local SEO through focused Skills and a standalone CLI—no MCP setup required.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "CabLate",
|
|
8
8
|
"url": "https://github.com/cablate"
|