scrapemapsapi-mcp 0.1.0__tar.gz
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.
- scrapemapsapi_mcp-0.1.0/.gitignore +9 -0
- scrapemapsapi_mcp-0.1.0/.mcp.json +11 -0
- scrapemapsapi_mcp-0.1.0/Dockerfile +8 -0
- scrapemapsapi_mcp-0.1.0/LICENSE +21 -0
- scrapemapsapi_mcp-0.1.0/PKG-INFO +150 -0
- scrapemapsapi_mcp-0.1.0/README.md +121 -0
- scrapemapsapi_mcp-0.1.0/dev_server.py +3 -0
- scrapemapsapi_mcp-0.1.0/glama.json +4 -0
- scrapemapsapi_mcp-0.1.0/llms-install.md +34 -0
- scrapemapsapi_mcp-0.1.0/npm/bin/cli.js +39 -0
- scrapemapsapi_mcp-0.1.0/npm/package.json +30 -0
- scrapemapsapi_mcp-0.1.0/pyproject.toml +59 -0
- scrapemapsapi_mcp-0.1.0/server.json +42 -0
- scrapemapsapi_mcp-0.1.0/src/scrapemapsapi_mcp/__init__.py +3 -0
- scrapemapsapi_mcp-0.1.0/src/scrapemapsapi_mcp/client.py +167 -0
- scrapemapsapi_mcp-0.1.0/src/scrapemapsapi_mcp/errors.py +148 -0
- scrapemapsapi_mcp-0.1.0/src/scrapemapsapi_mcp/prompts.py +79 -0
- scrapemapsapi_mcp-0.1.0/src/scrapemapsapi_mcp/resources.py +170 -0
- scrapemapsapi_mcp-0.1.0/src/scrapemapsapi_mcp/server.py +61 -0
- scrapemapsapi_mcp-0.1.0/src/scrapemapsapi_mcp/tools.py +333 -0
- scrapemapsapi_mcp-0.1.0/tests/conftest.py +125 -0
- scrapemapsapi_mcp-0.1.0/tests/test_client.py +144 -0
- scrapemapsapi_mcp-0.1.0/tests/test_packaging.py +46 -0
- scrapemapsapi_mcp-0.1.0/tests/test_server.py +70 -0
- scrapemapsapi_mcp-0.1.0/tests/test_tools.py +131 -0
- scrapemapsapi_mcp-0.1.0/uv.lock +1409 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Runs the ScrapeMapsAPI MCP server over stdio (for registries' automated checks and container use).
|
|
2
|
+
# Usage: docker run -i --rm -e SCRAPEMAPSAPI_API_KEY=... scrapemapsapi-mcp
|
|
3
|
+
FROM python:3.12-slim
|
|
4
|
+
WORKDIR /app
|
|
5
|
+
COPY pyproject.toml README.md LICENSE ./
|
|
6
|
+
COPY src ./src
|
|
7
|
+
RUN pip install --no-cache-dir .
|
|
8
|
+
ENTRYPOINT ["scrapemapsapi-mcp"]
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 ScrapeMapsAPI
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: scrapemapsapi-mcp
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: MCP server for the ScrapeMapsAPI API: Google Maps places, details and reviews for AI assistants
|
|
5
|
+
Project-URL: Homepage, https://scrapemapsapi.com
|
|
6
|
+
Project-URL: Repository, https://github.com/scrapemapsapi/mcp-server
|
|
7
|
+
Project-URL: Issues, https://github.com/scrapemapsapi/mcp-server/issues
|
|
8
|
+
Project-URL: Documentation, https://scrapemapsapi.com/docs/mcp
|
|
9
|
+
Author: ScrapeMapsAPI
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: ai,google-maps,llm,mcp,places,reviews
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Requires-Python: >=3.10
|
|
21
|
+
Requires-Dist: httpx<1,>=0.27
|
|
22
|
+
Requires-Dist: mcp[cli]<2,>=1.10
|
|
23
|
+
Provides-Extra: dev
|
|
24
|
+
Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
|
|
25
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
26
|
+
Requires-Dist: respx>=0.22; extra == 'dev'
|
|
27
|
+
Requires-Dist: ruff>=0.6; extra == 'dev'
|
|
28
|
+
Description-Content-Type: text/markdown
|
|
29
|
+
|
|
30
|
+
# ScrapeMapsAPI MCP Server
|
|
31
|
+
|
|
32
|
+
<!-- mcp-name: com.scrapemapsapi/scrapemapsapi -->
|
|
33
|
+
|
|
34
|
+
An [MCP](https://modelcontextprotocol.io) server that gives AI assistants (Claude Desktop, Claude Code, Cursor, Cline, ...) access to Google Maps places, place details and **all** the reviews of a place, via the [ScrapeMapsAPI](https://scrapemapsapi.com) API.
|
|
35
|
+
|
|
36
|
+
## No install: connect from Claude or ChatGPT
|
|
37
|
+
|
|
38
|
+
ScrapeMapsAPI also runs as a **remote MCP server** with OAuth sign-in, so you can use the same tools from
|
|
39
|
+
Claude (claude.ai, Desktop, mobile), ChatGPT or any client that supports remote servers, without an API key or
|
|
40
|
+
anything to install:
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
https://api.scrapemapsapi.com/mcp
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
- **Claude**: Customize → Connectors → + Add → Add custom connector, paste the URL, then sign in with your
|
|
47
|
+
ScrapeMapsAPI account and allow access.
|
|
48
|
+
- **ChatGPT**: chatgpt.com/plugins → + → Add custom MCP server, paste the URL as Server URL, OAuth authentication.
|
|
49
|
+
- **Claude Code**: `claude mcp add --transport http scrapemapsapi https://api.scrapemapsapi.com/mcp`, then `/mcp`
|
|
50
|
+
to sign in.
|
|
51
|
+
|
|
52
|
+
Calls use your account's credits exactly like the API; see or disconnect connected apps in Dashboard → Connected
|
|
53
|
+
apps. Step-by-step guide: https://scrapemapsapi.com/docs/mcp. The package below is the **local** server (stdio,
|
|
54
|
+
API key), for developers who prefer to run it themselves; both offer the same tools, prompts and resources.
|
|
55
|
+
|
|
56
|
+
## Features
|
|
57
|
+
|
|
58
|
+
**4 tools**: `search_places`, `get_place`, `get_reviews`, `resolve_place`. Results are compact text built for LLMs: the useful fields only, long texts capped, and the identifiers and cursors needed for the next call.
|
|
59
|
+
|
|
60
|
+
**4 documentation resources**: API reference, quickstart, pricing, workflow examples.
|
|
61
|
+
|
|
62
|
+
**3 prompts**: summarize the reviews of a place, compare places, find the best places of a kind in an area.
|
|
63
|
+
|
|
64
|
+
## Quick start
|
|
65
|
+
|
|
66
|
+
### 1. Get an API key
|
|
67
|
+
|
|
68
|
+
Create one at [scrapemapsapi.com](https://scrapemapsapi.com/dashboard/api-keys).
|
|
69
|
+
|
|
70
|
+
### 2. Configure your client
|
|
71
|
+
|
|
72
|
+
Claude Desktop (`claude_desktop_config.json`), Cursor (`.cursor/mcp.json`), Cline and most other clients:
|
|
73
|
+
|
|
74
|
+
```json
|
|
75
|
+
{
|
|
76
|
+
"mcpServers": {
|
|
77
|
+
"scrapemapsapi": {
|
|
78
|
+
"command": "uvx",
|
|
79
|
+
"args": ["scrapemapsapi-mcp"],
|
|
80
|
+
"env": {
|
|
81
|
+
"SCRAPEMAPSAPI_API_KEY": "your_api_key"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Claude Code:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
claude mcp add scrapemapsapi -e SCRAPEMAPSAPI_API_KEY=your_api_key -- uvx scrapemapsapi-mcp
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### 3. Use it
|
|
95
|
+
|
|
96
|
+
- "Find the five best-rated ramen places in Milan and check what recent reviews say"
|
|
97
|
+
- "Summarize the reviews of https://maps.app.goo.gl/..."
|
|
98
|
+
- "Show me the one-star reviews of Pizzeria Da Michele in Naples, written in Italian"
|
|
99
|
+
- "Is the Louvre open on Monday?"
|
|
100
|
+
|
|
101
|
+
## Tools
|
|
102
|
+
|
|
103
|
+
| Tool | What it does | Credits |
|
|
104
|
+
|------|-------------|---------|
|
|
105
|
+
| `search_places` | Text search, optionally near `lat`/`lng` within `radius_km`; `limit` 1-20 (default 20), `cursor` for more | 1 per call |
|
|
106
|
+
| `get_place` | Details: address, phone, website, opening hours, description, features, photos, IDs | 1 |
|
|
107
|
+
| `get_reviews` | One page of reviews; `sort` relevant/newest/highest/lowest, `language` (translation target), `original_language` filter, `limit` 1-20, `cursor` | 1 per call |
|
|
108
|
+
| `resolve_place` | Google Maps URL (short links too), place ID, CID or feature ID into every identifier | 1 |
|
|
109
|
+
|
|
110
|
+
Places are identified by a place ID (`ChIJ...`), a CID (digits) or a feature ID (`0x...:0x...`). Review texts are capped at 600 characters and owner replies at 200. API errors are returned as tool errors with a readable message and what to do next (e.g. top up credits, use `resolve_place`).
|
|
111
|
+
|
|
112
|
+
## Installation alternatives
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
# pip
|
|
116
|
+
pip install scrapemapsapi-mcp
|
|
117
|
+
SCRAPEMAPSAPI_API_KEY=... scrapemapsapi-mcp
|
|
118
|
+
|
|
119
|
+
# npx (wraps uvx, or python3 -m as a fallback)
|
|
120
|
+
SCRAPEMAPSAPI_API_KEY=... npx -y scrapemapsapi-mcp
|
|
121
|
+
|
|
122
|
+
# Docker
|
|
123
|
+
docker build -t scrapemapsapi-mcp . && docker run -i --rm -e SCRAPEMAPSAPI_API_KEY=... scrapemapsapi-mcp
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Environment variables
|
|
127
|
+
|
|
128
|
+
| Variable | Required | Description |
|
|
129
|
+
|----------|----------|-------------|
|
|
130
|
+
| `SCRAPEMAPSAPI_API_KEY` | Yes | Your API key |
|
|
131
|
+
| `SCRAPEMAPSAPI_BASE_URL` | No | Override the API base URL (default `https://api.scrapemapsapi.com`), e.g. `http://localhost:8000` |
|
|
132
|
+
|
|
133
|
+
## Development
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
cd sdks/mcp
|
|
137
|
+
uv venv && uv pip install -e ".[dev]"
|
|
138
|
+
.venv/bin/pytest
|
|
139
|
+
.venv/bin/ruff check .
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Test with the MCP Inspector:
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
SCRAPEMAPSAPI_API_KEY=... SCRAPEMAPSAPI_BASE_URL=http://localhost:8000 uv run mcp dev dev_server.py
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## License
|
|
149
|
+
|
|
150
|
+
MIT
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# ScrapeMapsAPI MCP Server
|
|
2
|
+
|
|
3
|
+
<!-- mcp-name: com.scrapemapsapi/scrapemapsapi -->
|
|
4
|
+
|
|
5
|
+
An [MCP](https://modelcontextprotocol.io) server that gives AI assistants (Claude Desktop, Claude Code, Cursor, Cline, ...) access to Google Maps places, place details and **all** the reviews of a place, via the [ScrapeMapsAPI](https://scrapemapsapi.com) API.
|
|
6
|
+
|
|
7
|
+
## No install: connect from Claude or ChatGPT
|
|
8
|
+
|
|
9
|
+
ScrapeMapsAPI also runs as a **remote MCP server** with OAuth sign-in, so you can use the same tools from
|
|
10
|
+
Claude (claude.ai, Desktop, mobile), ChatGPT or any client that supports remote servers, without an API key or
|
|
11
|
+
anything to install:
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
https://api.scrapemapsapi.com/mcp
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
- **Claude**: Customize → Connectors → + Add → Add custom connector, paste the URL, then sign in with your
|
|
18
|
+
ScrapeMapsAPI account and allow access.
|
|
19
|
+
- **ChatGPT**: chatgpt.com/plugins → + → Add custom MCP server, paste the URL as Server URL, OAuth authentication.
|
|
20
|
+
- **Claude Code**: `claude mcp add --transport http scrapemapsapi https://api.scrapemapsapi.com/mcp`, then `/mcp`
|
|
21
|
+
to sign in.
|
|
22
|
+
|
|
23
|
+
Calls use your account's credits exactly like the API; see or disconnect connected apps in Dashboard → Connected
|
|
24
|
+
apps. Step-by-step guide: https://scrapemapsapi.com/docs/mcp. The package below is the **local** server (stdio,
|
|
25
|
+
API key), for developers who prefer to run it themselves; both offer the same tools, prompts and resources.
|
|
26
|
+
|
|
27
|
+
## Features
|
|
28
|
+
|
|
29
|
+
**4 tools**: `search_places`, `get_place`, `get_reviews`, `resolve_place`. Results are compact text built for LLMs: the useful fields only, long texts capped, and the identifiers and cursors needed for the next call.
|
|
30
|
+
|
|
31
|
+
**4 documentation resources**: API reference, quickstart, pricing, workflow examples.
|
|
32
|
+
|
|
33
|
+
**3 prompts**: summarize the reviews of a place, compare places, find the best places of a kind in an area.
|
|
34
|
+
|
|
35
|
+
## Quick start
|
|
36
|
+
|
|
37
|
+
### 1. Get an API key
|
|
38
|
+
|
|
39
|
+
Create one at [scrapemapsapi.com](https://scrapemapsapi.com/dashboard/api-keys).
|
|
40
|
+
|
|
41
|
+
### 2. Configure your client
|
|
42
|
+
|
|
43
|
+
Claude Desktop (`claude_desktop_config.json`), Cursor (`.cursor/mcp.json`), Cline and most other clients:
|
|
44
|
+
|
|
45
|
+
```json
|
|
46
|
+
{
|
|
47
|
+
"mcpServers": {
|
|
48
|
+
"scrapemapsapi": {
|
|
49
|
+
"command": "uvx",
|
|
50
|
+
"args": ["scrapemapsapi-mcp"],
|
|
51
|
+
"env": {
|
|
52
|
+
"SCRAPEMAPSAPI_API_KEY": "your_api_key"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Claude Code:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
claude mcp add scrapemapsapi -e SCRAPEMAPSAPI_API_KEY=your_api_key -- uvx scrapemapsapi-mcp
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### 3. Use it
|
|
66
|
+
|
|
67
|
+
- "Find the five best-rated ramen places in Milan and check what recent reviews say"
|
|
68
|
+
- "Summarize the reviews of https://maps.app.goo.gl/..."
|
|
69
|
+
- "Show me the one-star reviews of Pizzeria Da Michele in Naples, written in Italian"
|
|
70
|
+
- "Is the Louvre open on Monday?"
|
|
71
|
+
|
|
72
|
+
## Tools
|
|
73
|
+
|
|
74
|
+
| Tool | What it does | Credits |
|
|
75
|
+
|------|-------------|---------|
|
|
76
|
+
| `search_places` | Text search, optionally near `lat`/`lng` within `radius_km`; `limit` 1-20 (default 20), `cursor` for more | 1 per call |
|
|
77
|
+
| `get_place` | Details: address, phone, website, opening hours, description, features, photos, IDs | 1 |
|
|
78
|
+
| `get_reviews` | One page of reviews; `sort` relevant/newest/highest/lowest, `language` (translation target), `original_language` filter, `limit` 1-20, `cursor` | 1 per call |
|
|
79
|
+
| `resolve_place` | Google Maps URL (short links too), place ID, CID or feature ID into every identifier | 1 |
|
|
80
|
+
|
|
81
|
+
Places are identified by a place ID (`ChIJ...`), a CID (digits) or a feature ID (`0x...:0x...`). Review texts are capped at 600 characters and owner replies at 200. API errors are returned as tool errors with a readable message and what to do next (e.g. top up credits, use `resolve_place`).
|
|
82
|
+
|
|
83
|
+
## Installation alternatives
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
# pip
|
|
87
|
+
pip install scrapemapsapi-mcp
|
|
88
|
+
SCRAPEMAPSAPI_API_KEY=... scrapemapsapi-mcp
|
|
89
|
+
|
|
90
|
+
# npx (wraps uvx, or python3 -m as a fallback)
|
|
91
|
+
SCRAPEMAPSAPI_API_KEY=... npx -y scrapemapsapi-mcp
|
|
92
|
+
|
|
93
|
+
# Docker
|
|
94
|
+
docker build -t scrapemapsapi-mcp . && docker run -i --rm -e SCRAPEMAPSAPI_API_KEY=... scrapemapsapi-mcp
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Environment variables
|
|
98
|
+
|
|
99
|
+
| Variable | Required | Description |
|
|
100
|
+
|----------|----------|-------------|
|
|
101
|
+
| `SCRAPEMAPSAPI_API_KEY` | Yes | Your API key |
|
|
102
|
+
| `SCRAPEMAPSAPI_BASE_URL` | No | Override the API base URL (default `https://api.scrapemapsapi.com`), e.g. `http://localhost:8000` |
|
|
103
|
+
|
|
104
|
+
## Development
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
cd sdks/mcp
|
|
108
|
+
uv venv && uv pip install -e ".[dev]"
|
|
109
|
+
.venv/bin/pytest
|
|
110
|
+
.venv/bin/ruff check .
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Test with the MCP Inspector:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
SCRAPEMAPSAPI_API_KEY=... SCRAPEMAPSAPI_BASE_URL=http://localhost:8000 uv run mcp dev dev_server.py
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## License
|
|
120
|
+
|
|
121
|
+
MIT
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Installing the ScrapeMapsAPI MCP server (for AI agents)
|
|
2
|
+
|
|
3
|
+
The server runs locally over stdio and is published on PyPI as `scrapemapsapi-mcp`. It gives access to Google Maps places, place details and reviews.
|
|
4
|
+
|
|
5
|
+
## 1. Requirements
|
|
6
|
+
|
|
7
|
+
- `uv` (provides `uvx`): `curl -LsSf https://astral.sh/uv/install.sh | sh` (or `brew install uv`). Alternatively Python 3.10+ and `pip install scrapemapsapi-mcp`.
|
|
8
|
+
- A ScrapeMapsAPI API key. Ask the user for it; they can create one (free monthly credits included) at https://scrapemapsapi.com/dashboard/api-keys. Never invent a key.
|
|
9
|
+
|
|
10
|
+
## 2. MCP client configuration
|
|
11
|
+
|
|
12
|
+
Add this server to the client's MCP settings (for Cline: `cline_mcp_settings.json`), replacing the key:
|
|
13
|
+
|
|
14
|
+
```json
|
|
15
|
+
{
|
|
16
|
+
"mcpServers": {
|
|
17
|
+
"scrapemapsapi": {
|
|
18
|
+
"command": "uvx",
|
|
19
|
+
"args": ["scrapemapsapi-mcp"],
|
|
20
|
+
"env": {
|
|
21
|
+
"SCRAPEMAPSAPI_API_KEY": "your_api_key"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Without uv, use `"command": "scrapemapsapi-mcp"` after `pip install scrapemapsapi-mcp`.
|
|
29
|
+
|
|
30
|
+
## 3. Check it works
|
|
31
|
+
|
|
32
|
+
After the client restarts the server it should list 4 tools: `search_places`, `get_place`, `get_reviews`, `resolve_place`. Try `search_places` with `query` `pizzeria in Naples` and `limit` `3` (3 credits).
|
|
33
|
+
|
|
34
|
+
An `invalid_api_key` error means the key is wrong or revoked; `insufficient_credits` means the credits are used up (top up at https://scrapemapsapi.com/dashboard/billing).
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* npm wrapper for the ScrapeMapsAPI MCP server.
|
|
5
|
+
* Spawns the Python package via uvx (preferred) or `python3 -m scrapemapsapi_mcp.server`.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
const { spawn } = require("child_process");
|
|
9
|
+
|
|
10
|
+
function run(command, args) {
|
|
11
|
+
const child = spawn(command, args, {
|
|
12
|
+
stdio: "inherit",
|
|
13
|
+
env: process.env,
|
|
14
|
+
});
|
|
15
|
+
child.on("error", () => {
|
|
16
|
+
console.error(
|
|
17
|
+
"scrapemapsapi-mcp: could not start the server. Install uv (https://docs.astral.sh/uv/) " +
|
|
18
|
+
"or run `pip install scrapemapsapi-mcp`."
|
|
19
|
+
);
|
|
20
|
+
process.exit(1);
|
|
21
|
+
});
|
|
22
|
+
child.on("exit", (code) => process.exit(code ?? 1));
|
|
23
|
+
return child;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// Try uvx first (fast, no install needed)
|
|
27
|
+
const uvx = spawn("uvx", ["scrapemapsapi-mcp"], {
|
|
28
|
+
stdio: "inherit",
|
|
29
|
+
env: process.env,
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
uvx.on("error", () => {
|
|
33
|
+
// uvx not available, fall back to python3 -m
|
|
34
|
+
run("python3", ["-m", "scrapemapsapi_mcp.server"]);
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
uvx.on("exit", (code) => {
|
|
38
|
+
if (code !== null) process.exit(code);
|
|
39
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "scrapemapsapi-mcp",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "MCP server for the ScrapeMapsAPI API: Google Maps places and reviews (npm wrapper around the Python package)",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"bin": {
|
|
7
|
+
"scrapemapsapi-mcp": "./bin/cli.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"bin/"
|
|
11
|
+
],
|
|
12
|
+
"keywords": [
|
|
13
|
+
"mcp",
|
|
14
|
+
"google-maps",
|
|
15
|
+
"places",
|
|
16
|
+
"reviews",
|
|
17
|
+
"ai"
|
|
18
|
+
],
|
|
19
|
+
"engines": {
|
|
20
|
+
"node": ">=18"
|
|
21
|
+
},
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "git+https://github.com/scrapemapsapi/mcp-server.git"
|
|
25
|
+
},
|
|
26
|
+
"bugs": {
|
|
27
|
+
"url": "https://github.com/scrapemapsapi/mcp-server/issues"
|
|
28
|
+
},
|
|
29
|
+
"homepage": "https://scrapemapsapi.com/docs/mcp"
|
|
30
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "scrapemapsapi-mcp"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "MCP server for the ScrapeMapsAPI API: Google Maps places, details and reviews for AI assistants"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = "MIT"
|
|
11
|
+
requires-python = ">=3.10"
|
|
12
|
+
authors = [{ name = "ScrapeMapsAPI" }]
|
|
13
|
+
keywords = ["mcp", "google-maps", "places", "reviews", "ai", "llm"]
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Development Status :: 4 - Beta",
|
|
16
|
+
"Intended Audience :: Developers",
|
|
17
|
+
"Programming Language :: Python :: 3",
|
|
18
|
+
"Programming Language :: Python :: 3.10",
|
|
19
|
+
"Programming Language :: Python :: 3.11",
|
|
20
|
+
"Programming Language :: Python :: 3.12",
|
|
21
|
+
"Programming Language :: Python :: 3.13",
|
|
22
|
+
]
|
|
23
|
+
dependencies = [
|
|
24
|
+
"mcp[cli]>=1.10,<2", # 2.x renamed FastMCP: the server does not start on it
|
|
25
|
+
"httpx>=0.27,<1",
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
[project.optional-dependencies]
|
|
29
|
+
dev = [
|
|
30
|
+
"pytest>=8.0",
|
|
31
|
+
"pytest-asyncio>=0.24",
|
|
32
|
+
"respx>=0.22",
|
|
33
|
+
"ruff>=0.6",
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
[project.urls]
|
|
37
|
+
Homepage = "https://scrapemapsapi.com"
|
|
38
|
+
Repository = "https://github.com/scrapemapsapi/mcp-server"
|
|
39
|
+
Issues = "https://github.com/scrapemapsapi/mcp-server/issues"
|
|
40
|
+
Documentation = "https://scrapemapsapi.com/docs/mcp"
|
|
41
|
+
|
|
42
|
+
[project.scripts]
|
|
43
|
+
scrapemapsapi-mcp = "scrapemapsapi_mcp.server:main"
|
|
44
|
+
|
|
45
|
+
[tool.hatch.build.targets.wheel]
|
|
46
|
+
packages = ["src/scrapemapsapi_mcp"]
|
|
47
|
+
|
|
48
|
+
[tool.pytest.ini_options]
|
|
49
|
+
asyncio_mode = "auto"
|
|
50
|
+
asyncio_default_fixture_loop_scope = "function"
|
|
51
|
+
testpaths = ["tests"]
|
|
52
|
+
|
|
53
|
+
[tool.ruff]
|
|
54
|
+
line-length = 120
|
|
55
|
+
target-version = "py310"
|
|
56
|
+
|
|
57
|
+
[tool.ruff.lint]
|
|
58
|
+
select = ["E", "F", "I", "B", "UP"]
|
|
59
|
+
ignore = ["UP007", "UP045", "B008"]
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
|
|
3
|
+
"name": "com.scrapemapsapi/scrapemapsapi",
|
|
4
|
+
"title": "ScrapeMapsAPI",
|
|
5
|
+
"description": "Google Maps places, place details and every review of a place, for AI assistants.",
|
|
6
|
+
"version": "0.1.0",
|
|
7
|
+
"websiteUrl": "https://scrapemapsapi.com/docs/mcp",
|
|
8
|
+
"repository": {
|
|
9
|
+
"url": "https://github.com/scrapemapsapi/mcp-server",
|
|
10
|
+
"source": "github"
|
|
11
|
+
},
|
|
12
|
+
"icons": [
|
|
13
|
+
{
|
|
14
|
+
"src": "https://scrapemapsapi.com/icon.svg",
|
|
15
|
+
"mimeType": "image/svg+xml"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"packages": [
|
|
19
|
+
{
|
|
20
|
+
"registryType": "pypi",
|
|
21
|
+
"identifier": "scrapemapsapi-mcp",
|
|
22
|
+
"version": "0.1.0",
|
|
23
|
+
"transport": {
|
|
24
|
+
"type": "stdio"
|
|
25
|
+
},
|
|
26
|
+
"environmentVariables": [
|
|
27
|
+
{
|
|
28
|
+
"name": "SCRAPEMAPSAPI_API_KEY",
|
|
29
|
+
"description": "Your ScrapeMapsAPI API key, from https://scrapemapsapi.com/dashboard/api-keys",
|
|
30
|
+
"isRequired": true,
|
|
31
|
+
"isSecret": true
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"remotes": [
|
|
37
|
+
{
|
|
38
|
+
"type": "streamable-http",
|
|
39
|
+
"url": "https://api.scrapemapsapi.com/mcp"
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
}
|