@rotifer/mcp-server 0.1.1 → 0.2.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 +121 -0
- package/dist/cloud.d.ts +30 -0
- package/dist/cloud.js +76 -22
- package/dist/cloud.js.map +1 -1
- package/dist/index.js +2 -82
- package/dist/index.js.map +1 -1
- package/dist/local.d.ts +32 -0
- package/dist/local.js +72 -0
- package/dist/local.js.map +1 -0
- package/dist/server.d.ts +2 -0
- package/dist/server.js +210 -0
- package/dist/server.js.map +1 -0
- package/dist/tools.d.ts +16 -1
- package/dist/tools.js +17 -1
- package/dist/tools.js.map +1 -1
- package/package.json +7 -4
package/README.md
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# @rotifer/mcp-server
|
|
2
|
+
|
|
3
|
+
MCP (Model Context Protocol) server for the [Rotifer Protocol](https://rotifer.dev) Gene ecosystem. Lets AI agents search, inspect, compare, and rank Genes directly from any MCP-compatible IDE.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
### Cursor
|
|
8
|
+
|
|
9
|
+
Add to `.cursor/mcp.json`:
|
|
10
|
+
|
|
11
|
+
```json
|
|
12
|
+
{
|
|
13
|
+
"mcpServers": {
|
|
14
|
+
"rotifer": {
|
|
15
|
+
"command": "npx",
|
|
16
|
+
"args": ["-y", "@rotifer/mcp-server"]
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### Claude Desktop
|
|
23
|
+
|
|
24
|
+
Add to `claude_desktop_config.json`:
|
|
25
|
+
|
|
26
|
+
```json
|
|
27
|
+
{
|
|
28
|
+
"mcpServers": {
|
|
29
|
+
"rotifer": {
|
|
30
|
+
"command": "npx",
|
|
31
|
+
"args": ["-y", "@rotifer/mcp-server"]
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Windsurf / Other MCP Clients
|
|
38
|
+
|
|
39
|
+
Use the same `npx` command — any client that supports MCP stdio transport will work.
|
|
40
|
+
|
|
41
|
+
## Tools
|
|
42
|
+
|
|
43
|
+
| Tool | Description |
|
|
44
|
+
|------|-------------|
|
|
45
|
+
| `search_genes` | Search the Gene ecosystem by name, domain, or description |
|
|
46
|
+
| `get_gene_detail` | Get detailed info about a specific Gene (phenotype, fitness, metadata) |
|
|
47
|
+
| `get_arena_rankings` | Get Arena rankings for a domain, sorted by F(g) fitness score |
|
|
48
|
+
| `compare_genes` | Side-by-side fitness comparison of 2–5 Genes |
|
|
49
|
+
| `get_gene_stats` | Download statistics for a Gene (total, 7d, 30d, 90d) |
|
|
50
|
+
| `get_leaderboard` | Developer reputation leaderboard |
|
|
51
|
+
| `get_developer_profile` | Developer public profile and reputation data |
|
|
52
|
+
| `list_local_genes` | Scan local workspace for installed Genes |
|
|
53
|
+
|
|
54
|
+
## Resources
|
|
55
|
+
|
|
56
|
+
MCP Resources let AI clients reference Rotifer data as context:
|
|
57
|
+
|
|
58
|
+
| URI Template | Description |
|
|
59
|
+
|---|---|
|
|
60
|
+
| `rotifer://genes/{gene_id}/stats` | Gene download statistics |
|
|
61
|
+
| `rotifer://genes/{gene_id}` | Gene detail + phenotype |
|
|
62
|
+
| `rotifer://developers/{username}` | Developer profile + reputation |
|
|
63
|
+
| `rotifer://leaderboard` | Top developers by reputation score |
|
|
64
|
+
| `rotifer://local/genes` | Local Gene inventory |
|
|
65
|
+
|
|
66
|
+
### Examples
|
|
67
|
+
|
|
68
|
+
**Search for web search genes:**
|
|
69
|
+
|
|
70
|
+
> "Search for genes in the search.web domain"
|
|
71
|
+
|
|
72
|
+
**Find the best gene for a task:**
|
|
73
|
+
|
|
74
|
+
> "Show me Arena rankings for code.format"
|
|
75
|
+
|
|
76
|
+
**Compare two genes:**
|
|
77
|
+
|
|
78
|
+
> "Compare these two genes: [id-1] vs [id-2]"
|
|
79
|
+
|
|
80
|
+
**Check download trends:**
|
|
81
|
+
|
|
82
|
+
> "Show me download stats for this gene"
|
|
83
|
+
|
|
84
|
+
**Explore local workspace:**
|
|
85
|
+
|
|
86
|
+
> "What genes are installed locally?"
|
|
87
|
+
|
|
88
|
+
## Configuration
|
|
89
|
+
|
|
90
|
+
Zero-config by default — connects to the public Rotifer Cloud API.
|
|
91
|
+
|
|
92
|
+
To use a custom endpoint, create `~/.rotifer/cloud.json`:
|
|
93
|
+
|
|
94
|
+
```json
|
|
95
|
+
{
|
|
96
|
+
"endpoint": "https://your-supabase-instance.supabase.co",
|
|
97
|
+
"anonKey": "your-anon-key"
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Or set environment variables:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
ROTIFER_CLOUD_ENDPOINT=https://your-instance.supabase.co
|
|
105
|
+
ROTIFER_CLOUD_ANON_KEY=your-anon-key
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Requirements
|
|
109
|
+
|
|
110
|
+
- Node.js >= 20
|
|
111
|
+
|
|
112
|
+
## Links
|
|
113
|
+
|
|
114
|
+
- [Rotifer Protocol](https://rotifer.dev)
|
|
115
|
+
- [MCP Setup Guide](https://rotifer.dev/docs/guides/mcp-setup)
|
|
116
|
+
- [Gene Marketplace](https://rotifer.ai)
|
|
117
|
+
- [Protocol Specification](https://gitlab.com/rotifer-protocol/rotifer-spec)
|
|
118
|
+
|
|
119
|
+
## License
|
|
120
|
+
|
|
121
|
+
Apache-2.0
|
package/dist/cloud.d.ts
CHANGED
|
@@ -57,4 +57,34 @@ export declare function getArenaRankings(options: {
|
|
|
57
57
|
page?: number;
|
|
58
58
|
perPage?: number;
|
|
59
59
|
}): Promise<ArenaRankingsResult>;
|
|
60
|
+
export interface GeneStats {
|
|
61
|
+
total: number;
|
|
62
|
+
last_7d: number;
|
|
63
|
+
last_30d: number;
|
|
64
|
+
last_90d: number;
|
|
65
|
+
}
|
|
66
|
+
export declare function getGeneStatsRpc(geneId: string): Promise<GeneStats>;
|
|
67
|
+
export interface LeaderboardEntry {
|
|
68
|
+
user_id: string;
|
|
69
|
+
username: string;
|
|
70
|
+
avatar_url: string | null;
|
|
71
|
+
score: number;
|
|
72
|
+
genes_published: number;
|
|
73
|
+
total_downloads: number;
|
|
74
|
+
arena_wins: number;
|
|
75
|
+
}
|
|
76
|
+
export declare function getReputationLeaderboard(limit?: number): Promise<LeaderboardEntry[]>;
|
|
77
|
+
export interface DeveloperProfile {
|
|
78
|
+
user_id: string;
|
|
79
|
+
username: string;
|
|
80
|
+
avatar_url: string | null;
|
|
81
|
+
created_at: string;
|
|
82
|
+
reputation: {
|
|
83
|
+
score: number;
|
|
84
|
+
genes_published: number;
|
|
85
|
+
total_downloads: number;
|
|
86
|
+
arena_wins: number;
|
|
87
|
+
} | null;
|
|
88
|
+
}
|
|
89
|
+
export declare function getDeveloperProfile(username: string): Promise<DeveloperProfile>;
|
|
60
90
|
export {};
|
package/dist/cloud.js
CHANGED
|
@@ -30,6 +30,10 @@ function apiUrl(path) {
|
|
|
30
30
|
const config = loadCloudConfig();
|
|
31
31
|
return `${config.endpoint.replace(/\/+$/, "")}/rest/v1${path}`;
|
|
32
32
|
}
|
|
33
|
+
function rpcUrl(fnName) {
|
|
34
|
+
const config = loadCloudConfig();
|
|
35
|
+
return `${config.endpoint.replace(/\/+$/, "")}/rest/v1/rpc/${fnName}`;
|
|
36
|
+
}
|
|
33
37
|
function headers() {
|
|
34
38
|
const config = loadCloudConfig();
|
|
35
39
|
return {
|
|
@@ -71,8 +75,9 @@ export async function listGenes(options) {
|
|
|
71
75
|
params.set("or", `(name.ilike.*${q}*,description.ilike.*${q}*)`);
|
|
72
76
|
}
|
|
73
77
|
}
|
|
74
|
-
const limit = Math.min(options.perPage || 20, 50);
|
|
75
|
-
const
|
|
78
|
+
const limit = Math.max(1, Math.min(options.perPage || 20, 50));
|
|
79
|
+
const page = Math.max(1, options.page || 1);
|
|
80
|
+
const offset = (page - 1) * limit;
|
|
76
81
|
params.set("limit", String(limit));
|
|
77
82
|
params.set("offset", String(offset));
|
|
78
83
|
const res = await fetch(apiUrl(`/genes?${params}`), {
|
|
@@ -94,7 +99,7 @@ export async function listGenes(options) {
|
|
|
94
99
|
created_at: row.created_at,
|
|
95
100
|
updated_at: row.updated_at,
|
|
96
101
|
}));
|
|
97
|
-
return { genes, total, page
|
|
102
|
+
return { genes, total, page, per_page: limit };
|
|
98
103
|
}
|
|
99
104
|
export async function getGene(id) {
|
|
100
105
|
const params = new URLSearchParams();
|
|
@@ -122,33 +127,82 @@ export async function getGene(id) {
|
|
|
122
127
|
};
|
|
123
128
|
}
|
|
124
129
|
export async function getArenaRankings(options) {
|
|
125
|
-
const params = new URLSearchParams();
|
|
126
|
-
params.set("select", "fitness_value,safety_score,total_calls,last_evaluated,domain,genes(id,name,fidelity,reputation_score,profiles(username))");
|
|
127
|
-
params.set("order", "fitness_value.desc");
|
|
128
|
-
if (options.domain)
|
|
129
|
-
params.set("domain", `eq.${options.domain}`);
|
|
130
130
|
const limit = Math.min(options.perPage || 20, 50);
|
|
131
131
|
const offset = ((options.page || 1) - 1) * limit;
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
132
|
+
const res = await fetch(rpcUrl("get_arena_rankings"), {
|
|
133
|
+
method: "POST",
|
|
134
|
+
headers: headers(),
|
|
135
|
+
body: JSON.stringify({
|
|
136
|
+
p_domain: options.domain || null,
|
|
137
|
+
p_limit: limit,
|
|
138
|
+
p_offset: offset,
|
|
139
|
+
}),
|
|
136
140
|
});
|
|
137
|
-
const total = parseInt(res.headers.get("content-range")?.split("/")[1] || "0", 10);
|
|
138
141
|
const data = await handleResponse(res);
|
|
139
|
-
const rankings = data.map((row
|
|
140
|
-
rank:
|
|
141
|
-
gene_id: row.
|
|
142
|
-
gene_name: row.
|
|
143
|
-
owner: row.
|
|
142
|
+
const rankings = data.map((row) => ({
|
|
143
|
+
rank: Number(row.rank),
|
|
144
|
+
gene_id: row.gene_id,
|
|
145
|
+
gene_name: row.gene_name,
|
|
146
|
+
owner: row.owner_username,
|
|
144
147
|
domain: row.domain,
|
|
145
|
-
fidelity: row.
|
|
148
|
+
fidelity: row.fidelity,
|
|
146
149
|
fitness: row.fitness_value,
|
|
147
150
|
safety: row.safety_score,
|
|
148
|
-
reputation_score:
|
|
149
|
-
total_calls: row.total_calls || 0,
|
|
151
|
+
reputation_score: null,
|
|
152
|
+
total_calls: Number(row.total_calls) || 0,
|
|
150
153
|
last_evaluated: row.last_evaluated,
|
|
151
154
|
}));
|
|
152
|
-
return { rankings, total, domain: options.domain || null };
|
|
155
|
+
return { rankings, total: rankings.length, domain: options.domain || null };
|
|
156
|
+
}
|
|
157
|
+
export async function getGeneStatsRpc(geneId) {
|
|
158
|
+
const res = await fetch(rpcUrl("get_gene_stats"), {
|
|
159
|
+
method: "POST",
|
|
160
|
+
headers: headers(),
|
|
161
|
+
body: JSON.stringify({ p_gene_id: geneId }),
|
|
162
|
+
});
|
|
163
|
+
const data = await handleResponse(res);
|
|
164
|
+
if (data.error)
|
|
165
|
+
throw new Error(data.error);
|
|
166
|
+
return {
|
|
167
|
+
total: data.total ?? 0,
|
|
168
|
+
last_7d: data.last_7d ?? 0,
|
|
169
|
+
last_30d: data.last_30d ?? 0,
|
|
170
|
+
last_90d: data.last_90d ?? 0,
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
export async function getReputationLeaderboard(limit = 20) {
|
|
174
|
+
const res = await fetch(rpcUrl("get_reputation_leaderboard"), {
|
|
175
|
+
method: "POST",
|
|
176
|
+
headers: headers(),
|
|
177
|
+
body: JSON.stringify({ p_limit: Math.min(limit, 100) }),
|
|
178
|
+
});
|
|
179
|
+
return handleResponse(res);
|
|
180
|
+
}
|
|
181
|
+
export async function getDeveloperProfile(username) {
|
|
182
|
+
const params = new URLSearchParams();
|
|
183
|
+
params.set("username", `eq.${username}`);
|
|
184
|
+
params.set("select", "id,username,avatar_url,created_at,developer_reputation(score,genes_published,total_downloads,arena_wins)");
|
|
185
|
+
const res = await fetch(apiUrl(`/profiles?${params}`), {
|
|
186
|
+
headers: headers(),
|
|
187
|
+
});
|
|
188
|
+
const data = await handleResponse(res);
|
|
189
|
+
if (data.length === 0)
|
|
190
|
+
throw new Error(`Developer '${username}' not found`);
|
|
191
|
+
const row = data[0];
|
|
192
|
+
const rep = row.developer_reputation?.[0] || row.developer_reputation;
|
|
193
|
+
return {
|
|
194
|
+
user_id: row.id,
|
|
195
|
+
username: row.username,
|
|
196
|
+
avatar_url: row.avatar_url || null,
|
|
197
|
+
created_at: row.created_at,
|
|
198
|
+
reputation: rep
|
|
199
|
+
? {
|
|
200
|
+
score: rep.score,
|
|
201
|
+
genes_published: rep.genes_published,
|
|
202
|
+
total_downloads: Number(rep.total_downloads),
|
|
203
|
+
arena_wins: rep.arena_wins,
|
|
204
|
+
}
|
|
205
|
+
: null,
|
|
206
|
+
};
|
|
153
207
|
}
|
|
154
208
|
//# sourceMappingURL=cloud.js.map
|
package/dist/cloud.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloud.js","sourceRoot":"","sources":["../src/cloud.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,MAAM,YAAY,GAAG,IAAI,CACvB,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,MAAM,EACrD,UAAU,CACX,CAAC;AAOF,MAAM,gBAAgB,GACpB,kNAAkN,CAAC;AAErN,IAAI,aAAa,GAAuB,IAAI,CAAC;AAE7C,MAAM,UAAU,eAAe;IAC7B,IAAI,aAAa;QAAE,OAAO,aAAa,CAAC;IAExC,MAAM,UAAU,GAAG,IAAI,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;IACpD,I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C"}
|
package/dist/index.js
CHANGED
|
@@ -1,88 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
3
2
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
4
|
-
import {
|
|
5
|
-
import { searchGenes, getGeneDetail, arenaRankings, compareGenes } from "./tools.js";
|
|
6
|
-
const server = new Server({ name: "rotifer", version: "0.1.0" }, { capabilities: { tools: {} } });
|
|
7
|
-
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
8
|
-
tools: [
|
|
9
|
-
{
|
|
10
|
-
name: "search_genes",
|
|
11
|
-
description: "Search the Rotifer Gene ecosystem. Returns a list of Genes matching the query, filterable by domain and fidelity.",
|
|
12
|
-
inputSchema: {
|
|
13
|
-
type: "object",
|
|
14
|
-
properties: {
|
|
15
|
-
query: { type: "string", description: "Free-text search by gene name or description" },
|
|
16
|
-
domain: { type: "string", description: "Filter by capability domain (e.g. search.web, code.format)" },
|
|
17
|
-
fidelity: { type: "string", enum: ["Wrapped", "Hybrid", "Native", "Unknown"], description: "Filter by gene fidelity type" },
|
|
18
|
-
page: { type: "number", description: "Page number (default 1)" },
|
|
19
|
-
perPage: { type: "number", description: "Results per page (default 20, max 50)" },
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
name: "get_gene_detail",
|
|
25
|
-
description: "Get detailed information about a specific Gene by its ID, including phenotype, fitness, and metadata.",
|
|
26
|
-
inputSchema: {
|
|
27
|
-
type: "object",
|
|
28
|
-
properties: {
|
|
29
|
-
id: { type: "string", description: "Gene UUID" },
|
|
30
|
-
},
|
|
31
|
-
required: ["id"],
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
name: "get_arena_rankings",
|
|
36
|
-
description: "Get Arena rankings for a domain. Genes are sorted by F(g) fitness score. Use this to find the best Gene for a capability.",
|
|
37
|
-
inputSchema: {
|
|
38
|
-
type: "object",
|
|
39
|
-
properties: {
|
|
40
|
-
domain: { type: "string", description: "Capability domain (e.g. search.web)" },
|
|
41
|
-
page: { type: "number", description: "Page number (default 1)" },
|
|
42
|
-
perPage: { type: "number", description: "Results per page (default 20)" },
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
name: "compare_genes",
|
|
48
|
-
description: "Compare two or more Genes by their F(g) fitness metrics. Returns side-by-side fitness breakdown.",
|
|
49
|
-
inputSchema: {
|
|
50
|
-
type: "object",
|
|
51
|
-
properties: {
|
|
52
|
-
gene_ids: {
|
|
53
|
-
type: "array",
|
|
54
|
-
items: { type: "string" },
|
|
55
|
-
description: "Array of Gene UUIDs to compare (2-5)",
|
|
56
|
-
minItems: 2,
|
|
57
|
-
maxItems: 5,
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
required: ["gene_ids"],
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
],
|
|
64
|
-
}));
|
|
65
|
-
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
66
|
-
const { name, arguments: args } = request.params;
|
|
67
|
-
try {
|
|
68
|
-
switch (name) {
|
|
69
|
-
case "search_genes":
|
|
70
|
-
return { content: [{ type: "text", text: JSON.stringify(await searchGenes(args), null, 2) }] };
|
|
71
|
-
case "get_gene_detail":
|
|
72
|
-
return { content: [{ type: "text", text: JSON.stringify(await getGeneDetail(args), null, 2) }] };
|
|
73
|
-
case "get_arena_rankings":
|
|
74
|
-
return { content: [{ type: "text", text: JSON.stringify(await arenaRankings(args), null, 2) }] };
|
|
75
|
-
case "compare_genes":
|
|
76
|
-
return { content: [{ type: "text", text: JSON.stringify(await compareGenes(args), null, 2) }] };
|
|
77
|
-
default:
|
|
78
|
-
return { content: [{ type: "text", text: `Unknown tool: ${name}` }], isError: true };
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
catch (error) {
|
|
82
|
-
return { content: [{ type: "text", text: `Error: ${error.message}` }], isError: true };
|
|
83
|
-
}
|
|
84
|
-
});
|
|
3
|
+
import { createServer } from "./server.js";
|
|
85
4
|
async function main() {
|
|
5
|
+
const server = createServer();
|
|
86
6
|
const transport = new StdioServerTransport();
|
|
87
7
|
await server.connect(transport);
|
|
88
8
|
}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,KAAK,UAAU,IAAI;IACjB,MAAM,MAAM,GAAG,YAAY,EAAE,CAAC;IAC9B,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AAClC,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACnB,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IAC7B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/dist/local.d.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export interface LocalGene {
|
|
2
|
+
name: string;
|
|
3
|
+
path: string;
|
|
4
|
+
domain: string;
|
|
5
|
+
fidelity: string;
|
|
6
|
+
version: string | null;
|
|
7
|
+
author: string | null;
|
|
8
|
+
description: string | null;
|
|
9
|
+
has_wasm: boolean;
|
|
10
|
+
has_source: boolean;
|
|
11
|
+
cloud?: {
|
|
12
|
+
id: string;
|
|
13
|
+
owner: string;
|
|
14
|
+
version: string;
|
|
15
|
+
};
|
|
16
|
+
compiled?: {
|
|
17
|
+
ir_hash: string;
|
|
18
|
+
compiled_at: string;
|
|
19
|
+
wasm_size: number | null;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export interface ListLocalGenesResult {
|
|
23
|
+
project_root: string;
|
|
24
|
+
genes_dir: string;
|
|
25
|
+
genes: LocalGene[];
|
|
26
|
+
total: number;
|
|
27
|
+
}
|
|
28
|
+
export declare function listLocalGenes(options: {
|
|
29
|
+
project_root?: string;
|
|
30
|
+
domain?: string;
|
|
31
|
+
fidelity?: string;
|
|
32
|
+
}): ListLocalGenesResult;
|
package/dist/local.js
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { readFileSync, readdirSync, existsSync, statSync } from "node:fs";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
function readJson(path) {
|
|
4
|
+
try {
|
|
5
|
+
return JSON.parse(readFileSync(path, "utf-8"));
|
|
6
|
+
}
|
|
7
|
+
catch {
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
function resolveProjectRoot(hint) {
|
|
12
|
+
if (hint && existsSync(hint))
|
|
13
|
+
return hint;
|
|
14
|
+
return process.cwd();
|
|
15
|
+
}
|
|
16
|
+
function resolveGenesDir(root) {
|
|
17
|
+
const config = readJson(join(root, "rotifer.json"));
|
|
18
|
+
return join(root, config?.genes_dir || "genes");
|
|
19
|
+
}
|
|
20
|
+
export function listLocalGenes(options) {
|
|
21
|
+
const root = resolveProjectRoot(options.project_root);
|
|
22
|
+
const genesDir = resolveGenesDir(root);
|
|
23
|
+
if (!existsSync(genesDir)) {
|
|
24
|
+
return { project_root: root, genes_dir: genesDir, genes: [], total: 0 };
|
|
25
|
+
}
|
|
26
|
+
let entries;
|
|
27
|
+
try {
|
|
28
|
+
entries = readdirSync(genesDir).filter((name) => {
|
|
29
|
+
const p = join(genesDir, name);
|
|
30
|
+
return statSync(p).isDirectory() && existsSync(join(p, "phenotype.json"));
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
catch {
|
|
34
|
+
return { project_root: root, genes_dir: genesDir, genes: [], total: 0 };
|
|
35
|
+
}
|
|
36
|
+
let genes = entries.map((name) => {
|
|
37
|
+
const geneDir = join(genesDir, name);
|
|
38
|
+
const phenotype = readJson(join(geneDir, "phenotype.json"));
|
|
39
|
+
const cloud = readJson(join(geneDir, ".cloud-manifest.json"));
|
|
40
|
+
const compiled = readJson(join(geneDir, ".compile-result.json"));
|
|
41
|
+
return {
|
|
42
|
+
name,
|
|
43
|
+
path: geneDir,
|
|
44
|
+
domain: phenotype?.domain || "unknown",
|
|
45
|
+
fidelity: phenotype?.fidelity || "Unknown",
|
|
46
|
+
version: phenotype?.version || cloud?.version || null,
|
|
47
|
+
author: phenotype?.author || cloud?.owner || null,
|
|
48
|
+
description: phenotype?.description || null,
|
|
49
|
+
has_wasm: existsSync(join(geneDir, "gene.ir.wasm")),
|
|
50
|
+
has_source: existsSync(join(geneDir, "index.ts")),
|
|
51
|
+
...(cloud && {
|
|
52
|
+
cloud: { id: cloud.cloud_id, owner: cloud.owner, version: cloud.version },
|
|
53
|
+
}),
|
|
54
|
+
...(compiled && {
|
|
55
|
+
compiled: {
|
|
56
|
+
ir_hash: compiled.irHash,
|
|
57
|
+
compiled_at: compiled.compiledAt,
|
|
58
|
+
wasm_size: compiled.totalSize ?? null,
|
|
59
|
+
},
|
|
60
|
+
}),
|
|
61
|
+
};
|
|
62
|
+
});
|
|
63
|
+
if (options.domain) {
|
|
64
|
+
genes = genes.filter((g) => g.domain === options.domain || g.domain.startsWith(options.domain + "."));
|
|
65
|
+
}
|
|
66
|
+
if (options.fidelity) {
|
|
67
|
+
genes = genes.filter((g) => g.fidelity === options.fidelity);
|
|
68
|
+
}
|
|
69
|
+
genes.sort((a, b) => a.domain.localeCompare(b.domain) || a.name.localeCompare(b.name));
|
|
70
|
+
return { project_root: root, genes_dir: genesDir, genes, total: genes.length };
|
|
71
|
+
}
|
|
72
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AAQ,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC;AACjF,CAAC"}
|
package/dist/server.d.ts
ADDED
package/dist/server.js
ADDED
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
2
|
+
import { CallToolRequestSchema, ListToolsRequestSchema, ListResourceTemplatesRequestSchema, ReadResourceRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
|
|
3
|
+
import { searchGenes, getGeneDetail, arenaRankings, compareGenes, geneStats, leaderboard, developerProfile, listLocalGenes } from "./tools.js";
|
|
4
|
+
import { getGeneStatsRpc, getReputationLeaderboard, getDeveloperProfile, getGene } from "./cloud.js";
|
|
5
|
+
export function createServer() {
|
|
6
|
+
const server = new Server({ name: "rotifer", version: "0.2.0" }, { capabilities: { tools: {}, resources: {} } });
|
|
7
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
8
|
+
tools: [
|
|
9
|
+
{
|
|
10
|
+
name: "search_genes",
|
|
11
|
+
description: "Search the Rotifer Gene ecosystem. Returns a list of Genes matching the query, filterable by domain and fidelity.",
|
|
12
|
+
inputSchema: {
|
|
13
|
+
type: "object",
|
|
14
|
+
properties: {
|
|
15
|
+
query: { type: "string", description: "Free-text search by gene name or description" },
|
|
16
|
+
domain: { type: "string", description: "Filter by capability domain (e.g. search.web, code.format)" },
|
|
17
|
+
fidelity: { type: "string", enum: ["Wrapped", "Hybrid", "Native", "Unknown"], description: "Filter by gene fidelity type" },
|
|
18
|
+
page: { type: "number", description: "Page number (default 1)" },
|
|
19
|
+
perPage: { type: "number", description: "Results per page (default 20, max 50)" },
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
name: "get_gene_detail",
|
|
25
|
+
description: "Get detailed information about a specific Gene by its ID, including phenotype, fitness, and metadata.",
|
|
26
|
+
inputSchema: {
|
|
27
|
+
type: "object",
|
|
28
|
+
properties: {
|
|
29
|
+
id: { type: "string", description: "Gene UUID" },
|
|
30
|
+
},
|
|
31
|
+
required: ["id"],
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: "get_arena_rankings",
|
|
36
|
+
description: "Get Arena rankings for a domain. Genes are sorted by F(g) fitness score. Use this to find the best Gene for a capability.",
|
|
37
|
+
inputSchema: {
|
|
38
|
+
type: "object",
|
|
39
|
+
properties: {
|
|
40
|
+
domain: { type: "string", description: "Capability domain (e.g. search.web)" },
|
|
41
|
+
page: { type: "number", description: "Page number (default 1)" },
|
|
42
|
+
perPage: { type: "number", description: "Results per page (default 20)" },
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: "compare_genes",
|
|
48
|
+
description: "Compare two or more Genes by their F(g) fitness metrics. Returns side-by-side fitness breakdown.",
|
|
49
|
+
inputSchema: {
|
|
50
|
+
type: "object",
|
|
51
|
+
properties: {
|
|
52
|
+
gene_ids: {
|
|
53
|
+
type: "array",
|
|
54
|
+
items: { type: "string" },
|
|
55
|
+
description: "Array of Gene UUIDs to compare (2-5)",
|
|
56
|
+
minItems: 2,
|
|
57
|
+
maxItems: 5,
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
required: ["gene_ids"],
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: "get_gene_stats",
|
|
65
|
+
description: "Get download statistics for a Gene, broken down by time period (total, last 7 days, 30 days, 90 days).",
|
|
66
|
+
inputSchema: {
|
|
67
|
+
type: "object",
|
|
68
|
+
properties: {
|
|
69
|
+
gene_id: { type: "string", description: "Gene UUID" },
|
|
70
|
+
},
|
|
71
|
+
required: ["gene_id"],
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: "get_leaderboard",
|
|
76
|
+
description: "Get the developer reputation leaderboard. Shows top developers ranked by reputation score, including their published gene count, total downloads, and arena wins.",
|
|
77
|
+
inputSchema: {
|
|
78
|
+
type: "object",
|
|
79
|
+
properties: {
|
|
80
|
+
limit: { type: "number", description: "Number of entries to return (default 20, max 100)" },
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: "get_developer_profile",
|
|
86
|
+
description: "Get a developer's public profile and reputation data by username.",
|
|
87
|
+
inputSchema: {
|
|
88
|
+
type: "object",
|
|
89
|
+
properties: {
|
|
90
|
+
username: { type: "string", description: "Developer username" },
|
|
91
|
+
},
|
|
92
|
+
required: ["username"],
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
name: "list_local_genes",
|
|
97
|
+
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.",
|
|
98
|
+
inputSchema: {
|
|
99
|
+
type: "object",
|
|
100
|
+
properties: {
|
|
101
|
+
project_root: { type: "string", description: "Project root path (defaults to current working directory)" },
|
|
102
|
+
domain: { type: "string", description: "Filter by domain prefix (e.g. 'search' matches 'search.web')" },
|
|
103
|
+
fidelity: { type: "string", enum: ["Wrapped", "Hybrid", "Native", "Unknown"], description: "Filter by fidelity type" },
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
],
|
|
108
|
+
}));
|
|
109
|
+
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
110
|
+
const { name, arguments: args } = request.params;
|
|
111
|
+
try {
|
|
112
|
+
switch (name) {
|
|
113
|
+
case "search_genes":
|
|
114
|
+
return { content: [{ type: "text", text: JSON.stringify(await searchGenes(args), null, 2) }] };
|
|
115
|
+
case "get_gene_detail":
|
|
116
|
+
return { content: [{ type: "text", text: JSON.stringify(await getGeneDetail(args), null, 2) }] };
|
|
117
|
+
case "get_arena_rankings":
|
|
118
|
+
return { content: [{ type: "text", text: JSON.stringify(await arenaRankings(args), null, 2) }] };
|
|
119
|
+
case "compare_genes":
|
|
120
|
+
return { content: [{ type: "text", text: JSON.stringify(await compareGenes(args), null, 2) }] };
|
|
121
|
+
case "get_gene_stats":
|
|
122
|
+
return { content: [{ type: "text", text: JSON.stringify(await geneStats(args), null, 2) }] };
|
|
123
|
+
case "get_leaderboard":
|
|
124
|
+
return { content: [{ type: "text", text: JSON.stringify(await leaderboard(args), null, 2) }] };
|
|
125
|
+
case "get_developer_profile":
|
|
126
|
+
return { content: [{ type: "text", text: JSON.stringify(await developerProfile(args), null, 2) }] };
|
|
127
|
+
case "list_local_genes":
|
|
128
|
+
return { content: [{ type: "text", text: JSON.stringify(listLocalGenes(args), null, 2) }] };
|
|
129
|
+
default:
|
|
130
|
+
return { content: [{ type: "text", text: `Unknown tool: ${name}` }], isError: true };
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
catch (error) {
|
|
134
|
+
return { content: [{ type: "text", text: `Error: ${error.message}` }], isError: true };
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
server.setRequestHandler(ListResourceTemplatesRequestSchema, async () => ({
|
|
138
|
+
resourceTemplates: [
|
|
139
|
+
{
|
|
140
|
+
uriTemplate: "rotifer://genes/{gene_id}/stats",
|
|
141
|
+
name: "Gene Download Statistics",
|
|
142
|
+
description: "Download statistics for a Gene broken down by time period (total, 7d, 30d, 90d)",
|
|
143
|
+
mimeType: "application/json",
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
uriTemplate: "rotifer://developers/{username}",
|
|
147
|
+
name: "Developer Profile",
|
|
148
|
+
description: "A developer's public profile and reputation data",
|
|
149
|
+
mimeType: "application/json",
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
uriTemplate: "rotifer://genes/{gene_id}",
|
|
153
|
+
name: "Gene Detail",
|
|
154
|
+
description: "Full metadata and phenotype for a specific Gene",
|
|
155
|
+
mimeType: "application/json",
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
uriTemplate: "rotifer://leaderboard",
|
|
159
|
+
name: "Reputation Leaderboard",
|
|
160
|
+
description: "Top developers ranked by reputation score",
|
|
161
|
+
mimeType: "application/json",
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
uriTemplate: "rotifer://local/genes",
|
|
165
|
+
name: "Local Gene Inventory",
|
|
166
|
+
description: "All Genes installed in the current project workspace",
|
|
167
|
+
mimeType: "application/json",
|
|
168
|
+
},
|
|
169
|
+
],
|
|
170
|
+
}));
|
|
171
|
+
server.setRequestHandler(ReadResourceRequestSchema, async (request) => {
|
|
172
|
+
const { uri } = request.params;
|
|
173
|
+
const geneStatsMatch = uri.match(/^rotifer:\/\/genes\/([^/]+)\/stats$/);
|
|
174
|
+
if (geneStatsMatch) {
|
|
175
|
+
const data = await getGeneStatsRpc(geneStatsMatch[1]);
|
|
176
|
+
return {
|
|
177
|
+
contents: [{ uri, mimeType: "application/json", text: JSON.stringify(data, null, 2) }],
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
const geneDetailMatch = uri.match(/^rotifer:\/\/genes\/([^/]+)$/);
|
|
181
|
+
if (geneDetailMatch) {
|
|
182
|
+
const data = await getGene(geneDetailMatch[1]);
|
|
183
|
+
return {
|
|
184
|
+
contents: [{ uri, mimeType: "application/json", text: JSON.stringify(data, null, 2) }],
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
const devMatch = uri.match(/^rotifer:\/\/developers\/([^/]+)$/);
|
|
188
|
+
if (devMatch) {
|
|
189
|
+
const data = await getDeveloperProfile(devMatch[1]);
|
|
190
|
+
return {
|
|
191
|
+
contents: [{ uri, mimeType: "application/json", text: JSON.stringify(data, null, 2) }],
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
if (uri === "rotifer://leaderboard") {
|
|
195
|
+
const data = await getReputationLeaderboard(20);
|
|
196
|
+
return {
|
|
197
|
+
contents: [{ uri, mimeType: "application/json", text: JSON.stringify(data, null, 2) }],
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
if (uri === "rotifer://local/genes") {
|
|
201
|
+
const data = listLocalGenes({});
|
|
202
|
+
return {
|
|
203
|
+
contents: [{ uri, mimeType: "application/json", text: JSON.stringify(data, null, 2) }],
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
throw new Error(`Unknown resource URI: ${uri}`);
|
|
207
|
+
});
|
|
208
|
+
return server;
|
|
209
|
+
}
|
|
210
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,kCAAkC,EAClC,yBAAyB,GAC1B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC/I,OAAO,EAAE,eAAe,EAAE,wBAAwB,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErG,MAAM,UAAU,YAAY;IAC1B,MAAM,MAAM,GAAG,IAAI,MAAM,CACvB,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,EACrC,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,EAAE,CAC/C,CAAC;IAEF,MAAM,CAAC,iBAAiB,CAAC,sBAAsB,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;QAC5D,KAAK,EAAE;YACL;gBACE,IAAI,EAAE,cAAc;gBACpB,WAAW,EACT,mHAAmH;gBACrH,WAAW,EAAE;oBACX,IAAI,EAAE,QAAiB;oBACvB,UAAU,EAAE;wBACV,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,8CAA8C,EAAE;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AE,CAAC,CAAC,EAAE,CAAC;aACvF,CAAC;QACJ,CAAC;QAED,MAAM,IAAI,KAAK,CAAC,yBAAyB,GAAG,EAAE,CAAC,CAAC;IAClD,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/dist/tools.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Gene, type GeneListResult, type ArenaRankingsResult } from "./cloud.js";
|
|
1
|
+
import { type Gene, type GeneListResult, type ArenaRankingsResult, type GeneStats, type LeaderboardEntry, type DeveloperProfile } from "./cloud.js";
|
|
2
2
|
export declare function searchGenes(args: {
|
|
3
3
|
query?: string;
|
|
4
4
|
domain?: string;
|
|
@@ -16,6 +16,21 @@ export declare function arenaRankings(args: {
|
|
|
16
16
|
page?: number;
|
|
17
17
|
perPage?: number;
|
|
18
18
|
}): Promise<ArenaRankingsResult>;
|
|
19
|
+
export declare function geneStats(args: {
|
|
20
|
+
gene_id: string;
|
|
21
|
+
}): Promise<GeneStats & {
|
|
22
|
+
gene_id: string;
|
|
23
|
+
}>;
|
|
24
|
+
export declare function leaderboard(args: {
|
|
25
|
+
limit?: number;
|
|
26
|
+
}): Promise<{
|
|
27
|
+
developers: LeaderboardEntry[];
|
|
28
|
+
count: number;
|
|
29
|
+
}>;
|
|
30
|
+
export declare function developerProfile(args: {
|
|
31
|
+
username: string;
|
|
32
|
+
}): Promise<DeveloperProfile>;
|
|
33
|
+
export { listLocalGenes } from "./local.js";
|
|
19
34
|
export declare function compareGenes(args: {
|
|
20
35
|
gene_ids: string[];
|
|
21
36
|
}): Promise<{
|
package/dist/tools.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { listGenes, getGene, getArenaRankings, } from "./cloud.js";
|
|
1
|
+
import { listGenes, getGene, getArenaRankings, getGeneStatsRpc, getReputationLeaderboard, getDeveloperProfile, } from "./cloud.js";
|
|
2
2
|
export async function searchGenes(args) {
|
|
3
3
|
return listGenes({
|
|
4
4
|
query: args.query,
|
|
@@ -20,6 +20,22 @@ export async function arenaRankings(args) {
|
|
|
20
20
|
perPage: Math.min(args.perPage || 20, 50),
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
|
+
export async function geneStats(args) {
|
|
24
|
+
if (!args.gene_id)
|
|
25
|
+
throw new Error("gene_id is required");
|
|
26
|
+
const stats = await getGeneStatsRpc(args.gene_id);
|
|
27
|
+
return { gene_id: args.gene_id, ...stats };
|
|
28
|
+
}
|
|
29
|
+
export async function leaderboard(args) {
|
|
30
|
+
const data = await getReputationLeaderboard(args.limit || 20);
|
|
31
|
+
return { developers: data, count: data.length };
|
|
32
|
+
}
|
|
33
|
+
export async function developerProfile(args) {
|
|
34
|
+
if (!args.username)
|
|
35
|
+
throw new Error("username is required");
|
|
36
|
+
return getDeveloperProfile(args.username);
|
|
37
|
+
}
|
|
38
|
+
export { listLocalGenes } from "./local.js";
|
|
23
39
|
export async function compareGenes(args) {
|
|
24
40
|
if (!args.gene_ids || args.gene_ids.length < 2) {
|
|
25
41
|
throw new Error("At least 2 gene_ids required for comparison");
|
package/dist/tools.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,OAAO,EACP,gBAAgB,
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,OAAO,EACP,gBAAgB,EAChB,eAAe,EACf,wBAAwB,EACxB,mBAAmB,GAOpB,MAAM,YAAY,CAAC;AAEpB,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,IAMjC;IACC,OAAO,SAAS,CAAC;QACf,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,MAAM,EAAE,IAAI,CAAC,MAAM;QACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,IAAI,EAAE,IAAI,CA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GAAG,CAAC,CAAC,CAAC,gBAAgB,IAAI,CAAC,CAAC,CAChE,CAAC;IACF,MAAM,IAAI,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IAEvB,OAAO;QACL,UAAU;QACV,cAAc,EAAE,IAAI;YAClB,CAAC,CAAC,gCAAgC,IAAI,CAAC,SAAS,4BAA4B,IAAI,CAAC,gBAAgB,IAAI,KAAK,gFAAgF;YAC1L,CAAC,CAAC,uCAAuC;KAC5C,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rotifer/mcp-server",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Rotifer Protocol MCP Server — search,
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Rotifer Protocol MCP Server — search, compare, and explore Genes via Model Context Protocol",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"mcp-server": "./dist/index.js",
|
|
@@ -15,7 +15,9 @@
|
|
|
15
15
|
"build": "tsc",
|
|
16
16
|
"dev": "tsx src/index.ts",
|
|
17
17
|
"start": "node dist/index.js",
|
|
18
|
-
"prepublishOnly": "npm run build"
|
|
18
|
+
"prepublishOnly": "npm run build",
|
|
19
|
+
"test": "vitest run",
|
|
20
|
+
"test:watch": "vitest"
|
|
19
21
|
},
|
|
20
22
|
"keywords": [
|
|
21
23
|
"rotifer",
|
|
@@ -36,7 +38,8 @@
|
|
|
36
38
|
"devDependencies": {
|
|
37
39
|
"@types/node": "^25.5.0",
|
|
38
40
|
"tsx": "^4.0.0",
|
|
39
|
-
"typescript": "^5.4.0"
|
|
41
|
+
"typescript": "^5.4.0",
|
|
42
|
+
"vitest": "^4.1.0"
|
|
40
43
|
},
|
|
41
44
|
"engines": {
|
|
42
45
|
"node": ">=20"
|