@cyanheads/cyanheads-mcp-server 0.4.2 → 0.4.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/AGENTS.md +14 -13
- package/CLAUDE.md +14 -13
- package/Dockerfile +41 -29
- package/README.md +40 -22
- package/changelog/0.4.x/0.4.3.md +34 -0
- package/changelog/0.4.x/0.4.4.md +36 -0
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/mcp-server/tools/definitions/describe-entry.tool.d.ts +34 -2
- package/dist/mcp-server/tools/definitions/describe-entry.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/describe-entry.tool.js +151 -106
- package/dist/mcp-server/tools/definitions/describe-entry.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/search-catalog.tool.d.ts +14 -0
- package/dist/mcp-server/tools/definitions/search-catalog.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/search-catalog.tool.js +103 -23
- package/dist/mcp-server/tools/definitions/search-catalog.tool.js.map +1 -1
- package/dist/services/catalog/catalog-service.d.ts +12 -9
- package/dist/services/catalog/catalog-service.d.ts.map +1 -1
- package/dist/services/catalog/catalog-service.js +98 -25
- package/dist/services/catalog/catalog-service.js.map +1 -1
- package/dist/services/catalog/remote-catalog-provider.d.ts +2 -2
- package/dist/services/catalog/remote-catalog-provider.d.ts.map +1 -1
- package/dist/services/catalog/remote-catalog-provider.js +34 -5
- package/dist/services/catalog/remote-catalog-provider.js.map +1 -1
- package/dist/services/catalog/self-record.js +5 -5
- package/dist/services/catalog/snippets.d.ts.map +1 -1
- package/dist/services/catalog/snippets.js +50 -18
- package/dist/services/catalog/snippets.js.map +1 -1
- package/dist/services/catalog/types.d.ts +29 -14
- package/dist/services/catalog/types.d.ts.map +1 -1
- package/dist/services/catalog/types.js +12 -3
- package/dist/services/catalog/types.js.map +1 -1
- package/manifest.json +1 -1
- package/package.json +15 -14
- package/server.json +11 -13
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview RemoteJsonCatalogProvider — fetches and validates the fleet.json
|
|
3
|
-
* payload (schema v2, with baked embeddings) from a configurable URL.
|
|
4
|
-
*
|
|
3
|
+
* payload (schema v2, with baked embeddings) from a configurable URL. Normalizes
|
|
4
|
+
* duplicate identities before CatalogService builds and caches the index.
|
|
5
5
|
* @module services/catalog/remote-catalog-provider
|
|
6
6
|
*/
|
|
7
|
+
import { isDeepStrictEqual } from 'node:util';
|
|
7
8
|
import { z } from '@cyanheads/mcp-ts-core';
|
|
8
9
|
import { internalError, McpError } from '@cyanheads/mcp-ts-core/errors';
|
|
9
|
-
import { fetchWithTimeout, requestContextService } from '@cyanheads/mcp-ts-core/utils';
|
|
10
|
+
import { fetchWithTimeout, logger, requestContextService } from '@cyanheads/mcp-ts-core/utils';
|
|
10
11
|
// ---------------------------------------------------------------------------
|
|
11
12
|
// Validation schema (v2)
|
|
12
13
|
// ---------------------------------------------------------------------------
|
|
@@ -36,7 +37,7 @@ const FleetPayloadSchema = z.object({
|
|
|
36
37
|
embeddingModel: z.string(),
|
|
37
38
|
embeddingDims: z.number().int().positive(),
|
|
38
39
|
embeddingQueryPrefix: z.string(),
|
|
39
|
-
servers: z.array(CatalogRecordSchema),
|
|
40
|
+
servers: z.array(CatalogRecordSchema).min(1),
|
|
40
41
|
});
|
|
41
42
|
// ---------------------------------------------------------------------------
|
|
42
43
|
// Provider
|
|
@@ -77,7 +78,35 @@ export class RemoteJsonCatalogProvider {
|
|
|
77
78
|
issues: parsed.error.issues.slice(0, 5),
|
|
78
79
|
});
|
|
79
80
|
}
|
|
80
|
-
|
|
81
|
+
const payload = parsed.data;
|
|
82
|
+
let collapsed = 0;
|
|
83
|
+
const identities = [];
|
|
84
|
+
function unique(records, owner) {
|
|
85
|
+
const byName = new Map();
|
|
86
|
+
for (const record of records) {
|
|
87
|
+
const previous = byName.get(record.name);
|
|
88
|
+
if (!previous) {
|
|
89
|
+
byName.set(record.name, record);
|
|
90
|
+
}
|
|
91
|
+
else if (!isDeepStrictEqual(previous, record)) {
|
|
92
|
+
throw internalError(`Conflicting catalog records for ${owner}/${record.name}.`);
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
collapsed++;
|
|
96
|
+
if (identities.length < 10)
|
|
97
|
+
identities.push(`${owner}/${record.name}`.slice(0, 160));
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
return [...byName.values()];
|
|
101
|
+
}
|
|
102
|
+
const servers = unique(payload.servers.map((server) => ({
|
|
103
|
+
...server,
|
|
104
|
+
tools: unique(server.tools, server.name),
|
|
105
|
+
})), 'servers');
|
|
106
|
+
if (collapsed) {
|
|
107
|
+
logger.warning(`Collapsed ${collapsed} identical catalog records: ${JSON.stringify(identities)}`);
|
|
108
|
+
}
|
|
109
|
+
return { ...payload, servers };
|
|
81
110
|
}
|
|
82
111
|
}
|
|
83
112
|
//# sourceMappingURL=remote-catalog-provider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote-catalog-provider.js","sourceRoot":"","sources":["../../../src/services/catalog/remote-catalog-provider.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"remote-catalog-provider.js","sourceRoot":"","sources":["../../../src/services/catalog/remote-catalog-provider.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,gBAAgB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CAAC,IAAI,GAAG,CAAC,CAAC;gBAClF,CAAC;qBAAM,CAAC;oBACN,SAAS,EAAE,CAAC;oBACZ,IAAI,UAAU,CAAC,MAAM,GAAG,EAAE;wBAAE,UAAU,CAAC,IAAI,CAAC,GAAG,KAAK,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;gBACvF,CAAC;YACH,CAAC;YACD,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;QAC9B,CAAC;QACD,MAAM,OAAO,GAAG,MAAM,CACpB,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;YAC/B,GAAG,MAAM;YACT,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC;SACzC,CAAC,CAAC,EACH,SAAS,CACV,CAAC;QACF,IAAI,SAAS,EAAE,CAAC;YACd,MAAM,CAAC,OAAO,CACZ,aAAa,SAAS,+BAA+B,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,EAAE,CAClF,CAAC;QACJ,CAAC;QACD,OAAO,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE,CAAC;IACjC,CAAC;CACF"}
|
|
@@ -36,12 +36,12 @@ function readSelfPackage() {
|
|
|
36
36
|
*
|
|
37
37
|
* `embedding: []` is deliberate and safe. The vector index is built solely from
|
|
38
38
|
* `FleetPayload.servers` in `CatalogService._buildIndex`, which sizes its packed
|
|
39
|
-
* Float32Arrays from that payload and
|
|
40
|
-
* This record is never a member of that payload — it is consulted only
|
|
41
|
-
*
|
|
42
|
-
* packed,
|
|
39
|
+
* Float32Arrays from that payload and validates and normalizes every vector it
|
|
40
|
+
* packs. This record is never a member of that payload — it is consulted only
|
|
41
|
+
* after a remote-name miss in `getServer()` / `getTool()` — so its embedding is
|
|
42
|
+
* never packed, normalized, or dot-producted. The tradeoff is that
|
|
43
43
|
* `cyanheads_search_catalog` will not surface this server as a semantic match;
|
|
44
|
-
* only
|
|
44
|
+
* only name resolution (exact or unique case-insensitive) reaches it.
|
|
45
45
|
*/
|
|
46
46
|
function selfTools() {
|
|
47
47
|
return [searchCatalogTool, describeEntryTool].map((definition) => ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snippets.d.ts","sourceRoot":"","sources":["../../../src/services/catalog/snippets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"snippets.d.ts","sourceRoot":"","sources":["../../../src/services/catalog/snippets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAqOhE;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,aAAa,GAAG,cAAc,EAAE,CAOxE"}
|
|
@@ -13,8 +13,13 @@
|
|
|
13
13
|
* transport tag is never emitted.
|
|
14
14
|
* @module services/catalog/snippets
|
|
15
15
|
*/
|
|
16
|
-
/**
|
|
17
|
-
|
|
16
|
+
/**
|
|
17
|
+
* Protocol version in the curl probe's legacy `initialize` body: the latest
|
|
18
|
+
* revision that opens with `initialize`. The probe sends no `MCP-Protocol-Version`
|
|
19
|
+
* header — the spec requires it only after initialization, and a 2026-era header
|
|
20
|
+
* on an `initialize` is rejected as a header/body mismatch.
|
|
21
|
+
*/
|
|
22
|
+
const CURL_INITIALIZE_PROTOCOL_VERSION = '2025-11-25';
|
|
18
23
|
/**
|
|
19
24
|
* `env` block for a JSON config snippet — one empty-valued key per required var.
|
|
20
25
|
* Returns nothing to spread when the server needs no configuration, so the `env`
|
|
@@ -29,6 +34,19 @@ function envBlock(record) {
|
|
|
29
34
|
// ---------------------------------------------------------------------------
|
|
30
35
|
// Local (stdio) factories — built from record.npm via `npx -y <pkg>`
|
|
31
36
|
// ---------------------------------------------------------------------------
|
|
37
|
+
/** `mcpServers` JSON with an explicit `type: 'stdio'` — the local shape Cline and Claude Desktop both load. */
|
|
38
|
+
function typedStdioConfig(record) {
|
|
39
|
+
return JSON.stringify({
|
|
40
|
+
mcpServers: {
|
|
41
|
+
[record.name]: {
|
|
42
|
+
type: 'stdio',
|
|
43
|
+
command: 'npx',
|
|
44
|
+
args: ['-y', record.npm],
|
|
45
|
+
...envBlock(record),
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
}, null, 2);
|
|
49
|
+
}
|
|
32
50
|
function claudeCodeStdio(record) {
|
|
33
51
|
return {
|
|
34
52
|
client: 'claude-code',
|
|
@@ -37,6 +55,14 @@ function claudeCodeStdio(record) {
|
|
|
37
55
|
payload: `claude mcp add --transport stdio ${record.name} -- npx -y ${record.npm}`,
|
|
38
56
|
};
|
|
39
57
|
}
|
|
58
|
+
function clineStdio(record) {
|
|
59
|
+
return {
|
|
60
|
+
client: 'cline',
|
|
61
|
+
transport: 'stdio',
|
|
62
|
+
label: 'Cline (cline_mcp_settings.json)',
|
|
63
|
+
payload: typedStdioConfig(record),
|
|
64
|
+
};
|
|
65
|
+
}
|
|
40
66
|
function codexStdio(record) {
|
|
41
67
|
return {
|
|
42
68
|
client: 'codex',
|
|
@@ -65,22 +91,13 @@ function geminiStdio(record) {
|
|
|
65
91
|
payload: `gemini mcp add ${record.name} npx -y ${record.npm}`,
|
|
66
92
|
};
|
|
67
93
|
}
|
|
68
|
-
/** Generic `mcpServers` JSON (stdio) for Claude Desktop
|
|
94
|
+
/** Generic `mcpServers` JSON (stdio) for Claude Desktop and other MCP clients. */
|
|
69
95
|
function genericStdio(record) {
|
|
70
96
|
return {
|
|
71
97
|
client: 'streamable-http',
|
|
72
98
|
transport: 'stdio',
|
|
73
|
-
label: 'Claude Desktop /
|
|
74
|
-
payload:
|
|
75
|
-
mcpServers: {
|
|
76
|
-
[record.name]: {
|
|
77
|
-
type: 'stdio',
|
|
78
|
-
command: 'npx',
|
|
79
|
-
args: ['-y', record.npm],
|
|
80
|
-
...envBlock(record),
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
}, null, 2),
|
|
99
|
+
label: 'Claude Desktop / generic',
|
|
100
|
+
payload: typedStdioConfig(record),
|
|
84
101
|
};
|
|
85
102
|
}
|
|
86
103
|
// ---------------------------------------------------------------------------
|
|
@@ -94,6 +111,15 @@ function claudeCodeHttp(record, endpoint) {
|
|
|
94
111
|
payload: `claude mcp add --transport http ${record.name} ${endpoint}`,
|
|
95
112
|
};
|
|
96
113
|
}
|
|
114
|
+
/** Cline reads Streamable HTTP only under `type: 'streamableHttp'`; a URL entry with no `type` falls back to SSE. */
|
|
115
|
+
function clineHttp(record, endpoint) {
|
|
116
|
+
return {
|
|
117
|
+
client: 'cline',
|
|
118
|
+
transport: 'http',
|
|
119
|
+
label: 'Cline (cline_mcp_settings.json)',
|
|
120
|
+
payload: JSON.stringify({ mcpServers: { [record.name]: { type: 'streamableHttp', url: endpoint } } }, null, 2),
|
|
121
|
+
};
|
|
122
|
+
}
|
|
97
123
|
function codexHttp(record, endpoint) {
|
|
98
124
|
return {
|
|
99
125
|
client: 'codex',
|
|
@@ -116,7 +142,7 @@ function curlHttp(_record, endpoint) {
|
|
|
116
142
|
id: 1,
|
|
117
143
|
method: 'initialize',
|
|
118
144
|
params: {
|
|
119
|
-
protocolVersion:
|
|
145
|
+
protocolVersion: CURL_INITIALIZE_PROTOCOL_VERSION,
|
|
120
146
|
capabilities: {},
|
|
121
147
|
clientInfo: { name: 'curl', version: '1.0.0' },
|
|
122
148
|
},
|
|
@@ -128,7 +154,7 @@ function curlHttp(_record, endpoint) {
|
|
|
128
154
|
payload: [
|
|
129
155
|
`curl -X POST ${endpoint} \\`,
|
|
130
156
|
` -H "Content-Type: application/json" \\`,
|
|
131
|
-
` -H "
|
|
157
|
+
` -H "Accept: application/json, text/event-stream" \\`,
|
|
132
158
|
` -d '${body}'`,
|
|
133
159
|
].join('\n'),
|
|
134
160
|
};
|
|
@@ -141,18 +167,23 @@ function geminiHttp(record, endpoint) {
|
|
|
141
167
|
payload: `gemini mcp add --transport http ${record.name} ${endpoint}`,
|
|
142
168
|
};
|
|
143
169
|
}
|
|
144
|
-
/**
|
|
170
|
+
/**
|
|
171
|
+
* Generic `mcpServers` JSON (Streamable HTTP, `type: 'http'`). Its label names no
|
|
172
|
+
* client: Claude Desktop adds remote servers through its Connectors settings rather
|
|
173
|
+
* than this file, and Cline needs the `streamableHttp` type its own snippet carries.
|
|
174
|
+
*/
|
|
145
175
|
function genericHttp(record, endpoint) {
|
|
146
176
|
return {
|
|
147
177
|
client: 'streamable-http',
|
|
148
178
|
transport: 'http',
|
|
149
|
-
label: '
|
|
179
|
+
label: 'Generic (mcpServers JSON)',
|
|
150
180
|
payload: JSON.stringify({ mcpServers: { [record.name]: { type: 'http', url: endpoint } } }, null, 2),
|
|
151
181
|
};
|
|
152
182
|
}
|
|
153
183
|
/** Local (stdio) factories, in render order. One per client that supports a local install. */
|
|
154
184
|
const STDIO_FACTORIES = [
|
|
155
185
|
claudeCodeStdio,
|
|
186
|
+
clineStdio,
|
|
156
187
|
codexStdio,
|
|
157
188
|
cursorStdio,
|
|
158
189
|
geminiStdio,
|
|
@@ -161,6 +192,7 @@ const STDIO_FACTORIES = [
|
|
|
161
192
|
/** Remote (HTTP) factories, in render order. Emitted only when the record has an endpoint. */
|
|
162
193
|
const HTTP_FACTORIES = [
|
|
163
194
|
claudeCodeHttp,
|
|
195
|
+
clineHttp,
|
|
164
196
|
codexHttp,
|
|
165
197
|
cursorHttp,
|
|
166
198
|
curlHttp,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snippets.js","sourceRoot":"","sources":["../../../src/services/catalog/snippets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAUH
|
|
1
|
+
{"version":3,"file":"snippets.js","sourceRoot":"","sources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AC,MAAqB;IACpD,MAAM,QAAQ,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;IACnE,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;QACpB,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;QACjC,KAAK,MAAM,OAAO,IAAI,cAAc;YAAE,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;IACjF,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Shared types for the catalog service — CatalogRecord, CatalogTool,
|
|
3
|
-
* FleetPayload (v2 with baked embeddings), InstallSnippet,
|
|
4
|
-
* and the service interface.
|
|
3
|
+
* CatalogToolEntry, FleetPayload (v2 with baked embeddings), InstallSnippet,
|
|
4
|
+
* ClientId with its CLIENT_IDS list, and the service interface.
|
|
5
5
|
* @module services/catalog/types
|
|
6
6
|
*/
|
|
7
|
-
/** Supported MCP client identifiers for install snippets. */
|
|
8
|
-
export
|
|
7
|
+
/** Supported MCP client identifiers for install snippets — the one list the tool schemas enumerate. */
|
|
8
|
+
export declare const CLIENT_IDS: readonly ['claude-code', 'cline', 'codex', 'cursor', 'curl', 'gemini', 'streamable-http'];
|
|
9
|
+
/** Supported MCP client identifier for install snippets. */
|
|
10
|
+
export type ClientId = (typeof CLIENT_IDS)[number];
|
|
9
11
|
/** Catalog category for a fleet server. */
|
|
10
12
|
export type CatalogCategory = 'research' | 'government' | 'public-data' | 'utility';
|
|
11
13
|
/** Single tool entry inside a CatalogRecord. */
|
|
@@ -13,13 +15,19 @@ export interface CatalogTool {
|
|
|
13
15
|
/** Human-readable description. */
|
|
14
16
|
description: string;
|
|
15
17
|
/**
|
|
16
|
-
*
|
|
17
|
-
* Length matches FleetPayload.embeddingDims.
|
|
18
|
+
* Matryoshka-truncated embedding vector, L2-normalized by the producer.
|
|
19
|
+
* Length matches FleetPayload.embeddingDims. The service normalizes it in
|
|
20
|
+
* float64 at load and rejects a payload whose vector is all zeros; schema
|
|
21
|
+
* validation rejects a non-finite component.
|
|
18
22
|
*/
|
|
19
23
|
embedding: number[];
|
|
20
24
|
/** Fully-qualified name: snake_case (e.g. "earthquake_search"). */
|
|
21
25
|
name: string;
|
|
22
26
|
}
|
|
27
|
+
/** One tool row with the server record that owns it. */
|
|
28
|
+
export type CatalogToolEntry = CatalogTool & {
|
|
29
|
+
serverRecord: CatalogRecord;
|
|
30
|
+
};
|
|
23
31
|
/** Per-client install snippet for one transport. */
|
|
24
32
|
export interface InstallSnippet {
|
|
25
33
|
/** MCP client identifier. */
|
|
@@ -29,11 +37,12 @@ export interface InstallSnippet {
|
|
|
29
37
|
/**
|
|
30
38
|
* The install payload. Shape varies by client and transport:
|
|
31
39
|
* - claude-code: CLI — stdio `claude mcp add --transport stdio <name> -- npx -y <pkg>`; http `claude mcp add --transport http <name> <url>`
|
|
40
|
+
* - cline: `cline_mcp_settings.json` JSON — stdio `{ type: 'stdio', command, args }`; http `{ type: 'streamableHttp', url }`
|
|
32
41
|
* - codex: CLI — stdio `codex mcp add <name> -- npx -y <pkg>`; http `codex mcp add <name> --url <url>`
|
|
33
42
|
* - cursor: `mcpServers` JSON, no `type` field — stdio `{ command, args }`; http `{ url }`
|
|
34
43
|
* - gemini: CLI — stdio `gemini mcp add <name> npx -y <pkg>`; http `gemini mcp add --transport http <name> <url>`
|
|
35
44
|
* - streamable-http: generic `mcpServers` JSON with `type` — stdio `{ type: 'stdio', command, args }`; http `{ type: 'http', url }`
|
|
36
|
-
* - curl: http only — `initialize` connectivity probe against the endpoint
|
|
45
|
+
* - curl: http only — legacy `initialize` connectivity probe against the endpoint
|
|
37
46
|
*/
|
|
38
47
|
payload: string;
|
|
39
48
|
/**
|
|
@@ -57,8 +66,9 @@ export interface CatalogRecord {
|
|
|
57
66
|
/** Human label (e.g. "arXiv"). */
|
|
58
67
|
displayName: string;
|
|
59
68
|
/**
|
|
60
|
-
*
|
|
61
|
-
*
|
|
69
|
+
* Matryoshka-truncated embedding vector of `${displayName}\n${description}`,
|
|
70
|
+
* L2-normalized by the producer. Length matches FleetPayload.embeddingDims.
|
|
71
|
+
* Normalized in float64 at load, like each tool vector.
|
|
62
72
|
*/
|
|
63
73
|
embedding: number[];
|
|
64
74
|
/**
|
|
@@ -116,12 +126,17 @@ export interface CatalogSearchResult {
|
|
|
116
126
|
}
|
|
117
127
|
/** Service interface. */
|
|
118
128
|
export interface ICatalogService {
|
|
119
|
-
/**
|
|
129
|
+
/** Exact remote name, then unique case-insensitive remote name, then self fallback. Ambiguous folds return null. */
|
|
120
130
|
getServer(name: string): CatalogRecord | null;
|
|
121
|
-
/**
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
131
|
+
/**
|
|
132
|
+
* Every tool row the name resolves to, in payload order. Without `server`:
|
|
133
|
+
* every owner of the exact name, else every owner of a case-insensitive
|
|
134
|
+
* match that has one spelling, else the self tool. Case-insensitive matches
|
|
135
|
+
* with several spellings return none. With `server` (resolved like
|
|
136
|
+
* `getServer`): that owner's exact name, else its unique case-insensitive
|
|
137
|
+
* match, else the self tool when the owner is this server.
|
|
138
|
+
*/
|
|
139
|
+
getTool(name: string, server?: string): CatalogToolEntry[];
|
|
125
140
|
/**
|
|
126
141
|
* Fetch fleet.json, validate, build the vector index, and load the embedding model.
|
|
127
142
|
* Starts the background refresh timer if configured.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/services/catalog/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/services/catalog/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,uGAAuG;AACvG,eAAO,MAAM,UAAU,YACrB,aAAa,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AC;QAC3B,QAAQ,CAAC,EAAE,eAAe,CAAC;QAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,GAAG,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAAC;IAEnC,yCAAyC;IACzC,QAAQ,IAAI,IAAI,CAAC;IAEjB,uCAAuC;IACvC,KAAK,IAAI;QACP,SAAS,EAAE,MAAM,CAAC;QAClB,WAAW,EAAE,MAAM,CAAC;QACpB,aAAa,EAAE,MAAM,CAAC;QACtB,cAAc,EAAE,MAAM,CAAC;KACxB,CAAC;CACH"}
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Shared types for the catalog service — CatalogRecord, CatalogTool,
|
|
3
|
-
* FleetPayload (v2 with baked embeddings), InstallSnippet,
|
|
4
|
-
* and the service interface.
|
|
3
|
+
* CatalogToolEntry, FleetPayload (v2 with baked embeddings), InstallSnippet,
|
|
4
|
+
* ClientId with its CLIENT_IDS list, and the service interface.
|
|
5
5
|
* @module services/catalog/types
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
/** Supported MCP client identifiers for install snippets — the one list the tool schemas enumerate. */
|
|
8
|
+
export const CLIENT_IDS = [
|
|
9
|
+
'claude-code',
|
|
10
|
+
'cline',
|
|
11
|
+
'codex',
|
|
12
|
+
'cursor',
|
|
13
|
+
'curl',
|
|
14
|
+
'gemini',
|
|
15
|
+
'streamable-http',
|
|
16
|
+
];
|
|
8
17
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/services/catalog/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/services/catalog/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,uGAAuG;AACvG,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,aAAa;IACb,OAAO;IACP,OAAO;IACP,QAAQ;IACR,MAAM;IACN,QAAQ;IACR,iBAAiB;CACT,CAAC"}
|
package/manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cyanheads/cyanheads-mcp-server",
|
|
3
3
|
"mcpName": "io.github.cyanheads/cyanheads-mcp-server",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.4",
|
|
5
5
|
"description": "Fleet discovery for the cyanheads MCP ecosystem — semantic search + install snippets.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/index.js",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"files": [
|
|
13
13
|
"changelog/",
|
|
14
14
|
"dist/",
|
|
15
|
+
"!dist/*.mcpb",
|
|
15
16
|
"README.md",
|
|
16
17
|
"LICENSE",
|
|
17
18
|
"CLAUDE.md",
|
|
@@ -79,7 +80,7 @@
|
|
|
79
80
|
"url": "git+https://github.com/cyanheads/cyanheads-mcp-server.git"
|
|
80
81
|
},
|
|
81
82
|
"license": "Apache-2.0",
|
|
82
|
-
"packageManager": "bun@1.4.
|
|
83
|
+
"packageManager": "bun@1.4.3",
|
|
83
84
|
"engines": {
|
|
84
85
|
"bun": ">=1.4.0",
|
|
85
86
|
"node": ">=24.0.0"
|
|
@@ -88,21 +89,21 @@
|
|
|
88
89
|
"access": "public"
|
|
89
90
|
},
|
|
90
91
|
"dependencies": {
|
|
91
|
-
"@cyanheads/mcp-ts-core": "^0.13.
|
|
92
|
-
"@huggingface/transformers": "4.3.
|
|
93
|
-
"pino-pretty": "^13.
|
|
94
|
-
"zod": "^4.6.
|
|
92
|
+
"@cyanheads/mcp-ts-core": "^0.13.15",
|
|
93
|
+
"@huggingface/transformers": "4.3.1",
|
|
94
|
+
"pino-pretty": "^13.2.0",
|
|
95
|
+
"zod": "^4.6.7"
|
|
95
96
|
},
|
|
96
97
|
"devDependencies": {
|
|
97
|
-
"@biomejs/biome": "^2.5.
|
|
98
|
-
"@socketsecurity/bun-security-scanner": "^1.1.
|
|
99
|
-
"@types/node": "^26.6.
|
|
100
|
-
"@vitest/coverage-istanbul": "5.0.
|
|
98
|
+
"@biomejs/biome": "^2.5.15",
|
|
99
|
+
"@socketsecurity/bun-security-scanner": "^1.1.3",
|
|
100
|
+
"@types/node": "^26.6.5",
|
|
101
|
+
"@vitest/coverage-istanbul": "5.0.5",
|
|
101
102
|
"depcheck": "^1.4.7",
|
|
102
|
-
"fast-check": "4.10.
|
|
103
|
-
"ignore": "^7.0.
|
|
104
|
-
"tsc-alias": "^1.9.
|
|
103
|
+
"fast-check": "4.10.2",
|
|
104
|
+
"ignore": "^7.0.12",
|
|
105
|
+
"tsc-alias": "^1.9.7",
|
|
105
106
|
"typescript": "^7.0.2",
|
|
106
|
-
"vitest": "^5.0.
|
|
107
|
+
"vitest": "^5.0.5"
|
|
107
108
|
}
|
|
108
109
|
}
|
package/server.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"url": "https://github.com/cyanheads/cyanheads-mcp-server",
|
|
7
7
|
"source": "github"
|
|
8
8
|
},
|
|
9
|
-
"version": "0.4.
|
|
9
|
+
"version": "0.4.4",
|
|
10
10
|
"remotes": [
|
|
11
11
|
{
|
|
12
12
|
"type": "streamable-http",
|
|
@@ -18,12 +18,8 @@
|
|
|
18
18
|
"registryType": "npm",
|
|
19
19
|
"registryBaseUrl": "https://registry.npmjs.org",
|
|
20
20
|
"identifier": "@cyanheads/cyanheads-mcp-server",
|
|
21
|
-
"runtimeHint": "
|
|
22
|
-
"version": "0.4.
|
|
23
|
-
"packageArguments": [
|
|
24
|
-
{ "type": "positional", "value": "run" },
|
|
25
|
-
{ "type": "positional", "value": "start:stdio" }
|
|
26
|
-
],
|
|
21
|
+
"runtimeHint": "npx",
|
|
22
|
+
"version": "0.4.4",
|
|
27
23
|
"environmentVariables": [
|
|
28
24
|
{
|
|
29
25
|
"name": "MCP_LOG_LEVEL",
|
|
@@ -74,13 +70,15 @@
|
|
|
74
70
|
"registryType": "npm",
|
|
75
71
|
"registryBaseUrl": "https://registry.npmjs.org",
|
|
76
72
|
"identifier": "@cyanheads/cyanheads-mcp-server",
|
|
77
|
-
"runtimeHint": "
|
|
78
|
-
"version": "0.4.
|
|
79
|
-
"packageArguments": [
|
|
80
|
-
{ "type": "positional", "value": "run" },
|
|
81
|
-
{ "type": "positional", "value": "start:http" }
|
|
82
|
-
],
|
|
73
|
+
"runtimeHint": "npx",
|
|
74
|
+
"version": "0.4.4",
|
|
83
75
|
"environmentVariables": [
|
|
76
|
+
{
|
|
77
|
+
"name": "MCP_TRANSPORT_TYPE",
|
|
78
|
+
"description": "Selects the HTTP transport.",
|
|
79
|
+
"format": "string",
|
|
80
|
+
"value": "http"
|
|
81
|
+
},
|
|
84
82
|
{
|
|
85
83
|
"name": "MCP_HTTP_HOST",
|
|
86
84
|
"description": "Hostname for the HTTP server.",
|