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