mapnetwork-mcp 6.0.0__tar.gz → 6.1.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-6.0.0 → mapnetwork_mcp-6.1.1}/PKG-INFO +18 -15
- {mapnetwork_mcp-6.0.0 → mapnetwork_mcp-6.1.1}/README.md +17 -14
- {mapnetwork_mcp-6.0.0 → mapnetwork_mcp-6.1.1}/manifest.json +3 -3
- {mapnetwork_mcp-6.0.0 → mapnetwork_mcp-6.1.1}/mapnetwork_mcp/server.py +24 -14
- {mapnetwork_mcp-6.0.0 → mapnetwork_mcp-6.1.1}/pyproject.toml +1 -1
- {mapnetwork_mcp-6.0.0 → mapnetwork_mcp-6.1.1}/spec/input_schema.json +1 -1
- {mapnetwork_mcp-6.0.0 → mapnetwork_mcp-6.1.1}/.github/workflows/workflow.yml +0 -0
- {mapnetwork_mcp-6.0.0 → mapnetwork_mcp-6.1.1}/.gitignore +0 -0
- {mapnetwork_mcp-6.0.0 → mapnetwork_mcp-6.1.1}/.mcpbignore +0 -0
- {mapnetwork_mcp-6.0.0 → mapnetwork_mcp-6.1.1}/LICENSE +0 -0
- {mapnetwork_mcp-6.0.0 → mapnetwork_mcp-6.1.1}/LOCALTEST.md +0 -0
- {mapnetwork_mcp-6.0.0 → mapnetwork_mcp-6.1.1}/RELEASING.md +0 -0
- {mapnetwork_mcp-6.0.0 → mapnetwork_mcp-6.1.1}/SECURITY.md +0 -0
- {mapnetwork_mcp-6.0.0 → mapnetwork_mcp-6.1.1}/images/Kanazawa21Museum-black.png +0 -0
- {mapnetwork_mcp-6.0.0 → mapnetwork_mcp-6.1.1}/images/Kanazawa21Museum-darkGreen.png +0 -0
- {mapnetwork_mcp-6.0.0 → mapnetwork_mcp-6.1.1}/images/Kanazawa21Museum-grey.png +0 -0
- {mapnetwork_mcp-6.0.0 → mapnetwork_mcp-6.1.1}/images/Kanazawa21Museum-lightGreen.png +0 -0
- {mapnetwork_mcp-6.0.0 → mapnetwork_mcp-6.1.1}/images/Kanazawa21Museum-popArt.png +0 -0
- {mapnetwork_mcp-6.0.0 → mapnetwork_mcp-6.1.1}/images/Kanazawa21Museum-white.png +0 -0
- {mapnetwork_mcp-6.0.0 → mapnetwork_mcp-6.1.1}/mapnetwork_mcp/__init__.py +0 -0
- {mapnetwork_mcp-6.0.0 → mapnetwork_mcp-6.1.1}/spec/output_schema.json +0 -0
- {mapnetwork_mcp-6.0.0 → mapnetwork_mcp-6.1.1}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mapnetwork-mcp
|
|
3
|
-
Version: 6.
|
|
3
|
+
Version: 6.1.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
|
|
@@ -13,14 +13,17 @@ Description-Content-Type: text/markdown
|
|
|
13
13
|
|
|
14
14
|
# mapnetwork-mcp
|
|
15
15
|
|
|
16
|
-
MCP server for [MapNetwork](https://mapnetwork.app) —
|
|
16
|
+
MCP server for [MapNetwork](https://mapnetwork.app) — turn places in Japan into styled, illustration-like map images (PNG / SVG), directly from Claude or any MCP-compatible AI assistant.
|
|
17
|
+
|
|
18
|
+
Maps are built from detailed OpenStreetMap data served by MapNetwork's own Overpass API for Japan, so coverage is currently limited to **Japan (country code JP)** — requests for places outside Japan return an error.
|
|
17
19
|
|
|
18
20
|
## Features
|
|
19
21
|
|
|
20
|
-
- Generate
|
|
21
|
-
-
|
|
22
|
-
-
|
|
22
|
+
- Generate a map from a place name or a list of markers
|
|
23
|
+
- Overlay a walking / driving route between two places
|
|
24
|
+
- 11 color themes (white, darkBlue, darkGreen, popArt, lightBlue, lightGreen, beige, magenta, gray, black, brown)
|
|
23
25
|
- PNG or SVG output, saved to your Downloads folder
|
|
26
|
+
- Slow-to-generate maps are handled automatically — `generate_*` tools poll internally, and `download_map` can pick up a job later if needed
|
|
24
27
|
- Re-download a previously generated map in a different theme or format without regenerating
|
|
25
28
|
- Open any generated map in the MapNetwork web editor for manual customization
|
|
26
29
|
|
|
@@ -61,7 +64,7 @@ Add the following to your `claude_desktop_config.json`:
|
|
|
61
64
|
"mapnetwork": {
|
|
62
65
|
"command": "uvx",
|
|
63
66
|
"args": ["mapnetwork-mcp"],
|
|
64
|
-
"alwaysAllow": ["generate_map", "
|
|
67
|
+
"alwaysAllow": ["generate_map", "generate_markers_map", "generate_route_map", "download_map", "redownload_map"]
|
|
65
68
|
}
|
|
66
69
|
}
|
|
67
70
|
}
|
|
@@ -99,25 +102,25 @@ The key difference from this local server is how you receive the generated map i
|
|
|
99
102
|
|
|
100
103
|
| Tool | Description |
|
|
101
104
|
|---|---|
|
|
102
|
-
| `generate_map` | Generate a styled map image
|
|
103
|
-
| `
|
|
104
|
-
| `
|
|
105
|
+
| `generate_map` | Generate a styled map image centered on a single place and save it to Downloads |
|
|
106
|
+
| `generate_markers_map` | Generate a map with multiple pinned locations |
|
|
107
|
+
| `generate_route_map` | Compute a walking or driving route between two places and generate a map with it overlaid |
|
|
108
|
+
| `download_map` | Check a pending `generate_*` job and download it once ready |
|
|
109
|
+
| `redownload_map` | Re-download a previously generated map in a different color theme or format — instant, no regeneration |
|
|
105
110
|
|
|
106
111
|
## Example prompts
|
|
107
112
|
|
|
108
113
|
**Japanese**
|
|
109
|
-
- "
|
|
114
|
+
- "東京タワー周辺の地図を作って"
|
|
115
|
+
- "上野駅が最寄りの美術館・博物館を地図にして"
|
|
110
116
|
- "赤坂駅から赤坂氷川神社までの徒歩ルートを地図にして"
|
|
111
|
-
- "東京駅・日本橋駅・京橋駅を1枚の地図に表示して"
|
|
112
|
-
- "日比谷公園の1キロ四方の地図を出して"
|
|
113
117
|
- "その地図を darkBlue テーマでSVG画像で出し直して"
|
|
114
118
|
- "生成した地図の編集用リンクをください"
|
|
115
119
|
|
|
116
120
|
**English**
|
|
117
|
-
- "Generate a map around
|
|
121
|
+
- "Generate a map around Tokyo Tower"
|
|
122
|
+
- "Show a map of the museums near Ueno Station"
|
|
118
123
|
- "Show a walking route from Akasaka Station to Akasaka Hikawa Shrine on a map"
|
|
119
|
-
- "Put Tokyo Station, Nihonbashi Station, and Kyobashi Station on a single map"
|
|
120
|
-
- "Show a 1km square map of Hibiya Park"
|
|
121
124
|
- "Redownload that map as an SVG in the darkBlue theme"
|
|
122
125
|
- "Give me a link to edit the generated map"
|
|
123
126
|
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
# mapnetwork-mcp
|
|
2
2
|
|
|
3
|
-
MCP server for [MapNetwork](https://mapnetwork.app) —
|
|
3
|
+
MCP server for [MapNetwork](https://mapnetwork.app) — turn places in Japan into styled, illustration-like map images (PNG / SVG), directly from Claude or any MCP-compatible AI assistant.
|
|
4
|
+
|
|
5
|
+
Maps are built from detailed OpenStreetMap data served by MapNetwork's own Overpass API for Japan, so coverage is currently limited to **Japan (country code JP)** — requests for places outside Japan return an error.
|
|
4
6
|
|
|
5
7
|
## Features
|
|
6
8
|
|
|
7
|
-
- Generate
|
|
8
|
-
-
|
|
9
|
-
-
|
|
9
|
+
- Generate a map from a place name or a list of markers
|
|
10
|
+
- Overlay a walking / driving route between two places
|
|
11
|
+
- 11 color themes (white, darkBlue, darkGreen, popArt, lightBlue, lightGreen, beige, magenta, gray, black, brown)
|
|
10
12
|
- PNG or SVG output, saved to your Downloads folder
|
|
13
|
+
- Slow-to-generate maps are handled automatically — `generate_*` tools poll internally, and `download_map` can pick up a job later if needed
|
|
11
14
|
- Re-download a previously generated map in a different theme or format without regenerating
|
|
12
15
|
- Open any generated map in the MapNetwork web editor for manual customization
|
|
13
16
|
|
|
@@ -48,7 +51,7 @@ Add the following to your `claude_desktop_config.json`:
|
|
|
48
51
|
"mapnetwork": {
|
|
49
52
|
"command": "uvx",
|
|
50
53
|
"args": ["mapnetwork-mcp"],
|
|
51
|
-
"alwaysAllow": ["generate_map", "
|
|
54
|
+
"alwaysAllow": ["generate_map", "generate_markers_map", "generate_route_map", "download_map", "redownload_map"]
|
|
52
55
|
}
|
|
53
56
|
}
|
|
54
57
|
}
|
|
@@ -86,25 +89,25 @@ The key difference from this local server is how you receive the generated map i
|
|
|
86
89
|
|
|
87
90
|
| Tool | Description |
|
|
88
91
|
|---|---|
|
|
89
|
-
| `generate_map` | Generate a styled map image
|
|
90
|
-
| `
|
|
91
|
-
| `
|
|
92
|
+
| `generate_map` | Generate a styled map image centered on a single place and save it to Downloads |
|
|
93
|
+
| `generate_markers_map` | Generate a map with multiple pinned locations |
|
|
94
|
+
| `generate_route_map` | Compute a walking or driving route between two places and generate a map with it overlaid |
|
|
95
|
+
| `download_map` | Check a pending `generate_*` job and download it once ready |
|
|
96
|
+
| `redownload_map` | Re-download a previously generated map in a different color theme or format — instant, no regeneration |
|
|
92
97
|
|
|
93
98
|
## Example prompts
|
|
94
99
|
|
|
95
100
|
**Japanese**
|
|
96
|
-
- "
|
|
101
|
+
- "東京タワー周辺の地図を作って"
|
|
102
|
+
- "上野駅が最寄りの美術館・博物館を地図にして"
|
|
97
103
|
- "赤坂駅から赤坂氷川神社までの徒歩ルートを地図にして"
|
|
98
|
-
- "東京駅・日本橋駅・京橋駅を1枚の地図に表示して"
|
|
99
|
-
- "日比谷公園の1キロ四方の地図を出して"
|
|
100
104
|
- "その地図を darkBlue テーマでSVG画像で出し直して"
|
|
101
105
|
- "生成した地図の編集用リンクをください"
|
|
102
106
|
|
|
103
107
|
**English**
|
|
104
|
-
- "Generate a map around
|
|
108
|
+
- "Generate a map around Tokyo Tower"
|
|
109
|
+
- "Show a map of the museums near Ueno Station"
|
|
105
110
|
- "Show a walking route from Akasaka Station to Akasaka Hikawa Shrine on a map"
|
|
106
|
-
- "Put Tokyo Station, Nihonbashi Station, and Kyobashi Station on a single map"
|
|
107
|
-
- "Show a 1km square map of Hibiya Park"
|
|
108
111
|
- "Redownload that map as an SVG in the darkBlue theme"
|
|
109
112
|
- "Give me a link to edit the generated map"
|
|
110
113
|
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"manifest_version": "0.4",
|
|
3
3
|
"name": "mapnetwork-mcp",
|
|
4
4
|
"display_name": "MapNetwork",
|
|
5
|
-
"version": "6.
|
|
6
|
-
"description": "Generate styled PNG/SVG map images of
|
|
7
|
-
"long_description": "MCP server for MapNetwork —
|
|
5
|
+
"version": "6.1.1",
|
|
6
|
+
"description": "Generate styled PNG/SVG map images of places in Japan with 11 customizable color themes.",
|
|
7
|
+
"long_description": "MCP server for MapNetwork — turn places in Japan into styled, illustration-like map images (PNG / SVG), directly from Claude.\n\nMaps are built from detailed OpenStreetMap data served by MapNetwork's own Overpass API for Japan, so coverage is currently limited to Japan (country code JP).\n\n- Generate a map from a place name or a list of markers\n- Overlay a walking / driving route between two places\n- 11 color themes (white, darkBlue, darkGreen, popArt, lightBlue, lightGreen, beige, magenta, gray, black, brown)\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": {
|
|
9
9
|
"name": "toruproject",
|
|
10
10
|
"url": "https://github.com/toruproject"
|
|
@@ -48,7 +48,8 @@ mcp = FastMCP(
|
|
|
48
48
|
"MapNetwork",
|
|
49
49
|
instructions=(
|
|
50
50
|
"You have access to MapNetwork, which generates styled map images (PNG) "
|
|
51
|
-
"for
|
|
51
|
+
"for locations in Japan. The only country currently supported is JP (Japan); "
|
|
52
|
+
"requests for places outside Japan are rejected.\n\n"
|
|
52
53
|
"## Key capabilities — pick the tool that matches what you need\n"
|
|
53
54
|
"- **Single location**: `generate_map(place=...)` — centers a map on one place.\n"
|
|
54
55
|
"- **Multiple pinned locations**: `generate_markers_map(markers=[{\"label\": ...}, ...])` — "
|
|
@@ -74,7 +75,7 @@ mcp = FastMCP(
|
|
|
74
75
|
"color theme or format (png/svg) — **no regeneration needed**. "
|
|
75
76
|
"Use this when the user asks to change only the appearance after already generating the map. "
|
|
76
77
|
"MapNetwork supports 11 color themes (white, darkBlue, darkGreen, popArt, lightBlue, "
|
|
77
|
-
"lightGreen, beige, magenta, gray, black,
|
|
78
|
+
"lightGreen, beige, magenta, gray, black, brown).\n\n"
|
|
78
79
|
"## Sharing the generated map\n"
|
|
79
80
|
"Every successful result includes a Download link and an 'Open in editor' link — "
|
|
80
81
|
"mention both to the user.\n\n"
|
|
@@ -162,6 +163,17 @@ def _build_success_result(image_bytes: bytes, out_path: Path, data_key: str, dow
|
|
|
162
163
|
]
|
|
163
164
|
|
|
164
165
|
|
|
166
|
+
def _failed_message(data_key: str, status_json: dict) -> str:
|
|
167
|
+
"""/statusが返す"failed"レスポンスからメッセージを組み立てる。バックエンド(worker.py)が
|
|
168
|
+
失敗理由を"error"フィールドに書き込めていればそれを含める(具体的な原因をClaudeが
|
|
169
|
+
ユーザーに伝えたり、再試行の判断材料にできるようにするため)。無ければ(古いバージョンの
|
|
170
|
+
バックエンド、書き込み自体が失敗した等)従来通りの汎用メッセージにフォールバックする。"""
|
|
171
|
+
reason = status_json.get("error")
|
|
172
|
+
if reason:
|
|
173
|
+
return f"Map generation failed (dataKey={data_key}): {reason}"
|
|
174
|
+
return f"Map generation failed (dataKey={data_key}). Try a different location."
|
|
175
|
+
|
|
176
|
+
|
|
165
177
|
def _still_in_progress_result(data_key: str) -> list:
|
|
166
178
|
return [(
|
|
167
179
|
f"Map generation is still in progress (dataKey={data_key}). This can take a few "
|
|
@@ -175,9 +187,11 @@ def _still_in_progress_result(data_key: str) -> list:
|
|
|
175
187
|
async def _generate_map_common(body: dict, ctx: Context | None, label: str | None = None) -> list:
|
|
176
188
|
"""3つのgenerate_*ツール共通のenqueue→poll→download→結果構築フロー。
|
|
177
189
|
downloadUrl/editorUrlは/statusレスポンスに含まれるものをそのまま使う(自前で組み立てない)。
|
|
178
|
-
|
|
190
|
+
ダウンロードファイル名は、/statusレスポンスの"name"(バックエンドが決めたconfigDict.name。
|
|
191
|
+
quereq.py validate_and_prepare/_build_name参照)を優先して使う。呼び出し元がname引数を
|
|
179
192
|
明示していればbody["name"]としてバックエンドへ渡り、そのままconfigDict.nameになる。
|
|
180
|
-
省略時はバックエンド側がplace/markers/routeから同じ表示名を自動で導出する。
|
|
193
|
+
省略時はバックエンド側がplace/markers/routeから同じ表示名を自動で導出する。labelは
|
|
194
|
+
/statusにnameが含まれない場合(古いバックエンド等)だけのフォールバックとして使う。
|
|
181
195
|
常にformat="png"・デフォルトcolor_setでダウンロードする(別の見た目が欲しければ
|
|
182
196
|
redownload_mapで取り直す)。"""
|
|
183
197
|
async with httpx.AsyncClient() as client:
|
|
@@ -201,18 +215,16 @@ async def _generate_map_common(body: dict, ctx: Context | None, label: str | Non
|
|
|
201
215
|
status = status_json.get("status")
|
|
202
216
|
|
|
203
217
|
if status == "failed":
|
|
204
|
-
raise RuntimeError(
|
|
205
|
-
f"Map generation failed (dataKey={data_key}). "
|
|
206
|
-
"Try a different location."
|
|
207
|
-
)
|
|
218
|
+
raise RuntimeError(_failed_message(data_key, status_json))
|
|
208
219
|
if status == "pending":
|
|
209
220
|
return _still_in_progress_result(data_key)
|
|
210
221
|
|
|
211
222
|
# 3. Download(downloadUrl/editorUrlは/statusレスポンスに既に含まれている)
|
|
212
223
|
image_bytes = await _download(client, data_key, "png", None)
|
|
213
224
|
|
|
225
|
+
filename_base = status_json.get("name") or label or data_key
|
|
214
226
|
return _build_success_result(
|
|
215
|
-
image_bytes, _make_filename(
|
|
227
|
+
image_bytes, _make_filename(filename_base, "png"), data_key,
|
|
216
228
|
status_json["downloadUrl"], status_json["editorUrl"],
|
|
217
229
|
)
|
|
218
230
|
|
|
@@ -337,17 +349,15 @@ async def download_map(
|
|
|
337
349
|
status_json = await _poll_with_budget(client, data_key, POLL_BUDGET_SEC, ctx, sleep_first=False)
|
|
338
350
|
status = status_json.get("status")
|
|
339
351
|
if status == "failed":
|
|
340
|
-
raise RuntimeError(
|
|
341
|
-
f"Map generation failed (dataKey={data_key}). "
|
|
342
|
-
"Try a different location."
|
|
343
|
-
)
|
|
352
|
+
raise RuntimeError(_failed_message(data_key, status_json))
|
|
344
353
|
if status != "ready":
|
|
345
354
|
return _still_in_progress_result(data_key)
|
|
346
355
|
|
|
347
356
|
image_bytes = await _download(client, data_key, "png", None)
|
|
348
357
|
|
|
358
|
+
filename_base = status_json.get("name") or data_key
|
|
349
359
|
return _build_success_result(
|
|
350
|
-
image_bytes, _make_filename(
|
|
360
|
+
image_bytes, _make_filename(filename_base, "png"), data_key,
|
|
351
361
|
status_json["downloadUrl"], status_json["editorUrl"],
|
|
352
362
|
)
|
|
353
363
|
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"ColorSet": {
|
|
16
16
|
"type": "string",
|
|
17
17
|
"description": "カラーテーマ",
|
|
18
|
-
"enum": ["white", "darkBlue", "darkGreen", "popArt", "lightBlue", "lightGreen", "beige", "magenta", "gray", "black", "
|
|
18
|
+
"enum": ["white", "darkBlue", "darkGreen", "popArt", "lightBlue", "lightGreen", "beige", "magenta", "gray", "black", "brown"],
|
|
19
19
|
"default": "white"
|
|
20
20
|
},
|
|
21
21
|
"Format": {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|