@rotifer/mcp-server 0.12.0 → 0.14.0
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/README.md +43 -2
- package/dist/cloud.d.ts +3 -0
- package/dist/cloud.js +12 -1
- package/dist/cloud.js.map +1 -1
- package/dist/local.d.ts +2 -0
- package/dist/local.js +2 -2
- package/dist/local.js.map +1 -1
- package/dist/server.js +436 -410
- package/dist/server.js.map +1 -1
- package/dist/snapshots.d.ts +53 -0
- package/dist/snapshots.js +123 -0
- package/dist/snapshots.js.map +1 -0
- package/dist/tool-sets.d.ts +57 -0
- package/dist/tool-sets.js +152 -0
- package/dist/tool-sets.js.map +1 -0
- package/dist/tools.d.ts +15 -0
- package/dist/tools.js +18 -0
- package/dist/tools.js.map +1 -1
- package/package.json +1 -1
package/dist/server.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
2
2
|
import { CallToolRequestSchema, ListToolsRequestSchema, ListResourceTemplatesRequestSchema, ReadResourceRequestSchema, ListPromptsRequestSchema, GetPromptRequestSchema, McpError, ErrorCode, } from "@modelcontextprotocol/sdk/types.js";
|
|
3
|
-
import { searchGenes, getGeneDetail, arenaRankings, compareGenes, geneStats, leaderboard, developerProfile, listLocalGenes, listLocalAgents, submitToArena, installGeneFromCloud, createLocalAgent, agentRun, compileGene, runGene, initGene, scanGenes, wrapGene, testGene, publishGene, authStatus, login, logout, geneVersions, mcpStats, geneReputation, myReputation, domainSuggestion, vgScan, doctor } from "./tools.js";
|
|
3
|
+
import { searchGenes, getGeneDetail, arenaRankings, compareGenes, geneStats, leaderboard, developerProfile, listLocalGenes, listLocalAgents, submitToArena, installGeneFromCloud, rollbackGene, createLocalAgent, agentRun, compileGene, runGene, initGene, scanGenes, wrapGene, testGene, publishGene, authStatus, login, logout, geneVersions, mcpStats, geneReputation, myReputation, domainSuggestion, vgScan, doctor } from "./tools.js";
|
|
4
4
|
import { getGeneStatsRpc, getReputationLeaderboard, getDeveloperProfile, getGene, logMcpCall, logGeneInvocation } from "./cloud.js";
|
|
5
5
|
import { loadCredentials } from "./auth.js";
|
|
6
|
+
import { resolveToolSet, unavailableToolMessage } from "./tool-sets.js";
|
|
6
7
|
import { getPackageVersion, getVersionInfo, formatUpdateHint } from "./version.js";
|
|
7
8
|
const ICON_DATA_URI = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAARGVYSWZNTQAqAAAACAABh2kABAAAAAEAAAAaAAAAAAADoAEAAwAAAAEAAQAAoAIABAAAAAEAAABAoAMABAAAAAEAAABAAAAAAEZRQrAAAAHLaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJYTVAgQ29yZSA2LjAuMCI+CiAgIDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmV4aWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vZXhpZi8xLjAvIj4KICAgICAgICAgPGV4aWY6Q29sb3JTcGFjZT4xPC9leGlmOkNvbG9yU3BhY2U+CiAgICAgICAgIDxleGlmOlBpeGVsWERpbWVuc2lvbj4xMjg8L2V4aWY6UGl4ZWxYRGltZW5zaW9uPgogICAgICAgICA8ZXhpZjpQaXhlbFlEaW1lbnNpb24+MTI4PC9leGlmOlBpeGVsWURpbWVuc2lvbj4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+Cti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52EJKldGBe/bW8BdlUm8+C6w7yDHTMKJ2mLQ7QxJp7khbrjxDYhqAoJLLpbKWlOc004n4bXpJqnkaDfCDer32QqUyG845arAl+ZUN4JL9/Qc2l8vFYxB+BhdaD+Hr7F1wvCc6AUHeI3qdOYG9Tpy4ZbGSNY75T7cz11Uf2h6cghEtyJAeaApHTlOWcLa/CEfexNfvr2AtO9E+3E22Nf0/C4mZfI5gbtYAAAAASUVORK5CYII=";
|
|
8
9
|
export function createServer() {
|
|
@@ -17,417 +18,433 @@ export function createServer() {
|
|
|
17
18
|
getVersionInfo()
|
|
18
19
|
.then((info) => { cachedVersionInfo = info; })
|
|
19
20
|
.catch(() => { });
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
},
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
required: ["gene_ids"],
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
name: "get_gene_stats",
|
|
83
|
-
description: "Get download statistics for a Gene, broken down by time period (total, last 7 days, 30 days, 90 days).",
|
|
84
|
-
inputSchema: {
|
|
85
|
-
type: "object",
|
|
86
|
-
additionalProperties: false,
|
|
87
|
-
properties: {
|
|
88
|
-
gene_id: { type: "string", description: "Gene UUID" },
|
|
89
|
-
},
|
|
90
|
-
required: ["gene_id"],
|
|
91
|
-
},
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
name: "get_leaderboard",
|
|
95
|
-
description: "Get the creator reputation leaderboard. Shows top creators ranked by reputation score, including their published gene count, total downloads, and arena wins.",
|
|
96
|
-
inputSchema: {
|
|
97
|
-
type: "object",
|
|
98
|
-
additionalProperties: false,
|
|
99
|
-
properties: {
|
|
100
|
-
limit: { type: "number", description: "Number of entries to return (default 20, max 100)" },
|
|
101
|
-
},
|
|
102
|
-
},
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
name: "get_developer_profile",
|
|
106
|
-
description: "Get a creator's public profile and reputation data by username.",
|
|
107
|
-
inputSchema: {
|
|
108
|
-
type: "object",
|
|
109
|
-
additionalProperties: false,
|
|
110
|
-
properties: {
|
|
111
|
-
username: { type: "string", description: "Creator username" },
|
|
112
|
-
},
|
|
113
|
-
required: ["username"],
|
|
114
|
-
},
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
name: "list_local_genes",
|
|
118
|
-
description: "List Genes installed in the local project workspace. Scans the genes/ directory for phenotype.json files and returns metadata, compile status, and cloud origin for each Gene.",
|
|
119
|
-
inputSchema: {
|
|
120
|
-
type: "object",
|
|
121
|
-
additionalProperties: false,
|
|
122
|
-
properties: {
|
|
123
|
-
project_root: { type: "string", description: "Project root path (defaults to current working directory)" },
|
|
124
|
-
domain: { type: "string", description: "Filter by domain prefix (e.g. 'search' matches 'search.web')" },
|
|
125
|
-
fidelity: { type: "string", enum: ["Wrapped", "Hybrid", "Native", "Unknown"], description: "Filter by fidelity type" },
|
|
21
|
+
// Declared once per process: the set cannot change while the server runs,
|
|
22
|
+
// and ListTools must agree with what CallTool will actually accept.
|
|
23
|
+
const allowedTools = resolveToolSet();
|
|
24
|
+
const ALL_TOOLS = [
|
|
25
|
+
{
|
|
26
|
+
name: "search_genes",
|
|
27
|
+
description: "Search the Rotifer Gene ecosystem. Returns a list of Genes matching the query, filterable by domain and fidelity.",
|
|
28
|
+
inputSchema: {
|
|
29
|
+
type: "object",
|
|
30
|
+
additionalProperties: false,
|
|
31
|
+
properties: {
|
|
32
|
+
query: { type: "string", description: "Free-text search by gene name or description" },
|
|
33
|
+
domain: { type: "string", description: "Filter by capability domain (e.g. search.web, code.format)" },
|
|
34
|
+
fidelity: { type: "string", enum: ["Wrapped", "Hybrid", "Native", "Unknown"], description: "Filter by gene fidelity type" },
|
|
35
|
+
sort: { type: "string", enum: ["relevance", "newest", "popular", "fitness"], description: "Sort order (default: relevance when query is given, newest otherwise)" },
|
|
36
|
+
page: { type: "number", description: "Page number (default 1)" },
|
|
37
|
+
per_page: { type: "number", description: "Results per page (default 20, max 50)" },
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: "get_gene_detail",
|
|
43
|
+
description: "Get detailed information about a specific Gene by its ID or content_hash, including phenotype, fitness, and metadata. At least one of gene_id or content_hash must be provided.",
|
|
44
|
+
inputSchema: {
|
|
45
|
+
type: "object",
|
|
46
|
+
additionalProperties: false,
|
|
47
|
+
properties: {
|
|
48
|
+
gene_id: { type: "string", description: "Gene UUID (required if content_hash not provided)" },
|
|
49
|
+
content_hash: { type: "string", description: "SHA-256 content hash of the gene's phenotype (alternative to gene_id)" },
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: "get_arena_rankings",
|
|
55
|
+
description: "Get Arena rankings for a domain with full 5-dimensional fitness metrics: fitness (F(g)), safety, success_rate, latency, and resource_efficiency. Use this to find the best Gene for a capability.",
|
|
56
|
+
inputSchema: {
|
|
57
|
+
type: "object",
|
|
58
|
+
additionalProperties: false,
|
|
59
|
+
properties: {
|
|
60
|
+
domain: { type: "string", description: "Capability domain (e.g. search.web)" },
|
|
61
|
+
page: { type: "number", description: "Page number (default 1)" },
|
|
62
|
+
per_page: { type: "number", description: "Results per page (default 20)" },
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: "compare_genes",
|
|
68
|
+
description: "Compare two or more Genes by their F(g) fitness metrics. Returns side-by-side fitness breakdown.",
|
|
69
|
+
inputSchema: {
|
|
70
|
+
type: "object",
|
|
71
|
+
additionalProperties: false,
|
|
72
|
+
properties: {
|
|
73
|
+
gene_ids: {
|
|
74
|
+
type: "array",
|
|
75
|
+
items: { type: "string" },
|
|
76
|
+
description: "Array of Gene UUIDs to compare (2-5)",
|
|
77
|
+
minItems: 2,
|
|
78
|
+
maxItems: 5,
|
|
126
79
|
},
|
|
127
80
|
},
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
},
|
|
139
|
-
},
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
},
|
|
187
|
-
|
|
188
|
-
},
|
|
189
|
-
},
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
type: "
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
},
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
},
|
|
247
|
-
|
|
248
|
-
},
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
},
|
|
263
|
-
|
|
264
|
-
},
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
},
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
},
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
},
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
{
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
type: "
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
type: "
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
type: "
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
81
|
+
required: ["gene_ids"],
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: "get_gene_stats",
|
|
86
|
+
description: "Get download statistics for a Gene, broken down by time period (total, last 7 days, 30 days, 90 days).",
|
|
87
|
+
inputSchema: {
|
|
88
|
+
type: "object",
|
|
89
|
+
additionalProperties: false,
|
|
90
|
+
properties: {
|
|
91
|
+
gene_id: { type: "string", description: "Gene UUID" },
|
|
92
|
+
},
|
|
93
|
+
required: ["gene_id"],
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
name: "get_leaderboard",
|
|
98
|
+
description: "Get the creator reputation leaderboard. Shows top creators ranked by reputation score, including their published gene count, total downloads, and arena wins.",
|
|
99
|
+
inputSchema: {
|
|
100
|
+
type: "object",
|
|
101
|
+
additionalProperties: false,
|
|
102
|
+
properties: {
|
|
103
|
+
limit: { type: "number", description: "Number of entries to return (default 20, max 100)" },
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
name: "get_developer_profile",
|
|
109
|
+
description: "Get a creator's public profile and reputation data by username.",
|
|
110
|
+
inputSchema: {
|
|
111
|
+
type: "object",
|
|
112
|
+
additionalProperties: false,
|
|
113
|
+
properties: {
|
|
114
|
+
username: { type: "string", description: "Creator username" },
|
|
115
|
+
},
|
|
116
|
+
required: ["username"],
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
name: "list_local_genes",
|
|
121
|
+
description: "List Genes installed in the local project workspace. Scans the genes/ directory for phenotype.json files and returns metadata, compile status, and cloud origin for each Gene.",
|
|
122
|
+
inputSchema: {
|
|
123
|
+
type: "object",
|
|
124
|
+
additionalProperties: false,
|
|
125
|
+
properties: {
|
|
126
|
+
project_root: { type: "string", description: "Project root path (defaults to current working directory)" },
|
|
127
|
+
domain: { type: "string", description: "Filter by domain prefix (e.g. 'search' matches 'search.web')" },
|
|
128
|
+
fidelity: { type: "string", enum: ["Wrapped", "Hybrid", "Native", "Unknown"], description: "Filter by fidelity type" },
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
name: "list_local_agents",
|
|
134
|
+
description: "List Agents registered in the local project workspace. Returns each Agent's name, state, genome composition, strategy, and reputation. Agents are local constructs that compose multiple Genes into pipelines.",
|
|
135
|
+
inputSchema: {
|
|
136
|
+
type: "object",
|
|
137
|
+
additionalProperties: false,
|
|
138
|
+
properties: {
|
|
139
|
+
project_root: { type: "string", description: "Project root path (defaults to current working directory)" },
|
|
140
|
+
state: { type: "string", description: "Filter by agent state (e.g. 'Active', 'Inactive')" },
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
name: "install_gene",
|
|
146
|
+
description: "Install a Gene from the Rotifer Cloud Registry into the local project. Downloads phenotype, metadata, and the compiled WASM artifact (verified against declared size and sha256) when the gene has one. Requires a valid gene_id from search_genes or get_gene_detail.",
|
|
147
|
+
inputSchema: {
|
|
148
|
+
type: "object",
|
|
149
|
+
additionalProperties: false,
|
|
150
|
+
properties: {
|
|
151
|
+
gene_id: { type: "string", description: "Gene UUID to install" },
|
|
152
|
+
project_root: { type: "string", description: "Project root path (defaults to cwd)" },
|
|
153
|
+
force: { type: "boolean", description: "Overwrite if gene already exists locally (default: false). The replaced copy is snapshotted first and can be restored with rollback_gene." },
|
|
154
|
+
},
|
|
155
|
+
required: ["gene_id"],
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
name: "rollback_gene",
|
|
160
|
+
description: "Undo the last overwrite of a locally installed Gene, restoring the copy that install_gene replaced. Call without gene_name to list what can currently be rolled back. A rollback consumes its snapshot: it undoes one step, not a history.",
|
|
161
|
+
inputSchema: {
|
|
162
|
+
type: "object",
|
|
163
|
+
additionalProperties: false,
|
|
164
|
+
properties: {
|
|
165
|
+
gene_name: { type: "string", description: "Gene to restore. Omit to list what is restorable." },
|
|
166
|
+
project_root: { type: "string", description: "Project root path (defaults to cwd)" },
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
name: "arena_submit",
|
|
172
|
+
description: "Submit a Gene to the Arena with fitness metrics. Requires authentication (rotifer login). Upserts the Gene's Arena entry with 5-dimensional fitness scores.",
|
|
173
|
+
inputSchema: {
|
|
174
|
+
type: "object",
|
|
175
|
+
additionalProperties: false,
|
|
176
|
+
properties: {
|
|
177
|
+
gene_id: { type: "string", description: "Gene UUID to submit" },
|
|
178
|
+
fitness_value: { type: "number", description: "Overall fitness score F(g) (0-1)" },
|
|
179
|
+
safety_score: { type: "number", description: "Safety score (0-1)" },
|
|
180
|
+
success_rate: { type: "number", description: "Success rate (0-1)" },
|
|
181
|
+
latency_score: { type: "number", description: "Latency score (0-1, higher is better)" },
|
|
182
|
+
resource_efficiency: { type: "number", description: "Resource efficiency score (0-1)" },
|
|
183
|
+
},
|
|
184
|
+
required: ["gene_id", "fitness_value", "safety_score", "success_rate", "latency_score", "resource_efficiency"],
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
name: "create_agent",
|
|
189
|
+
description: "Create a new Agent by composing one or more local Genes. The Agent is saved to .rotifer/agents/ in the project. Genes must exist locally (wrap them first with wrap_gene).",
|
|
190
|
+
inputSchema: {
|
|
191
|
+
type: "object",
|
|
192
|
+
additionalProperties: false,
|
|
193
|
+
properties: {
|
|
194
|
+
agent_name: { type: "string", description: "Agent name" },
|
|
195
|
+
gene_ids: { type: "array", items: { type: "string" }, minItems: 1, description: "Array of local gene names to compose (at least one required)" },
|
|
196
|
+
composition: { type: "string", enum: ["Seq", "Par", "Cond", "Try", "TryPool"], description: "Composition strategy (default: Seq for multi-gene, Single for one gene)" },
|
|
197
|
+
project_root: { type: "string", description: "Project root path (defaults to cwd)" },
|
|
198
|
+
domain: { type: "string", description: "Domain tag for the agent (e.g. search.web). Metadata only, does not auto-select genes." },
|
|
199
|
+
strategy: { type: "string", description: "Gene selection strategy (default: greedy)" },
|
|
200
|
+
par_merge: { type: "string", enum: ["first", "concat", "merge"], description: "Merge strategy for Par composition (default: first)" },
|
|
201
|
+
},
|
|
202
|
+
required: ["agent_name", "gene_ids"],
|
|
203
|
+
},
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
name: "agent_run",
|
|
207
|
+
description: "Run a local Agent by name. Executes via the Rotifer CLI (rotifer agent run <agent-name>). The Agent must exist in .rotifer/agents/. Returns stdout/stderr from the execution.",
|
|
208
|
+
inputSchema: {
|
|
209
|
+
type: "object",
|
|
210
|
+
additionalProperties: false,
|
|
211
|
+
properties: {
|
|
212
|
+
agent_name: { type: "string", description: "Agent name (as given during create_agent)" },
|
|
213
|
+
project_root: { type: "string", description: "Project root path" },
|
|
214
|
+
input: { type: "string", description: "Input data to pass to the agent (JSON string)" },
|
|
215
|
+
verbose: { type: "boolean", description: "Show intermediate results for each gene step" },
|
|
216
|
+
no_sandbox: { type: "boolean", description: "Force Node.js execution, skip WASM sandbox" },
|
|
217
|
+
},
|
|
218
|
+
required: ["agent_name"],
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
name: "compile_gene",
|
|
223
|
+
description: "Compile a local Gene to WASM via the Rotifer CLI (rotifer compile). The Gene must exist in the local genes/ directory. Returns compilation output.",
|
|
224
|
+
inputSchema: {
|
|
225
|
+
type: "object",
|
|
226
|
+
additionalProperties: false,
|
|
227
|
+
properties: {
|
|
228
|
+
gene_name: { type: "string", description: "Gene name (directory name under genes/)" },
|
|
229
|
+
project_root: { type: "string", description: "Project root path" },
|
|
230
|
+
check: { type: "boolean", description: "Validate only, don't produce artifacts (default: false)" },
|
|
231
|
+
wasm_path: { type: "string", description: "Path to a pre-compiled .wasm file to wrap as IR" },
|
|
232
|
+
lang: { type: "string", enum: ["ts", "wasm"], description: "Force compilation mode (auto-detected by default)" },
|
|
233
|
+
},
|
|
234
|
+
required: ["gene_name"],
|
|
235
|
+
},
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
name: "doctor",
|
|
239
|
+
description: "Check the local TypeScript→WASM toolchain (esbuild / javy) and report what is missing or misconfigured. Read-only: inspects the environment and changes nothing. Use this when compile_gene fails — a missing or broken toolchain is the most common cause.",
|
|
240
|
+
inputSchema: {
|
|
241
|
+
type: "object",
|
|
242
|
+
additionalProperties: false,
|
|
243
|
+
properties: {
|
|
244
|
+
project_root: { type: "string", description: "Project root path" },
|
|
245
|
+
},
|
|
246
|
+
},
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
name: "run_gene",
|
|
250
|
+
description: "Execute a local Gene via the Rotifer CLI (rotifer run). The Gene must exist in the local genes/ directory. Returns execution output.",
|
|
251
|
+
inputSchema: {
|
|
252
|
+
type: "object",
|
|
253
|
+
additionalProperties: false,
|
|
254
|
+
properties: {
|
|
255
|
+
gene_name: { type: "string", description: "Gene name (directory name under genes/)" },
|
|
256
|
+
project_root: { type: "string", description: "Project root path" },
|
|
257
|
+
input: { type: "string", description: "Input JSON data to pass to the gene" },
|
|
258
|
+
verbose: { type: "boolean", description: "Show detailed execution output (default: false)" },
|
|
259
|
+
no_sandbox: { type: "boolean", description: "Run without WASM sandbox, Node.js only (default: false)" },
|
|
260
|
+
trust_unsigned: { type: "boolean", description: "Allow Node.js execution for Cloud-installed genes (default: false)" },
|
|
261
|
+
},
|
|
262
|
+
required: ["gene_name"],
|
|
263
|
+
},
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
name: "init_gene",
|
|
267
|
+
description: "Initialize a new Rotifer Gene project. Creates a directory with phenotype.json template and starter files. Supports Wrapped, Hybrid, and Native fidelity types.",
|
|
268
|
+
inputSchema: {
|
|
269
|
+
type: "object",
|
|
270
|
+
additionalProperties: false,
|
|
271
|
+
properties: {
|
|
272
|
+
gene_name: { type: "string", description: "Gene name (will create genes/<gene_name>/ directory)" },
|
|
273
|
+
project_root: { type: "string", description: "Project root path" },
|
|
274
|
+
fidelity: { type: "string", enum: ["Wrapped", "Hybrid", "Native"], description: "Gene fidelity type (default: Wrapped)" },
|
|
275
|
+
domain: { type: "string", description: "Default gene domain (default: general)" },
|
|
276
|
+
no_genesis: { type: "boolean", description: "Skip genesis genes installation (default: false)" },
|
|
277
|
+
},
|
|
278
|
+
required: ["gene_name"],
|
|
279
|
+
},
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
name: "scan_genes",
|
|
283
|
+
description: "Scan source files for candidate gene functions or local SKILL.md files that can be wrapped as Genes. Returns discovered candidates with metadata.",
|
|
284
|
+
inputSchema: {
|
|
285
|
+
type: "object",
|
|
286
|
+
additionalProperties: false,
|
|
287
|
+
properties: {
|
|
288
|
+
path: { type: "string", description: "Path to scan (defaults to current directory)" },
|
|
289
|
+
project_root: { type: "string", description: "Project root path" },
|
|
290
|
+
skills: { type: "boolean", description: "Scan for SKILL.md files instead of source functions (default: false)" },
|
|
291
|
+
skills_path: { type: "string", description: "Directory to scan for skills (default: .cursor/skills)" },
|
|
292
|
+
},
|
|
293
|
+
},
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
name: "wrap_gene",
|
|
297
|
+
description: "Wrap a function or SKILL.md as a Rotifer Gene. Generates phenotype.json from the source. The target must exist in the project.",
|
|
298
|
+
inputSchema: {
|
|
299
|
+
type: "object",
|
|
300
|
+
additionalProperties: false,
|
|
301
|
+
properties: {
|
|
302
|
+
gene_name: { type: "string", description: "Name of the function or skill to wrap" },
|
|
303
|
+
project_root: { type: "string", description: "Project root path" },
|
|
304
|
+
domain: { type: "string", description: "Gene functional domain (e.g. search.web, code.format)" },
|
|
305
|
+
fidelity: { type: "string", enum: ["Wrapped", "Hybrid", "Native"], description: "Fidelity level (default: Wrapped)" },
|
|
306
|
+
from_skill: { type: "string", description: "Create gene from a SKILL.md file (path to SKILL.md or its directory)" },
|
|
307
|
+
from_clawhub: { type: "string", description: "Create gene from a ClawHub skill (slug, downloads and converts automatically)" },
|
|
308
|
+
},
|
|
309
|
+
required: ["gene_name"],
|
|
310
|
+
},
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
name: "test_gene",
|
|
314
|
+
description: "Test a Gene in the sandbox. Validates phenotype schema, runs input/output tests, and checks compilation.",
|
|
315
|
+
inputSchema: {
|
|
316
|
+
type: "object",
|
|
317
|
+
additionalProperties: false,
|
|
318
|
+
properties: {
|
|
319
|
+
gene_name: { type: "string", description: "Gene name to test" },
|
|
320
|
+
project_root: { type: "string", description: "Project root path" },
|
|
321
|
+
verbose: { type: "boolean", description: "Show detailed output (default: false)" },
|
|
322
|
+
compliance: { type: "boolean", description: "Run structural compliance checks (default: false)" },
|
|
323
|
+
},
|
|
324
|
+
required: ["gene_name"],
|
|
325
|
+
},
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
name: "publish_gene",
|
|
329
|
+
description: "Publish a Gene to Rotifer Cloud Registry (default destination since v0.8.8). Calling this tool = explicit publish consent. Requires authentication (use login tool first). Validates with V(g) security scan (Grade >= B required), uploads, and optionally submits to Arena. Either gene_name or all=true must be provided.",
|
|
330
|
+
inputSchema: {
|
|
331
|
+
type: "object",
|
|
332
|
+
additionalProperties: false,
|
|
333
|
+
properties: {
|
|
334
|
+
gene_name: { type: "string", description: "Gene name to publish (required unless all=true)" },
|
|
335
|
+
project_root: { type: "string", description: "Project root path" },
|
|
336
|
+
all: { type: "boolean", description: "Publish all local genes (default: false)" },
|
|
337
|
+
skip_arena: { type: "boolean", description: "Skip automatic Arena submission after publish (default: false)" },
|
|
338
|
+
description: { type: "string", description: "Gene description" },
|
|
339
|
+
changelog: { type: "string", description: "Changelog entry for this version (max 500 chars)" },
|
|
340
|
+
skip_security: { type: "boolean", description: "Skip pre-publish security checks (default: false)" },
|
|
341
|
+
},
|
|
342
|
+
},
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
name: "list_gene_versions",
|
|
346
|
+
description: "List the version history chain of a Gene by creator and name. Returns all published versions in chronological order with changelog entries and previous_version_id links.",
|
|
347
|
+
inputSchema: {
|
|
348
|
+
type: "object",
|
|
349
|
+
additionalProperties: false,
|
|
350
|
+
properties: {
|
|
351
|
+
owner: { type: "string", description: "Gene creator's username" },
|
|
352
|
+
gene_name: { type: "string", description: "Gene name" },
|
|
353
|
+
},
|
|
354
|
+
required: ["owner", "gene_name"],
|
|
355
|
+
},
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
name: "get_mcp_stats",
|
|
359
|
+
description: "Get MCP Server call analytics for a given time period. Returns total calls, success rate, average latency, top tools, and top genes. Requires authentication.",
|
|
360
|
+
inputSchema: {
|
|
361
|
+
type: "object",
|
|
362
|
+
additionalProperties: false,
|
|
363
|
+
properties: {
|
|
364
|
+
days: { type: "number", description: "Time window in days (default 7)" },
|
|
365
|
+
},
|
|
366
|
+
},
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
name: "auth_status",
|
|
370
|
+
description: "Check current authentication status. Returns whether the user is logged in, their username, provider, and how many minutes until the token expires.",
|
|
371
|
+
inputSchema: {
|
|
372
|
+
type: "object",
|
|
373
|
+
additionalProperties: false,
|
|
374
|
+
properties: {},
|
|
375
|
+
},
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
name: "login",
|
|
379
|
+
description: "Log in to Rotifer Cloud. Opens the browser for OAuth authorization (GitHub or GitLab). After the user authorizes in the browser, credentials are saved locally. This must be done before using arena_submit or publish_gene.",
|
|
380
|
+
inputSchema: {
|
|
381
|
+
type: "object",
|
|
382
|
+
additionalProperties: false,
|
|
383
|
+
properties: {
|
|
384
|
+
provider: { type: "string", enum: ["github", "gitlab"], description: "OAuth provider (default: github)" },
|
|
385
|
+
endpoint: { type: "string", description: "Cloud endpoint URL (uses default if omitted)" },
|
|
386
|
+
},
|
|
387
|
+
},
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
name: "logout",
|
|
391
|
+
description: "Log out from Rotifer Cloud. Clears locally saved credentials.",
|
|
392
|
+
inputSchema: {
|
|
393
|
+
type: "object",
|
|
394
|
+
additionalProperties: false,
|
|
395
|
+
properties: {},
|
|
396
|
+
},
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
name: "get_gene_reputation",
|
|
400
|
+
description: "Get detailed reputation breakdown for a Gene (Arena, Usage, Stability scores).",
|
|
401
|
+
inputSchema: {
|
|
402
|
+
type: "object",
|
|
403
|
+
additionalProperties: false,
|
|
404
|
+
properties: {
|
|
405
|
+
gene_id: { type: "string", description: "Gene ID" },
|
|
406
|
+
},
|
|
407
|
+
required: ["gene_id"],
|
|
408
|
+
},
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
name: "get_my_reputation",
|
|
412
|
+
description: "Get the current logged-in creator's reputation and stats. Requires authentication.",
|
|
413
|
+
inputSchema: {
|
|
414
|
+
type: "object",
|
|
415
|
+
additionalProperties: false,
|
|
416
|
+
properties: {},
|
|
417
|
+
},
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
name: "suggest_domain",
|
|
421
|
+
description: "Suggest top matching domains from the domain registry based on a description.",
|
|
422
|
+
inputSchema: {
|
|
423
|
+
type: "object",
|
|
424
|
+
additionalProperties: false,
|
|
425
|
+
properties: {
|
|
426
|
+
description: { type: "string", description: "Description to match against domains" },
|
|
427
|
+
},
|
|
428
|
+
required: ["description"],
|
|
429
|
+
},
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
name: "vg_scan",
|
|
433
|
+
description: "V(g) security scan — static analysis for Gene/Skill code safety. Returns a grade (A/B/C/D/?) and per-finding details with severity, file, line, and snippet.",
|
|
434
|
+
inputSchema: {
|
|
435
|
+
type: "object",
|
|
436
|
+
additionalProperties: false,
|
|
437
|
+
properties: {
|
|
438
|
+
path: { type: "string", description: "Path to Gene or Skill directory to scan (default: current project root)" },
|
|
439
|
+
gene_id: { type: "string", description: "Gene/Skill identifier for the report" },
|
|
440
|
+
all: { type: "boolean", description: "Scan all code files, not just src/" },
|
|
441
|
+
project_root: { type: "string", description: "Project root directory (auto-detected if omitted)" },
|
|
442
|
+
},
|
|
443
|
+
},
|
|
444
|
+
},
|
|
445
|
+
];
|
|
446
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
447
|
+
tools: ALL_TOOLS.filter((t) => !allowedTools || allowedTools.has(t.name)),
|
|
431
448
|
}));
|
|
432
449
|
const GENE_ID_TOOLS = new Set([
|
|
433
450
|
"get_gene_detail", "get_gene_stats", "install_gene",
|
|
@@ -449,6 +466,12 @@ export function createServer() {
|
|
|
449
466
|
}
|
|
450
467
|
return a;
|
|
451
468
|
}
|
|
469
|
+
// ListTools already hides what is not declared, but a caller can name a
|
|
470
|
+
// tool directly, so the boundary is enforced here too rather than relying
|
|
471
|
+
// on the listing being respected.
|
|
472
|
+
if (allowedTools && !allowedTools.has(name)) {
|
|
473
|
+
throw new McpError(ErrorCode.MethodNotFound, unavailableToolMessage(name, allowedTools));
|
|
474
|
+
}
|
|
452
475
|
try {
|
|
453
476
|
let result;
|
|
454
477
|
switch (name) {
|
|
@@ -482,6 +505,9 @@ export function createServer() {
|
|
|
482
505
|
case "install_gene":
|
|
483
506
|
result = await installGeneFromCloud(args);
|
|
484
507
|
break;
|
|
508
|
+
case "rollback_gene":
|
|
509
|
+
result = rollbackGene(args);
|
|
510
|
+
break;
|
|
485
511
|
case "arena_submit":
|
|
486
512
|
result = await submitToArena(args);
|
|
487
513
|
break;
|