mapnetwork-mcp 1.2.0__tar.gz → 1.2.1__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-1.2.0 → mapnetwork_mcp-1.2.1}/PKG-INFO +21 -4
- {mapnetwork_mcp-1.2.0 → mapnetwork_mcp-1.2.1}/README.md +20 -3
- mapnetwork_mcp-1.2.1/images/Kanazawa21Museum-black.png +0 -0
- mapnetwork_mcp-1.2.1/images/Kanazawa21Museum-darkGreen.png +0 -0
- mapnetwork_mcp-1.2.1/images/Kanazawa21Museum-grey.png +0 -0
- mapnetwork_mcp-1.2.1/images/Kanazawa21Museum-lightGreen.png +0 -0
- mapnetwork_mcp-1.2.1/images/Kanazawa21Museum-popArt.png +0 -0
- mapnetwork_mcp-1.2.1/images/Kanazawa21Museum-white.png +0 -0
- {mapnetwork_mcp-1.2.0 → mapnetwork_mcp-1.2.1}/manifest.json +1 -1
- {mapnetwork_mcp-1.2.0 → mapnetwork_mcp-1.2.1}/mapnetwork_mcp/server.py +12 -1
- {mapnetwork_mcp-1.2.0 → mapnetwork_mcp-1.2.1}/pyproject.toml +1 -1
- mapnetwork_mcp-1.2.0/images/Kanazawa21Museum-beige.png +0 -0
- mapnetwork_mcp-1.2.0/images/Kanazawa21Museum-black.png +0 -0
- mapnetwork_mcp-1.2.0/images/Kanazawa21Museum-brawn.png +0 -0
- mapnetwork_mcp-1.2.0/images/Kanazawa21Museum-darkBlue.png +0 -0
- mapnetwork_mcp-1.2.0/images/Kanazawa21Museum-lightGreen.png +0 -0
- mapnetwork_mcp-1.2.0/images/Kanazawa21Museum-popArt.png +0 -0
- mapnetwork_mcp-1.2.0/images/Kanazawa21Museum-white.png +0 -0
- {mapnetwork_mcp-1.2.0 → mapnetwork_mcp-1.2.1}/.gitignore +0 -0
- {mapnetwork_mcp-1.2.0 → mapnetwork_mcp-1.2.1}/.mcpbignore +0 -0
- {mapnetwork_mcp-1.2.0 → mapnetwork_mcp-1.2.1}/LICENSE +0 -0
- {mapnetwork_mcp-1.2.0 → mapnetwork_mcp-1.2.1}/RELEASING.md +0 -0
- {mapnetwork_mcp-1.2.0 → mapnetwork_mcp-1.2.1}/mapnetwork_mcp/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mapnetwork-mcp
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.1
|
|
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
|
|
@@ -34,9 +34,9 @@ Here is the map it generated:
|
|
|
34
34
|
|
|
35
35
|
The same map, redownloaded in different color themes:
|
|
36
36
|
|
|
37
|
-
|
|
|
38
|
-
|
|
39
|
-
| <img src="https://raw.githubusercontent.com/toruproject/mapnetwork-mcp/main/images/Kanazawa21Museum-
|
|
37
|
+
| Dark Green Style | Light Green Style | Pop Art Style | Black Style |
|
|
38
|
+
|:-------------------------------------------------------------------------------------------------------------------------------:|:--------------------------------------------------------------:|:----------------------------------------------------------------:|:---------------------------------------------------------:|
|
|
39
|
+
| <img src="https://raw.githubusercontent.com/toruproject/mapnetwork-mcp/main/images/Kanazawa21Museum-darkGreen.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
40
|
|
|
41
41
|
## Installation
|
|
42
42
|
|
|
@@ -82,6 +82,18 @@ pip install mapnetwork-mcp
|
|
|
82
82
|
}
|
|
83
83
|
```
|
|
84
84
|
|
|
85
|
+
## Remote MCP Server
|
|
86
|
+
|
|
87
|
+
You can also use MapNetwork through MCP without installing anything, via the remote MCP server:
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
https://mapnetwork.app/mcp
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
In Claude, go to **Settings** → **Connectors** → **Add custom connector** and register the URL above.
|
|
94
|
+
|
|
95
|
+
The key difference from this local server is how you receive the generated map image. Since `mapnetwork-mcp` runs on your PC, it can save the generated image directly to your Downloads folder. The remote server can't do this — most AI assistants are unable to properly display or save tool-result images within the chat — so instead of image data, it returns a text response with a download link and a link to edit the map at [mapnetwork.app](https://mapnetwork.app). Open the links in a browser to view or save the image, or to edit the map.
|
|
96
|
+
|
|
85
97
|
## Tools
|
|
86
98
|
|
|
87
99
|
| Tool | Description |
|
|
@@ -96,17 +108,22 @@ pip install mapnetwork-mcp
|
|
|
96
108
|
- "渋谷駅周辺の地図を作って"
|
|
97
109
|
- "赤坂駅から赤坂氷川神社までの徒歩ルートを地図にして"
|
|
98
110
|
- "東京駅・日本橋駅・京橋駅を1枚の地図に表示して"
|
|
111
|
+
- "日比谷公園の1キロ四方の地図を出して"
|
|
99
112
|
- "その地図を darkBlue テーマでSVG画像で出し直して"
|
|
113
|
+
- "生成した地図の編集用リンクをください"
|
|
100
114
|
|
|
101
115
|
**English**
|
|
102
116
|
- "Generate a map around Shibuya Station"
|
|
103
117
|
- "Show a walking route from Akasaka Station to Akasaka Hikawa Shrine on a map"
|
|
104
118
|
- "Put Tokyo Station, Nihonbashi Station, and Kyobashi Station on a single map"
|
|
119
|
+
- "Show a 1km square map of Hibiya Park"
|
|
105
120
|
- "Redownload that map as an SVG in the darkBlue theme"
|
|
121
|
+
- "Give me a link to edit the generated map"
|
|
106
122
|
|
|
107
123
|
## Links
|
|
108
124
|
|
|
109
125
|
- Web UI: [https://mapnetwork.app](https://mapnetwork.app)
|
|
126
|
+
- Web UI Manual: [https://mapnetwork.app/manual](https://mapnetwork.app/manual)
|
|
110
127
|
- API docs: [https://mapnetwork.app/openapi.json](https://mapnetwork.app/openapi.json)
|
|
111
128
|
|
|
112
129
|
mcp-name: io.github.toruproject/mapnetwork-mcp
|
|
@@ -22,9 +22,9 @@ Here is the map it generated:
|
|
|
22
22
|
|
|
23
23
|
The same map, redownloaded in different color themes:
|
|
24
24
|
|
|
25
|
-
|
|
|
26
|
-
|
|
27
|
-
| <img src="https://raw.githubusercontent.com/toruproject/mapnetwork-mcp/main/images/Kanazawa21Museum-
|
|
25
|
+
| Dark Green Style | Light Green Style | Pop Art Style | Black Style |
|
|
26
|
+
|:-------------------------------------------------------------------------------------------------------------------------------:|:--------------------------------------------------------------:|:----------------------------------------------------------------:|:---------------------------------------------------------:|
|
|
27
|
+
| <img src="https://raw.githubusercontent.com/toruproject/mapnetwork-mcp/main/images/Kanazawa21Museum-darkGreen.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
28
|
|
|
29
29
|
## Installation
|
|
30
30
|
|
|
@@ -70,6 +70,18 @@ pip install mapnetwork-mcp
|
|
|
70
70
|
}
|
|
71
71
|
```
|
|
72
72
|
|
|
73
|
+
## Remote MCP Server
|
|
74
|
+
|
|
75
|
+
You can also use MapNetwork through MCP without installing anything, via the remote MCP server:
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
https://mapnetwork.app/mcp
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
In Claude, go to **Settings** → **Connectors** → **Add custom connector** and register the URL above.
|
|
82
|
+
|
|
83
|
+
The key difference from this local server is how you receive the generated map image. Since `mapnetwork-mcp` runs on your PC, it can save the generated image directly to your Downloads folder. The remote server can't do this — most AI assistants are unable to properly display or save tool-result images within the chat — so instead of image data, it returns a text response with a download link and a link to edit the map at [mapnetwork.app](https://mapnetwork.app). Open the links in a browser to view or save the image, or to edit the map.
|
|
84
|
+
|
|
73
85
|
## Tools
|
|
74
86
|
|
|
75
87
|
| Tool | Description |
|
|
@@ -84,17 +96,22 @@ pip install mapnetwork-mcp
|
|
|
84
96
|
- "渋谷駅周辺の地図を作って"
|
|
85
97
|
- "赤坂駅から赤坂氷川神社までの徒歩ルートを地図にして"
|
|
86
98
|
- "東京駅・日本橋駅・京橋駅を1枚の地図に表示して"
|
|
99
|
+
- "日比谷公園の1キロ四方の地図を出して"
|
|
87
100
|
- "その地図を darkBlue テーマでSVG画像で出し直して"
|
|
101
|
+
- "生成した地図の編集用リンクをください"
|
|
88
102
|
|
|
89
103
|
**English**
|
|
90
104
|
- "Generate a map around Shibuya Station"
|
|
91
105
|
- "Show a walking route from Akasaka Station to Akasaka Hikawa Shrine on a map"
|
|
92
106
|
- "Put Tokyo Station, Nihonbashi Station, and Kyobashi Station on a single map"
|
|
107
|
+
- "Show a 1km square map of Hibiya Park"
|
|
93
108
|
- "Redownload that map as an SVG in the darkBlue theme"
|
|
109
|
+
- "Give me a link to edit the generated map"
|
|
94
110
|
|
|
95
111
|
## Links
|
|
96
112
|
|
|
97
113
|
- Web UI: [https://mapnetwork.app](https://mapnetwork.app)
|
|
114
|
+
- Web UI Manual: [https://mapnetwork.app/manual](https://mapnetwork.app/manual)
|
|
98
115
|
- API docs: [https://mapnetwork.app/openapi.json](https://mapnetwork.app/openapi.json)
|
|
99
116
|
|
|
100
117
|
mcp-name: io.github.toruproject/mapnetwork-mcp
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"manifest_version": "0.4",
|
|
3
3
|
"name": "mapnetwork-mcp",
|
|
4
4
|
"display_name": "MapNetwork",
|
|
5
|
-
"version": "1.2.
|
|
5
|
+
"version": "1.2.1",
|
|
6
6
|
"description": "Generate styled PNG/SVG map images of any location with 11 customizable color themes.",
|
|
7
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
8
|
"author": {
|
|
@@ -8,7 +8,7 @@ from pathlib import Path
|
|
|
8
8
|
from typing import Annotated, Literal
|
|
9
9
|
|
|
10
10
|
import httpx
|
|
11
|
-
from mcp.server.fastmcp import FastMCP, Image
|
|
11
|
+
from mcp.server.fastmcp import Context, FastMCP, Image
|
|
12
12
|
from pydantic import BaseModel, ConfigDict, Field
|
|
13
13
|
|
|
14
14
|
BASE_URL = os.environ.get("MAPNETWORK_BASE_URL", "https://mapnetwork.app")
|
|
@@ -302,6 +302,7 @@ async def generate_map(
|
|
|
302
302
|
] = "png",
|
|
303
303
|
canvas_width: Annotated[int | None, "Canvas width in pixels. Omit to use server default (1000)."] = None,
|
|
304
304
|
canvas_height: Annotated[int | None, "Canvas height in pixels. Omit to use server default (600)."] = None,
|
|
305
|
+
ctx: Context = None,
|
|
305
306
|
) -> list:
|
|
306
307
|
"""Generate a styled map image for a given location and save it to Downloads.
|
|
307
308
|
|
|
@@ -357,6 +358,12 @@ async def generate_map(
|
|
|
357
358
|
data_key = resp.json()["dataKey"]
|
|
358
359
|
|
|
359
360
|
# 2. Poll until ready
|
|
361
|
+
# ポーリング中に進捗通知を送らないと、クライアント側のタイムアウトが
|
|
362
|
+
# (MAX_WAIT_SECより手前で)先に発火し、実際には裏で処理が続いているのに
|
|
363
|
+
# クライアントには失敗したように見えてしまう。report_progressはprogressToken
|
|
364
|
+
# が無いクライアントに対しては何もしない安全な呼び出しなので、常に呼んでよい。
|
|
365
|
+
if ctx is not None:
|
|
366
|
+
await ctx.report_progress(0, MAX_WAIT_SEC, "Map generation queued...")
|
|
360
367
|
elapsed = 0.0
|
|
361
368
|
while elapsed < MAX_WAIT_SEC:
|
|
362
369
|
await asyncio.sleep(POLL_INTERVAL_SEC)
|
|
@@ -372,6 +379,10 @@ async def generate_map(
|
|
|
372
379
|
f"Map generation failed (dataKey={data_key}). "
|
|
373
380
|
"Try a different location or smaller radius."
|
|
374
381
|
)
|
|
382
|
+
if ctx is not None:
|
|
383
|
+
await ctx.report_progress(
|
|
384
|
+
elapsed, MAX_WAIT_SEC, f"Map generation in progress... ({elapsed:.0f}s elapsed)"
|
|
385
|
+
)
|
|
375
386
|
else:
|
|
376
387
|
raise TimeoutError(f"Map generation timed out after {MAX_WAIT_SEC}s.")
|
|
377
388
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|