@rotifer/mcp-server 0.13.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 +7 -2
- package/dist/tool-sets.d.ts +20 -2
- package/dist/tool-sets.js +32 -5
- package/dist/tool-sets.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -238,12 +238,17 @@ to what a given integration actually needs — useful when the server is attache
|
|
|
238
238
|
to an assistant that should not be able to publish or log in on your behalf:
|
|
239
239
|
|
|
240
240
|
```bash
|
|
241
|
-
|
|
242
|
-
|
|
241
|
+
npx @rotifer/mcp-server --tools=evolve # the rank-and-swap preset (10 tools)
|
|
242
|
+
npx @rotifer/mcp-server --tools=readonly # nothing that writes (14 tools)
|
|
243
243
|
ROTIFER_MCP_TOOLS=search_genes,get_gene_detail # an exact list
|
|
244
244
|
ROTIFER_MCP_TOOLS=evolve,vg_scan # a preset plus one
|
|
245
245
|
```
|
|
246
246
|
|
|
247
|
+
The flag and the variable do the same thing, and the flag wins if both are set.
|
|
248
|
+
Both exist because callers differ in what they can reach: a shell user sets the
|
|
249
|
+
variable, while something launching this server from a manifest controls only
|
|
250
|
+
the command line.
|
|
251
|
+
|
|
247
252
|
Tools outside the set disappear from `listTools` and are refused if called
|
|
248
253
|
anyway. The refusal says how to add the tool back and, where one exists, the
|
|
249
254
|
`rotifer` CLI command that does the same job — so a narrowed set is a boundary
|
package/dist/tool-sets.d.ts
CHANGED
|
@@ -11,19 +11,37 @@
|
|
|
11
11
|
* names, or both mixed. Unset means every tool, so nothing changes for anyone
|
|
12
12
|
* who does not opt in:
|
|
13
13
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
14
|
+
* --tools=evolve the preset
|
|
15
|
+
* --tools=search_genes,get_gene_detail an exact pair
|
|
16
16
|
* ROTIFER_MCP_TOOLS=evolve,vg_scan a preset plus one
|
|
17
17
|
*
|
|
18
|
+
* Both spellings exist because callers differ in what they can set: a shell
|
|
19
|
+
* user reaches for the variable, while a manifest that launches this server
|
|
20
|
+
* controls argv and nothing else. The flag wins when both are present.
|
|
21
|
+
*
|
|
18
22
|
* A list rather than a fixed profile flag on purpose: rotifer.ai's Web Studio
|
|
19
23
|
* will want a different set than a marketplace Skill, and a Cursor user wants
|
|
20
24
|
* all of them. Presets that turn out to be common can be added here; a caller
|
|
21
25
|
* with an unusual need does not have to wait for one.
|
|
22
26
|
*/
|
|
23
27
|
export declare const PRESETS: Record<string, readonly string[]>;
|
|
28
|
+
/**
|
|
29
|
+
* Read `--tools=<set>` or `--tools <set>` from a launch command line.
|
|
30
|
+
*
|
|
31
|
+
* The environment variable alone is not enough. Callers that launch this server
|
|
32
|
+
* from a manifest — a ClawHub Skill among them — control the argv and not the
|
|
33
|
+
* environment: ClawHub's schema has an `env` field, but it declares which
|
|
34
|
+
* variables a Skill *requires*, with no way to give one a value. A restriction
|
|
35
|
+
* that the one caller it was built for cannot switch on would be a restriction
|
|
36
|
+
* in name only.
|
|
37
|
+
*/
|
|
38
|
+
export declare function toolSetFromArgv(argv?: readonly string[]): string | undefined;
|
|
24
39
|
/**
|
|
25
40
|
* Resolve the declared set, or null when every tool is allowed.
|
|
26
41
|
*
|
|
42
|
+
* The command line wins over the environment: it is the more specific of the
|
|
43
|
+
* two, and it is what a manifest can actually set.
|
|
44
|
+
*
|
|
27
45
|
* Unknown names are ignored rather than fatal: a typo should cost you one tool,
|
|
28
46
|
* not the whole server, and a set written for a newer version should still work
|
|
29
47
|
* against an older one.
|
package/dist/tool-sets.js
CHANGED
|
@@ -11,10 +11,14 @@
|
|
|
11
11
|
* names, or both mixed. Unset means every tool, so nothing changes for anyone
|
|
12
12
|
* who does not opt in:
|
|
13
13
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
14
|
+
* --tools=evolve the preset
|
|
15
|
+
* --tools=search_genes,get_gene_detail an exact pair
|
|
16
16
|
* ROTIFER_MCP_TOOLS=evolve,vg_scan a preset plus one
|
|
17
17
|
*
|
|
18
|
+
* Both spellings exist because callers differ in what they can set: a shell
|
|
19
|
+
* user reaches for the variable, while a manifest that launches this server
|
|
20
|
+
* controls argv and nothing else. The flag wins when both are present.
|
|
21
|
+
*
|
|
18
22
|
* A list rather than a fixed profile flag on purpose: rotifer.ai's Web Studio
|
|
19
23
|
* will want a different set than a marketplace Skill, and a Cursor user wants
|
|
20
24
|
* all of them. Presets that turn out to be common can be added here; a caller
|
|
@@ -77,14 +81,37 @@ const CLI_EQUIVALENT = {
|
|
|
77
81
|
get_gene_reputation: "rotifer reputation",
|
|
78
82
|
doctor: "rotifer doctor",
|
|
79
83
|
};
|
|
84
|
+
/**
|
|
85
|
+
* Read `--tools=<set>` or `--tools <set>` from a launch command line.
|
|
86
|
+
*
|
|
87
|
+
* The environment variable alone is not enough. Callers that launch this server
|
|
88
|
+
* from a manifest — a ClawHub Skill among them — control the argv and not the
|
|
89
|
+
* environment: ClawHub's schema has an `env` field, but it declares which
|
|
90
|
+
* variables a Skill *requires*, with no way to give one a value. A restriction
|
|
91
|
+
* that the one caller it was built for cannot switch on would be a restriction
|
|
92
|
+
* in name only.
|
|
93
|
+
*/
|
|
94
|
+
export function toolSetFromArgv(argv = process.argv.slice(2)) {
|
|
95
|
+
for (let i = 0; i < argv.length; i++) {
|
|
96
|
+
const arg = argv[i];
|
|
97
|
+
if (arg.startsWith("--tools="))
|
|
98
|
+
return arg.slice("--tools=".length);
|
|
99
|
+
if (arg === "--tools")
|
|
100
|
+
return argv[i + 1];
|
|
101
|
+
}
|
|
102
|
+
return undefined;
|
|
103
|
+
}
|
|
80
104
|
/**
|
|
81
105
|
* Resolve the declared set, or null when every tool is allowed.
|
|
82
106
|
*
|
|
107
|
+
* The command line wins over the environment: it is the more specific of the
|
|
108
|
+
* two, and it is what a manifest can actually set.
|
|
109
|
+
*
|
|
83
110
|
* Unknown names are ignored rather than fatal: a typo should cost you one tool,
|
|
84
111
|
* not the whole server, and a set written for a newer version should still work
|
|
85
112
|
* against an older one.
|
|
86
113
|
*/
|
|
87
|
-
export function resolveToolSet(declaration = process.env.ROTIFER_MCP_TOOLS) {
|
|
114
|
+
export function resolveToolSet(declaration = toolSetFromArgv() ?? process.env.ROTIFER_MCP_TOOLS) {
|
|
88
115
|
const raw = (declaration || "").trim();
|
|
89
116
|
if (!raw)
|
|
90
117
|
return null;
|
|
@@ -113,8 +140,8 @@ export function unavailableToolMessage(name, allowed) {
|
|
|
113
140
|
`Available here: ${[...allowed].sort().join(", ")}.`,
|
|
114
141
|
"",
|
|
115
142
|
"This is a restriction, not a missing feature. To lift it:",
|
|
116
|
-
` • add it:
|
|
117
|
-
" • or allow all: unset ROTIFER_MCP_TOOLS",
|
|
143
|
+
` • add it: --tools=<current set>,${name} (or ROTIFER_MCP_TOOLS)`,
|
|
144
|
+
" • or allow all: drop --tools / unset ROTIFER_MCP_TOOLS",
|
|
118
145
|
];
|
|
119
146
|
const cli = CLI_EQUIVALENT[name];
|
|
120
147
|
if (cli) {
|
package/dist/tool-sets.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-sets.js","sourceRoot":"","sources":["../src/tool-sets.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"tool-sets.js","sourceRoot":"","sources":["../src/tool-sets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH;;;;GAIG;AACH,MAAM,MAAM,GAAG;IACb,cAAc;IACd,iBAAiB;IACjB,oBAAoB;IACpB,eAAe;IACf,cAAc;IACd,eAAe;IACf,kBAAkB;IAClB,mBAAmB;IACnB,cAAc;IACd,WAAW;CACH,CAAC;AAEX,gFAAgF;AAChF,MAAM,QAAQ,GAAG;IACf,cAAc;IACd,iBAAiB;IACjB,oBAAoB;IACpB,eAAe;IACf,gBAAgB;IAChB,iBAAiB;IACjB,uBAAuB;IACvB,qBAAqB;IACrB,oBAAoB;IACpB,kBAAkB;IAClB,mBAAmB;IACnB,gBAAgB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IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rotifer/mcp-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"mcpName": "io.github.rotifer-protocol/mcp-server",
|
|
5
5
|
"description": "Rotifer MCP Server — AI agents search, compare, and rank Genes (modular AI skills) from a living ecosystem of 50+ capabilities. Zero config.",
|
|
6
6
|
"type": "module",
|