@ikeytz/maps-mcp 1.0.3 → 1.0.4
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.
- package/CHANGELOG.md +5 -0
- package/README.md +11 -1
- package/package.json +1 -1
- package/src/cli.js +80 -10
- package/src/tools-catalog.json +107 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.4
|
|
4
|
+
|
|
5
|
+
- Legal tools: get_legal, Urheberrecht/Copyright/Impressum (maps text), AGB/Nutzung/Datenschutz/Widerruf (www URLs).
|
|
6
|
+
- CLI flags like www: `list` prints global flags, `list --global`, per-tool `-h` with args + `--show-mcp-command`.
|
|
7
|
+
|
|
3
8
|
## 1.0.3
|
|
4
9
|
|
|
5
10
|
- More maps-only commands: slugs, PLZ index, hub, embed, geo_api, Lage, Geschichte, Distanz, URL-resolve, Google-Maps-Paste.
|
package/README.md
CHANGED
|
@@ -38,7 +38,7 @@ Install (Mac/Linux/Windows):
|
|
|
38
38
|
|
|
39
39
|
```bash
|
|
40
40
|
npm i -g @ikeytz/maps-mcp
|
|
41
|
-
ikeytz-maps-mcp --version # z. B. 1.0.
|
|
41
|
+
ikeytz-maps-mcp --version # z. B. 1.0.4
|
|
42
42
|
ikeytz-maps-mcp update # später: npm i -g @ikeytz/maps-mcp@latest
|
|
43
43
|
```
|
|
44
44
|
|
|
@@ -98,6 +98,7 @@ ikeytz-maps-mcp # MCP stdio proxy (any MCP host) — keine Args
|
|
|
98
98
|
ikeytz-maps-mcp help # Usage + Flags (offline)
|
|
99
99
|
ikeytz-maps-mcp update [ver] # npm i -g @ikeytz/maps-mcp@latest
|
|
100
100
|
ikeytz-maps-mcp list # Tools (offline) + global CLI flags
|
|
101
|
+
ikeytz-maps-mcp list --global # nur globale Flags (wie ikeytz-mcp)
|
|
101
102
|
ikeytz-maps-mcp describe NAME # = ikeytz-maps-mcp NAME -h
|
|
102
103
|
ikeytz-maps-mcp call NAME … # oder: ikeytz-maps-mcp NAME …
|
|
103
104
|
```
|
|
@@ -112,6 +113,7 @@ ikeytz-maps-mcp call NAME … # oder: ikeytz-maps-mcp NAME …
|
|
|
112
113
|
| `--show-mcp-command` | curl 1a/1b/2 only |
|
|
113
114
|
| `--raw` | JSON structuredContent |
|
|
114
115
|
| `--json '{…}'` | Roh-Arguments |
|
|
116
|
+
| `list --global` | nur globale Flags (offline) |
|
|
115
117
|
|
|
116
118
|
## Geo-Tools — Payload (vom Server, CLI spiegelt 1:1)
|
|
117
119
|
|
|
@@ -156,6 +158,14 @@ Volltext Geo: `ikeytz-maps-mcp get_discovery --which llms-orte-geo`
|
|
|
156
158
|
| `distance_to_office` | `--slug` · `--lat` · `--lng` · `--icbm` |
|
|
157
159
|
| `resolve_maps_url` | `--url` |
|
|
158
160
|
| `find_by_google_maps` | `--q` (Koordinaten-Paste) |
|
|
161
|
+
| `get_legal` | `--doc*` urheberrecht\|copyright\|impressum\|agb\|nutzungsbedingungen\|datenschutz\|widerruf |
|
|
162
|
+
| `get_urheberrecht` | — (maps `/llms-urheberrecht.txt`) |
|
|
163
|
+
| `get_copyright` | — |
|
|
164
|
+
| `get_impressum` | — |
|
|
165
|
+
| `get_agb` | — (www-URL) |
|
|
166
|
+
| `get_nutzungsbedingungen` | — (www-URL) |
|
|
167
|
+
| `get_datenschutz` | — (www-URL) |
|
|
168
|
+
| `get_widerruf` | — (www-URL) |
|
|
159
169
|
|
|
160
170
|
Präfix immer `ikeytz-maps-mcp` (z. B. `ikeytz-maps-mcp find_by_plz --plz=71638`).
|
|
161
171
|
|
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -15,9 +15,70 @@ const TOOL_FLAGS = [
|
|
|
15
15
|
"lat",
|
|
16
16
|
"lng",
|
|
17
17
|
"radius_km",
|
|
18
|
+
"doc",
|
|
18
19
|
];
|
|
19
20
|
const NUMBER_FLAGS = new Set(["offset", "limit", "lat", "lng", "radius_km"]);
|
|
20
21
|
|
|
22
|
+
function globalCliFlagsLines() {
|
|
23
|
+
return [
|
|
24
|
+
"Global CLI flags (every tool — not sent to MCP)",
|
|
25
|
+
" -h, --help, -help per-tool help (offline)",
|
|
26
|
+
" --raw JSON structuredContent",
|
|
27
|
+
" --show-mcp-command curl 1a/1b/2 only — no MCP call (alias: --show-mcp-befehl)",
|
|
28
|
+
" --json '{…}' raw MCP arguments",
|
|
29
|
+
"",
|
|
30
|
+
"Default tool output payload only (no ok/tool/meta envelope)",
|
|
31
|
+
" --name=value --name value",
|
|
32
|
+
];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function exampleForTool(name) {
|
|
36
|
+
const examples = {
|
|
37
|
+
get_service_area: "ikeytz-maps-mcp get_service_area --slug=pattonville",
|
|
38
|
+
get_discovery: "ikeytz-maps-mcp get_discovery --which=llms-urheberrecht",
|
|
39
|
+
find_by_plz: "ikeytz-maps-mcp find_by_plz --plz=71638",
|
|
40
|
+
get_legal: "ikeytz-maps-mcp get_legal --doc=urheberrecht",
|
|
41
|
+
get_urheberrecht: "ikeytz-maps-mcp get_urheberrecht",
|
|
42
|
+
get_agb: "ikeytz-maps-mcp get_agb",
|
|
43
|
+
get_nutzungsbedingungen: "ikeytz-maps-mcp get_nutzungsbedingungen",
|
|
44
|
+
get_lage: "ikeytz-maps-mcp get_lage --slug=pattonville",
|
|
45
|
+
};
|
|
46
|
+
return examples[name] || `ikeytz-maps-mcp ${name}`;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function formatToolHelp(tool) {
|
|
50
|
+
const schema = tool.inputSchema || { type: "object", properties: {} };
|
|
51
|
+
const props = schema.properties || {};
|
|
52
|
+
const req = new Set(schema.required || []);
|
|
53
|
+
const lines = [tool.name, tool.description || "", "", "Arguments"];
|
|
54
|
+
const keys = Object.keys(props);
|
|
55
|
+
if (!keys.length) {
|
|
56
|
+
lines.push(" (none)");
|
|
57
|
+
} else {
|
|
58
|
+
for (const key of keys) {
|
|
59
|
+
const p = props[key] || {};
|
|
60
|
+
const type = p.enum ? p.enum.join("|") : p.type || "any";
|
|
61
|
+
const star = req.has(key) ? "*" : " ";
|
|
62
|
+
lines.push(` ${star} --${key.padEnd(16)} ${type}`);
|
|
63
|
+
}
|
|
64
|
+
if (req.size) {
|
|
65
|
+
lines.push("");
|
|
66
|
+
lines.push(" * required");
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
lines.push("");
|
|
70
|
+
lines.push("CLI flags (not sent to MCP)");
|
|
71
|
+
lines.push(" -h, --help, -help this help (offline, no MCP call)");
|
|
72
|
+
lines.push(" --raw JSON structuredContent");
|
|
73
|
+
lines.push(" --show-mcp-command curl 1a/1b/2 only — no MCP call (alias: --show-mcp-befehl)");
|
|
74
|
+
lines.push("");
|
|
75
|
+
lines.push("Examples");
|
|
76
|
+
lines.push(` ${exampleForTool(tool.name)}`);
|
|
77
|
+
lines.push(` ikeytz-maps-mcp ${tool.name} -h`);
|
|
78
|
+
lines.push(` ikeytz-maps-mcp ${tool.name} --show-mcp-command`);
|
|
79
|
+
return `${lines.join("\n")}\n`;
|
|
80
|
+
}
|
|
81
|
+
|
|
21
82
|
const HELP = `ikeytz-maps-mcp ${packageVersion()}
|
|
22
83
|
Remote: ${mapsMcpUrl()}
|
|
23
84
|
Nur maps. Nicht @ikeytz/mcp / www.
|
|
@@ -25,16 +86,19 @@ Nur maps. Nicht @ikeytz/mcp / www.
|
|
|
25
86
|
Ohne Args stdio-Proxy (Cursor/Claude)
|
|
26
87
|
help | --help diese Hilfe
|
|
27
88
|
--version Version
|
|
28
|
-
update
|
|
29
|
-
list ${toolNames().length} Tools (offline)
|
|
30
|
-
|
|
89
|
+
update [ver] npm i -g @ikeytz/maps-mcp@latest
|
|
90
|
+
list ${toolNames().length} Tools (offline) + global CLI flags
|
|
91
|
+
list --global nur globale CLI-Flags (offline)
|
|
92
|
+
describe <tool> Args + Flags + Beispiele (offline)
|
|
31
93
|
call <tool> … wie <tool> …
|
|
32
94
|
<tool> Payload von maps /mcp
|
|
33
|
-
<tool> -h Args (offline)
|
|
95
|
+
<tool> -h Args + CLI-Flags (offline)
|
|
34
96
|
<tool> --show-mcp-command | --show-mcp-befehl
|
|
35
|
-
<tool> --raw
|
|
97
|
+
<tool> --raw JSON structuredContent
|
|
36
98
|
<tool> --json '{…}'
|
|
37
99
|
|
|
100
|
+
${globalCliFlagsLines().join("\n")}
|
|
101
|
+
|
|
38
102
|
Tools:
|
|
39
103
|
${toolNames()
|
|
40
104
|
.map((n) => ` ${n}`)
|
|
@@ -47,7 +111,8 @@ function parseArgv(argv) {
|
|
|
47
111
|
for (let i = 0; i < argv.length; i++) {
|
|
48
112
|
const a = argv[i];
|
|
49
113
|
if (a === "--raw") flags.raw = true;
|
|
50
|
-
else if (a === "
|
|
114
|
+
else if (a === "--global") flags.global = true;
|
|
115
|
+
else if (a === "-h" || a === "--help" || a === "-help") flags.help = true;
|
|
51
116
|
else if (a === "--version") flags.version = true;
|
|
52
117
|
else if (a === "--show-mcp-command" || a === "--show-mcp-befehl") flags.showMcp = true;
|
|
53
118
|
else if (a === "--json") flags.json = argv[++i] || "";
|
|
@@ -192,14 +257,19 @@ export async function main(argv) {
|
|
|
192
257
|
return;
|
|
193
258
|
}
|
|
194
259
|
if (cmd === "update") {
|
|
260
|
+
const ver = positionals[1] ? String(positionals[1]).replace(/^@/, "") : "latest";
|
|
195
261
|
await new Promise((resolve, reject) => {
|
|
196
|
-
const child = spawn("npm", ["i", "-g",
|
|
262
|
+
const child = spawn("npm", ["i", "-g", `@ikeytz/maps-mcp@${ver}`], { stdio: "inherit" });
|
|
197
263
|
child.on("exit", (code) => (code === 0 ? resolve() : reject(new Error(`npm exit ${code}`))));
|
|
198
264
|
});
|
|
199
265
|
return;
|
|
200
266
|
}
|
|
201
267
|
if (cmd === "list") {
|
|
202
|
-
|
|
268
|
+
if (flags.global) {
|
|
269
|
+
process.stdout.write(`${globalCliFlagsLines().join("\n")}\n`);
|
|
270
|
+
return;
|
|
271
|
+
}
|
|
272
|
+
process.stdout.write(`${toolNames().join("\n")}\n\n${globalCliFlagsLines().join("\n")}\n`);
|
|
203
273
|
return;
|
|
204
274
|
}
|
|
205
275
|
if (cmd === "describe") {
|
|
@@ -210,7 +280,7 @@ export async function main(argv) {
|
|
|
210
280
|
process.exitCode = 1;
|
|
211
281
|
return;
|
|
212
282
|
}
|
|
213
|
-
process.stdout.write(
|
|
283
|
+
process.stdout.write(formatToolHelp(tool));
|
|
214
284
|
return;
|
|
215
285
|
}
|
|
216
286
|
|
|
@@ -223,7 +293,7 @@ export async function main(argv) {
|
|
|
223
293
|
return;
|
|
224
294
|
}
|
|
225
295
|
if (flags.help) {
|
|
226
|
-
process.stdout.write(
|
|
296
|
+
process.stdout.write(formatToolHelp(tool));
|
|
227
297
|
return;
|
|
228
298
|
}
|
|
229
299
|
const args = argsFromFlags(flags);
|
package/src/tools-catalog.json
CHANGED
|
@@ -432,6 +432,113 @@
|
|
|
432
432
|
}
|
|
433
433
|
}
|
|
434
434
|
}
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
"name": "get_legal",
|
|
438
|
+
"description": "Legal: urheberrecht|copyright|impressum (maps-Text) oder agb|nutzungsbedingungen|datenschutz|widerruf (www-URL).",
|
|
439
|
+
"inputSchema": {
|
|
440
|
+
"type": "object",
|
|
441
|
+
"properties": {
|
|
442
|
+
"doc": {
|
|
443
|
+
"type": "string",
|
|
444
|
+
"enum": [
|
|
445
|
+
"urheberrecht",
|
|
446
|
+
"copyright",
|
|
447
|
+
"impressum",
|
|
448
|
+
"agb",
|
|
449
|
+
"nutzungsbedingungen",
|
|
450
|
+
"datenschutz",
|
|
451
|
+
"widerruf"
|
|
452
|
+
]
|
|
453
|
+
},
|
|
454
|
+
"offset": {
|
|
455
|
+
"type": "integer"
|
|
456
|
+
},
|
|
457
|
+
"limit": {
|
|
458
|
+
"type": "integer"
|
|
459
|
+
}
|
|
460
|
+
},
|
|
461
|
+
"required": [
|
|
462
|
+
"doc"
|
|
463
|
+
]
|
|
464
|
+
}
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
"name": "get_urheberrecht",
|
|
468
|
+
"description": "Karten-Urheberrecht: maps /llms-urheberrecht.txt (HTML auf www).",
|
|
469
|
+
"inputSchema": {
|
|
470
|
+
"type": "object",
|
|
471
|
+
"properties": {
|
|
472
|
+
"offset": {
|
|
473
|
+
"type": "integer"
|
|
474
|
+
},
|
|
475
|
+
"limit": {
|
|
476
|
+
"type": "integer"
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
"name": "get_copyright",
|
|
483
|
+
"description": "Karten-Copyright EN: maps /llms-copyright.txt.",
|
|
484
|
+
"inputSchema": {
|
|
485
|
+
"type": "object",
|
|
486
|
+
"properties": {
|
|
487
|
+
"offset": {
|
|
488
|
+
"type": "integer"
|
|
489
|
+
},
|
|
490
|
+
"limit": {
|
|
491
|
+
"type": "integer"
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
"name": "get_impressum",
|
|
498
|
+
"description": "Impressum/Kontakt-Text: maps /llms-impressum-kontakt.txt.",
|
|
499
|
+
"inputSchema": {
|
|
500
|
+
"type": "object",
|
|
501
|
+
"properties": {
|
|
502
|
+
"offset": {
|
|
503
|
+
"type": "integer"
|
|
504
|
+
},
|
|
505
|
+
"limit": {
|
|
506
|
+
"type": "integer"
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
},
|
|
511
|
+
{
|
|
512
|
+
"name": "get_agb",
|
|
513
|
+
"description": "AGB: Link www.ikeytz.com/agb (HTML bleibt www, kein Preise-Corpus).",
|
|
514
|
+
"inputSchema": {
|
|
515
|
+
"type": "object",
|
|
516
|
+
"properties": {}
|
|
517
|
+
}
|
|
518
|
+
},
|
|
519
|
+
{
|
|
520
|
+
"name": "get_nutzungsbedingungen",
|
|
521
|
+
"description": "Nutzungsbedingungen: Link www (HTML bleibt www).",
|
|
522
|
+
"inputSchema": {
|
|
523
|
+
"type": "object",
|
|
524
|
+
"properties": {}
|
|
525
|
+
}
|
|
526
|
+
},
|
|
527
|
+
{
|
|
528
|
+
"name": "get_datenschutz",
|
|
529
|
+
"description": "Datenschutz: Link www (HTML bleibt www).",
|
|
530
|
+
"inputSchema": {
|
|
531
|
+
"type": "object",
|
|
532
|
+
"properties": {}
|
|
533
|
+
}
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
"name": "get_widerruf",
|
|
537
|
+
"description": "Widerruf: Link www (HTML bleibt www).",
|
|
538
|
+
"inputSchema": {
|
|
539
|
+
"type": "object",
|
|
540
|
+
"properties": {}
|
|
541
|
+
}
|
|
435
542
|
}
|
|
436
543
|
]
|
|
437
544
|
}
|