@ikeytz/maps-mcp 1.0.7 → 1.0.8
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 +4 -0
- package/README.md +4 -4
- package/package.json +1 -1
- package/src/proxy.js +25 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.8
|
|
4
|
+
|
|
5
|
+
- CLI liest SSE (`event: message`) — Live `/mcp` antwortet so bei `Accept: text/event-stream`. Wie `@ikeytz/mcp`: CLI schickt `Accept: application/json`.
|
|
6
|
+
|
|
3
7
|
## 1.0.7
|
|
4
8
|
|
|
5
9
|
- README: Registry `com.ikeytz/maps` **v1.0.2** (was still v1.0.1 in the 1.0.6 tarball). Same 65 tools.
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ Official **terminal CLI** and **MCP stdio proxy** for [maps.ikeytz.com](https://
|
|
|
4
4
|
|
|
5
5
|
**Remote SSOT:** `https://maps.ikeytz.com/mcp`
|
|
6
6
|
**MCP Registry:** `com.ikeytz/maps` (v1.0.2)
|
|
7
|
-
**npm:** `@ikeytz/maps-mcp@1.0.
|
|
7
|
+
**npm:** `@ikeytz/maps-mcp@1.0.8`
|
|
8
8
|
**MCP scope (server):** read/link only · `ai-train: no`
|
|
9
9
|
**Auth:** public read-only MCP — no account, no API key · HTTPS POST to `/mcp`
|
|
10
10
|
**License:** proprietary — `LicenseRef-ikeytz-terms` (see [LICENSE](https://unpkg.com/@ikeytz/maps-mcp/LICENSE); install & use OK; no training)
|
|
@@ -20,7 +20,7 @@ Official **terminal CLI** and **MCP stdio proxy** for [maps.ikeytz.com](https://
|
|
|
20
20
|
| Version | `1.0.2` |
|
|
21
21
|
| Status | active |
|
|
22
22
|
| Website | https://maps.ikeytz.com |
|
|
23
|
-
| npm package | `@ikeytz/maps-mcp` **1.0.
|
|
23
|
+
| npm package | `@ikeytz/maps-mcp` **1.0.8** |
|
|
24
24
|
| Remote | Streamable HTTP `https://maps.ikeytz.com/mcp` |
|
|
25
25
|
| Card | https://maps.ikeytz.com/.well-known/mcp/server-card.json |
|
|
26
26
|
| Search | https://registry.modelcontextprotocol.io/v0.1/servers?search=com.ikeytz/maps |
|
|
@@ -35,7 +35,7 @@ Official **terminal CLI** and **MCP stdio proxy** for [maps.ikeytz.com](https://
|
|
|
35
35
|
{
|
|
36
36
|
"registryType": "npm",
|
|
37
37
|
"identifier": "@ikeytz/maps-mcp",
|
|
38
|
-
"version": "1.0.
|
|
38
|
+
"version": "1.0.8",
|
|
39
39
|
"runtimeHint": "npx",
|
|
40
40
|
"transport": { "type": "stdio" }
|
|
41
41
|
}
|
|
@@ -74,7 +74,7 @@ Install (Mac/Linux/Windows):
|
|
|
74
74
|
|
|
75
75
|
```bash
|
|
76
76
|
npm i -g @ikeytz/maps-mcp
|
|
77
|
-
ikeytz-maps-mcp --version # z. B. 1.0.
|
|
77
|
+
ikeytz-maps-mcp --version # z. B. 1.0.8
|
|
78
78
|
ikeytz-maps-mcp update # später: npm i -g @ikeytz/maps-mcp@latest
|
|
79
79
|
```
|
|
80
80
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ikeytz/maps-mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.8",
|
|
4
4
|
"mcpName": "com.ikeytz/maps",
|
|
5
5
|
"description": "Official CLI + MCP stdio proxy for maps.ikeytz.com — 42 www-command names + maps extras (Einsatzgebiet-Karten, prices/FAQ = www links) at https://maps.ikeytz.com/mcp",
|
|
6
6
|
"type": "module",
|
package/src/proxy.js
CHANGED
|
@@ -34,6 +34,27 @@ export function toolNames() {
|
|
|
34
34
|
return (CATALOG.tools || []).map((t) => t.name);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
+
function parseSseJson(body) {
|
|
38
|
+
const lines = String(body).split(/\r?\n/);
|
|
39
|
+
for (const line of lines) {
|
|
40
|
+
if (line.startsWith("data:")) {
|
|
41
|
+
const payload = line.slice(5).trim();
|
|
42
|
+
if (!payload || payload === "[DONE]") continue;
|
|
43
|
+
return JSON.parse(payload);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
throw new Error("SSE response had no data: line");
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function parseMcpBody(res, text) {
|
|
50
|
+
const ctype = (res.headers.get("content-type") || "").toLowerCase();
|
|
51
|
+
const raw = String(text || "");
|
|
52
|
+
if (ctype.includes("text/event-stream") || raw.trimStart().startsWith("event:")) {
|
|
53
|
+
return parseSseJson(raw);
|
|
54
|
+
}
|
|
55
|
+
return JSON.parse(raw);
|
|
56
|
+
}
|
|
57
|
+
|
|
37
58
|
export async function mapsRpc(method, params, { id = 1, sessionId, notification = false } = {}) {
|
|
38
59
|
const url = mapsMcpUrl();
|
|
39
60
|
if (url.includes("geo.ikeytz.com") || url.includes("www.ikeytz.com/mcp")) {
|
|
@@ -44,7 +65,7 @@ export async function mapsRpc(method, params, { id = 1, sessionId, notification
|
|
|
44
65
|
: { jsonrpc: "2.0", id, method, params: params || {} };
|
|
45
66
|
const headers = {
|
|
46
67
|
"Content-Type": "application/json",
|
|
47
|
-
Accept: "application/json
|
|
68
|
+
Accept: "application/json",
|
|
48
69
|
"MCP-Protocol-Version": mapsMcpProtocol(),
|
|
49
70
|
};
|
|
50
71
|
if (sessionId) headers["Mcp-Session-Id"] = sessionId;
|
|
@@ -58,7 +79,9 @@ export async function mapsRpc(method, params, { id = 1, sessionId, notification
|
|
|
58
79
|
if (notification) {
|
|
59
80
|
return { sessionId: nextSession, status: res.status, json: null };
|
|
60
81
|
}
|
|
61
|
-
const
|
|
82
|
+
const text = await res.text();
|
|
83
|
+
if (!text) return { sessionId: nextSession, status: res.status, json: null };
|
|
84
|
+
const json = parseMcpBody(res, text);
|
|
62
85
|
return { sessionId: nextSession, status: res.status, json };
|
|
63
86
|
}
|
|
64
87
|
|