mapnetwork-mcp 0.1.4__tar.gz → 0.1.6__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.
- {mapnetwork_mcp-0.1.4 → mapnetwork_mcp-0.1.6}/.gitignore +2 -1
- mapnetwork_mcp-0.1.6/.mcpbignore +15 -0
- mapnetwork_mcp-0.1.6/LICENSE +21 -0
- {mapnetwork_mcp-0.1.4 → mapnetwork_mcp-0.1.6}/PKG-INFO +17 -1
- {mapnetwork_mcp-0.1.4 → mapnetwork_mcp-0.1.6}/README.md +15 -0
- mapnetwork_mcp-0.1.6/RELEASING.md +61 -0
- mapnetwork_mcp-0.1.6/images/Kanazawa21Museum-beige.png +0 -0
- mapnetwork_mcp-0.1.6/images/Kanazawa21Museum-black.png +0 -0
- mapnetwork_mcp-0.1.6/images/Kanazawa21Museum-brawn.png +0 -0
- mapnetwork_mcp-0.1.6/images/Kanazawa21Museum-darkBlue.png +0 -0
- mapnetwork_mcp-0.1.6/images/Kanazawa21Museum-lightGreen.png +0 -0
- mapnetwork_mcp-0.1.6/images/Kanazawa21Museum-popArt.png +0 -0
- mapnetwork_mcp-0.1.6/images/Kanazawa21Museum-white.png +0 -0
- mapnetwork_mcp-0.1.6/manifest.json +47 -0
- {mapnetwork_mcp-0.1.4 → mapnetwork_mcp-0.1.6}/mapnetwork_mcp/server.py +4 -3
- {mapnetwork_mcp-0.1.4 → mapnetwork_mcp-0.1.6}/pyproject.toml +1 -1
- {mapnetwork_mcp-0.1.4 → mapnetwork_mcp-0.1.6}/mapnetwork_mcp/__init__.py +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 toruproject
|
|
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.
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mapnetwork-mcp
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.6
|
|
4
4
|
Summary: MCP server — generate styled map images via mapnetwork.app
|
|
5
5
|
Project-URL: Homepage, https://mapnetwork.app
|
|
6
6
|
Project-URL: Repository, https://github.com/toruproject/mapnetwork-mcp
|
|
7
|
+
License-File: LICENSE
|
|
7
8
|
Requires-Python: >=3.11
|
|
8
9
|
Requires-Dist: httpx>=0.27.0
|
|
9
10
|
Requires-Dist: mcp[cli]>=1.0.0
|
|
@@ -22,6 +23,21 @@ MCP server for [MapNetwork](https://mapnetwork.app) — generate styled map imag
|
|
|
22
23
|
- Re-download a previously generated map in a different theme or format without regenerating
|
|
23
24
|
- Open any generated map in the MapNetwork web editor for manual customization
|
|
24
25
|
|
|
26
|
+
## Example Usage
|
|
27
|
+
|
|
28
|
+
**Prompt:** "Generate a map around the 21st Century Museum of Contemporary Art, Kanazawa."
|
|
29
|
+
|
|
30
|
+
Here is the map it generated:
|
|
31
|
+
<img src="https://raw.githubusercontent.com/toruproject/mapnetwork-mcp/main/images/Kanazawa21Museum-white.png" width="400" alt="Map Drawing Example">
|
|
32
|
+
|
|
33
|
+
**Prompt:** "Redownload that map in a few different color themes."
|
|
34
|
+
|
|
35
|
+
The same map, redownloaded in different color themes:
|
|
36
|
+
|
|
37
|
+
| Dark Blue Style | Light Green Style | Pop Art Style | Black Style |
|
|
38
|
+
|:------------------------------------------------------------:|:--------------------------------------------------------------:|:----------------------------------------------------------------:|:---------------------------------------------------------:|
|
|
39
|
+
| <img src="https://raw.githubusercontent.com/toruproject/mapnetwork-mcp/main/images/Kanazawa21Museum-darkBlue.png" width="160"> | <img src="https://raw.githubusercontent.com/toruproject/mapnetwork-mcp/main/images/Kanazawa21Museum-lightGreen.png" width="160"> | <img src="https://raw.githubusercontent.com/toruproject/mapnetwork-mcp/main/images/Kanazawa21Museum-popArt.png" width="160"> | <img src="https://raw.githubusercontent.com/toruproject/mapnetwork-mcp/main/images/Kanazawa21Museum-black.png" width="160"> |
|
|
40
|
+
|
|
25
41
|
## Installation
|
|
26
42
|
|
|
27
43
|
### Claude Desktop
|
|
@@ -11,6 +11,21 @@ MCP server for [MapNetwork](https://mapnetwork.app) — generate styled map imag
|
|
|
11
11
|
- Re-download a previously generated map in a different theme or format without regenerating
|
|
12
12
|
- Open any generated map in the MapNetwork web editor for manual customization
|
|
13
13
|
|
|
14
|
+
## Example Usage
|
|
15
|
+
|
|
16
|
+
**Prompt:** "Generate a map around the 21st Century Museum of Contemporary Art, Kanazawa."
|
|
17
|
+
|
|
18
|
+
Here is the map it generated:
|
|
19
|
+
<img src="https://raw.githubusercontent.com/toruproject/mapnetwork-mcp/main/images/Kanazawa21Museum-white.png" width="400" alt="Map Drawing Example">
|
|
20
|
+
|
|
21
|
+
**Prompt:** "Redownload that map in a few different color themes."
|
|
22
|
+
|
|
23
|
+
The same map, redownloaded in different color themes:
|
|
24
|
+
|
|
25
|
+
| Dark Blue Style | Light Green Style | Pop Art Style | Black Style |
|
|
26
|
+
|:------------------------------------------------------------:|:--------------------------------------------------------------:|:----------------------------------------------------------------:|:---------------------------------------------------------:|
|
|
27
|
+
| <img src="https://raw.githubusercontent.com/toruproject/mapnetwork-mcp/main/images/Kanazawa21Museum-darkBlue.png" width="160"> | <img src="https://raw.githubusercontent.com/toruproject/mapnetwork-mcp/main/images/Kanazawa21Museum-lightGreen.png" width="160"> | <img src="https://raw.githubusercontent.com/toruproject/mapnetwork-mcp/main/images/Kanazawa21Museum-popArt.png" width="160"> | <img src="https://raw.githubusercontent.com/toruproject/mapnetwork-mcp/main/images/Kanazawa21Museum-black.png" width="160"> |
|
|
28
|
+
|
|
14
29
|
## Installation
|
|
15
30
|
|
|
16
31
|
### Claude Desktop
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Releasing a new version
|
|
2
|
+
|
|
3
|
+
This project's version number is declared in **three places** that must stay in sync:
|
|
4
|
+
|
|
5
|
+
| File | Field(s) |
|
|
6
|
+
|---|---|
|
|
7
|
+
| `pyproject.toml` | `[project] version` |
|
|
8
|
+
| `server.json` | `version`, `packages[0].version` |
|
|
9
|
+
| `manifest.json` | `version` |
|
|
10
|
+
|
|
11
|
+
## Steps
|
|
12
|
+
|
|
13
|
+
1. **Bump the version** in all three files above (same value).
|
|
14
|
+
|
|
15
|
+
2. **Build the PyPI package**
|
|
16
|
+
```bash
|
|
17
|
+
rm -f dist/*.whl dist/*.tar.gz
|
|
18
|
+
.venv/Scripts/python -m build
|
|
19
|
+
.venv/Scripts/python -m twine check dist/*
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
3. **Upload to PyPI**
|
|
23
|
+
```bash
|
|
24
|
+
.venv/Scripts/python -m twine upload dist/mapnetwork_mcp-<version>*
|
|
25
|
+
```
|
|
26
|
+
Requires a PyPI API token (via `~/.pypirc` or `TWINE_USERNAME=__token__` / `TWINE_PASSWORD=...`).
|
|
27
|
+
|
|
28
|
+
4. **Publish to the MCP registry**
|
|
29
|
+
```bash
|
|
30
|
+
./mcp-publisher.exe validate server.json
|
|
31
|
+
./mcp-publisher.exe login github # only needed if the session expired
|
|
32
|
+
./mcp-publisher.exe publish server.json
|
|
33
|
+
```
|
|
34
|
+
The registry entry's `packages[0].version` must match the version actually live on PyPI (the registry does not host the code itself).
|
|
35
|
+
|
|
36
|
+
⚠️ `login github` requires manually entering a device confirmation code in the browser — it cannot be automated.
|
|
37
|
+
|
|
38
|
+
5. **Rebuild the MCPB bundle**
|
|
39
|
+
```bash
|
|
40
|
+
npx --yes @anthropic-ai/mcpb validate manifest.json
|
|
41
|
+
npx --yes @anthropic-ai/mcpb pack . dist/mapnetwork-mcp.mcpb
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
6. **Commit, tag, and push**
|
|
45
|
+
```bash
|
|
46
|
+
git add pyproject.toml server.json manifest.json
|
|
47
|
+
git commit -m "Bump version to <version>"
|
|
48
|
+
git push origin main
|
|
49
|
+
git tag -a v<version> -m "v<version>"
|
|
50
|
+
git push origin v<version>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
7. **Create the GitHub Release** with the `.mcpb` bundle attached
|
|
54
|
+
```bash
|
|
55
|
+
gh release create v<version> dist/mapnetwork-mcp.mcpb --title "v<version>" --notes "..."
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Notes
|
|
59
|
+
|
|
60
|
+
- `.mcpregistry_github_token` / `.mcpregistry_registry_token` hold the `mcp-publisher` login session — they are git-ignored and must never be committed.
|
|
61
|
+
- `dist/` is git-ignored; build artifacts and the `.mcpb` bundle are distributed only via PyPI / the GitHub Release, not via the repository.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"manifest_version": "0.4",
|
|
3
|
+
"name": "mapnetwork-mcp",
|
|
4
|
+
"display_name": "MapNetwork",
|
|
5
|
+
"version": "0.1.6",
|
|
6
|
+
"description": "Generate styled PNG/SVG map images of any location with 11 customizable color themes.",
|
|
7
|
+
"long_description": "MCP server for MapNetwork — generate styled map images (PNG / SVG) for any location on Earth, directly from Claude.\n\n- Generate maps from a place name, coordinates, or a list of markers\n- 11 color themes (white, darkBlue, darkGreen, popArt, lightBlue, lightGreen, beige, magenta, gray, black, brawn)\n- Overlay walking / driving routes on the map\n- PNG or SVG output, saved to your Downloads folder\n- Re-download a previously generated map in a different theme or format without regenerating\n- Open any generated map in the MapNetwork web editor for manual customization",
|
|
8
|
+
"author": {
|
|
9
|
+
"name": "toruproject",
|
|
10
|
+
"url": "https://github.com/toruproject"
|
|
11
|
+
},
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "https://github.com/toruproject/mapnetwork-mcp"
|
|
15
|
+
},
|
|
16
|
+
"homepage": "https://mapnetwork.app",
|
|
17
|
+
"server": {
|
|
18
|
+
"type": "uv",
|
|
19
|
+
"entry_point": "mapnetwork_mcp/server.py",
|
|
20
|
+
"mcp_config": {
|
|
21
|
+
"command": "uv",
|
|
22
|
+
"args": ["run", "--directory", "${__dirname}", "mapnetwork_mcp/server.py"]
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"tools": [
|
|
26
|
+
{
|
|
27
|
+
"name": "generate_map",
|
|
28
|
+
"description": "Generate a styled map image for a location and save it to Downloads"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"name": "compute_route",
|
|
32
|
+
"description": "Compute a walking or driving route between two locations"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"name": "redownload_map",
|
|
36
|
+
"description": "Re-download a previously generated map in a different color theme or format"
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"compatibility": {
|
|
40
|
+
"platforms": ["darwin", "linux", "win32"],
|
|
41
|
+
"runtimes": {
|
|
42
|
+
"python": ">=3.11"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"keywords": ["map", "maps", "mapnetwork", "geocoding", "route", "png", "svg"],
|
|
46
|
+
"license": "MIT"
|
|
47
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"""MCP server for MapNetwork — generates styled map images from a place name or coordinates."""
|
|
2
2
|
|
|
3
3
|
import asyncio
|
|
4
|
+
import os
|
|
4
5
|
import re
|
|
5
6
|
from datetime import datetime
|
|
6
7
|
from pathlib import Path
|
|
@@ -9,9 +10,9 @@ from typing import Annotated
|
|
|
9
10
|
import httpx
|
|
10
11
|
from mcp.server.fastmcp import FastMCP, Image
|
|
11
12
|
|
|
12
|
-
BASE_URL = "https://mapnetwork.app"
|
|
13
|
-
POLL_INTERVAL_SEC =
|
|
14
|
-
MAX_WAIT_SEC =
|
|
13
|
+
BASE_URL = os.environ.get("MAPNETWORK_BASE_URL", "https://mapnetwork.app")
|
|
14
|
+
POLL_INTERVAL_SEC = 10.0
|
|
15
|
+
MAX_WAIT_SEC = 600
|
|
15
16
|
|
|
16
17
|
mcp = FastMCP(
|
|
17
18
|
"MapNetwork",
|
|
File without changes
|