@rotifer/mcp-server 0.8.2 → 0.8.5

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 CHANGED
@@ -1,6 +1,20 @@
1
+ <div align="center">
2
+
1
3
  # @rotifer/mcp-server
2
4
 
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.
5
+ [![npm](https://img.shields.io/npm/v/@rotifer/mcp-server)](https://www.npmjs.com/package/@rotifer/mcp-server)
6
+ [![License: Apache-2.0](https://img.shields.io/badge/License-Apache--2.0-blue.svg)](LICENSE)
7
+ [![Node.js](https://img.shields.io/badge/node-%3E%3D20-brightgreen)](https://nodejs.org/)
8
+ [![MCP](https://img.shields.io/badge/MCP-Compatible-indigo)](https://modelcontextprotocol.io)
9
+
10
+ **Search, inspect, compare, and rank AI Genes — directly from your IDE.**
11
+
12
+ MCP server for the [Rotifer Protocol](https://rotifer.dev) Gene ecosystem.
13
+ Works with Cursor, Claude Desktop, Windsurf, and any MCP-compatible client.
14
+
15
+ </div>
16
+
17
+ ---
4
18
 
5
19
  ## Quick Start
6
20
 
@@ -13,7 +27,7 @@ Add to `.cursor/mcp.json`:
13
27
  "mcpServers": {
14
28
  "rotifer": {
15
29
  "command": "npx",
16
- "args": ["-y", "@rotifer/mcp-server"]
30
+ "args": ["@rotifer/mcp-server"]
17
31
  }
18
32
  }
19
33
  }
@@ -28,7 +42,7 @@ Add to `claude_desktop_config.json`:
28
42
  "mcpServers": {
29
43
  "rotifer": {
30
44
  "command": "npx",
31
- "args": ["-y", "@rotifer/mcp-server"]
45
+ "args": ["@rotifer/mcp-server"]
32
46
  }
33
47
  }
34
48
  }
@@ -38,20 +52,83 @@ Add to `claude_desktop_config.json`:
38
52
 
39
53
  Use the same `npx` command — any client that supports MCP stdio transport will work.
40
54
 
41
- ## Tools
55
+ ## What Can It Do?
42
56
 
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 |
57
+ ```
58
+ You: "Find the best gene for web search"
59
+ AI: → search_genes({ query: "web search" })
60
+ Found 8 genes. Top match: genesis-web-search (F(g) = 0.87, Native)
53
61
 
54
- ## Resources
62
+ You: "Compare genesis-web-search vs genesis-web-search-lite"
63
+ AI: → compare_genes({ gene_ids: ["...", "..."] })
64
+ Side-by-side: success rate, latency, fitness breakdown
65
+
66
+ You: "Wrap my function as a gene with domain search.web"
67
+ AI: → wrap_gene({ gene_name: "my-search", domain: "search.web", fidelity: "Wrapped" })
68
+ Created genes/my-search/phenotype.json
69
+
70
+ You: "Compile and publish it"
71
+ AI: → compile_gene({ gene_name: "my-search" })
72
+ → publish_gene({ gene_name: "my-search", changelog: "Initial release" })
73
+ ```
74
+
75
+ ## Tools (29)
76
+
77
+ ### Discovery & Analytics
78
+
79
+ | Tool | Description | Key Parameters |
80
+ |------|-------------|----------------|
81
+ | `search_genes` | Search the Gene ecosystem by name, domain, or description | `query`, `domain`, `fidelity`, `sort` (`relevance`/`newest`/`popular`/`fitness`), `page`, `per_page` |
82
+ | `get_gene_detail` | Get detailed info about a Gene (phenotype, fitness, metadata) | `gene_id`, `content_hash` (either identifies the gene) |
83
+ | `get_arena_rankings` | Arena rankings for a domain, sorted by F(g) fitness | `domain`, `page`, `per_page` |
84
+ | `compare_genes` | Side-by-side fitness comparison of 2–5 Genes | `gene_ids` (array) |
85
+ | `get_gene_stats` | Download statistics (total, 7d, 30d, 90d) | `gene_id` |
86
+ | `get_leaderboard` | Creator reputation leaderboard | `limit` |
87
+ | `get_developer_profile` | Creator public profile and reputation | `username` |
88
+ | `get_gene_reputation` | Detailed reputation breakdown (Arena, Usage, Stability) | `gene_id` |
89
+ | `list_gene_versions` | Version history chain with changelogs | `owner`, `gene_name` |
90
+ | `suggest_domain` | Suggest matching domains from the registry | `description` |
91
+
92
+ ### Local Workspace
93
+
94
+ | Tool | Description | Key Parameters |
95
+ |------|-------------|----------------|
96
+ | `list_local_genes` | Scan local workspace for installed Genes | `project_root`, `domain`, `fidelity` |
97
+ | `list_local_agents` | List Agents in the local workspace | `project_root`, `state` |
98
+
99
+ ### Gene Lifecycle
100
+
101
+ | Tool | Description | Key Parameters |
102
+ |------|-------------|----------------|
103
+ | `init_gene` | Initialize a new Gene project with starter files | `gene_name`, `fidelity`, `domain`, `no_genesis` |
104
+ | `scan_genes` | Scan for candidate functions or SKILL.md files | `path`, `skills`, `skills_path` |
105
+ | `wrap_gene` | Wrap a function/skill as a Gene | `gene_name`, `domain`, `fidelity`, `from_skill`, `from_clawhub` |
106
+ | `test_gene` | Test a Gene (schema validation + sandbox) | `gene_name`, `verbose`, `compliance` |
107
+ | `compile_gene` | Compile a Gene to WASM IR | `gene_name`, `check`, `wasm_path`, `lang` |
108
+ | `run_gene` | Execute a local Gene | `gene_name`, `input`, `verbose`, `no_sandbox`, `trust_unsigned` |
109
+ | `publish_gene` | Publish to Rotifer Cloud | `gene_name`, `all`, `description`, `changelog`, `skip_arena`, `skip_security` |
110
+ | `install_gene` | Install a Gene from Cloud Registry | `gene_id`, `project_root`, `force` |
111
+ | `vg_scan` | V(g) security scan — static analysis for Gene/Skill code safety | `path`, `gene_id`, `all`, `project_root` |
112
+ | `arena_submit` | Submit to Arena with 5D fitness scores | `gene_id`, `fitness_value`, `safety_score`, `success_rate`, `latency_score`, `resource_efficiency` |
113
+
114
+ ### Agent Composition
115
+
116
+ | Tool | Description | Key Parameters |
117
+ |------|-------------|----------------|
118
+ | `create_agent` | Create an Agent composing multiple Genes | `agent_name`, `gene_ids`, `composition` (`Seq`/`Par`/`Cond`/`Try`/`TryPool`), `domain`, `top`, `strategy`, `par_merge` |
119
+ | `agent_run` | Run a local Agent by name | `agent_name`, `input`, `verbose`, `no_sandbox` |
120
+
121
+ ### Authentication & Analytics
122
+
123
+ | Tool | Description | Key Parameters |
124
+ |------|-------------|----------------|
125
+ | `auth_status` | Check login status | — |
126
+ | `login` | OAuth login (GitHub/GitLab) | `provider`, `endpoint` |
127
+ | `logout` | Clear credentials | — |
128
+ | `get_mcp_stats` | MCP call analytics | `days` |
129
+ | `get_my_reputation` | Current user's reputation | — |
130
+
131
+ ## Resources (7)
55
132
 
56
133
  MCP Resources let AI clients reference Rotifer data as context:
57
134
 
@@ -59,31 +136,46 @@ MCP Resources let AI clients reference Rotifer data as context:
59
136
  |---|---|
60
137
  | `rotifer://genes/{gene_id}/stats` | Gene download statistics |
61
138
  | `rotifer://genes/{gene_id}` | Gene detail + phenotype |
62
- | `rotifer://developers/{username}` | Developer profile + reputation |
63
- | `rotifer://leaderboard` | Top developers by reputation score |
139
+ | `rotifer://developers/{username}` | Creator profile + reputation |
140
+ | `rotifer://leaderboard` | Top creators by reputation score |
64
141
  | `rotifer://local/genes` | Local Gene inventory |
142
+ | `rotifer://local/agents` | Local Agent registry |
143
+ | `rotifer://version` | MCP Server version and update availability |
65
144
 
66
- ### Examples
67
-
68
- **Search for web search genes:**
145
+ ## Architecture
69
146
 
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?"
147
+ ```
148
+ ┌─────────────────────────────────────────────────┐
149
+ │ AI IDE (Cursor / Claude / Windsurf) │
150
+ │ │
151
+ "Find genes for code formatting"
152
+ │ │ │
153
+ │ ▼ │
154
+ │ ┌─────────────────────┐ │
155
+ │ │ MCP Client │ │
156
+ │ │ (stdio transport) │ │
157
+ │ └────────┬────────────┘ │
158
+ └───────────┼─────────────────────────────────────┘
159
+ MCP Protocol
160
+
161
+ ┌─────────────────────────────────────────────────┐
162
+ │ @rotifer/mcp-server │
163
+ │ │
164
+ │ 29 Tools 7 Resources Local Scanner │
165
+ │ ┌──────────┐ ┌───────────┐ ┌────────────┐ │
166
+ │ │ discover │ │rotifer:// │ │ ./genes/ │ │
167
+ │ │ lifecycle│ │genes/stats│ │ phenotype │ │
168
+ │ │ agents │ │developers │ │ agents │ │
169
+ │ │ auth │ │leaderboard│ └────────────┘ │
170
+ │ └────┬─────┘ └─────┬─────┘ │ │
171
+ └───────┼──────────────┼────────────────┼─────────┘
172
+ │ │ │
173
+ ▼ ▼ ▼
174
+ ┌─────────────────────────────────────────────────┐
175
+ │ Rotifer Cloud API Local File System │
176
+ │ (Supabase) (genes/, .rotifer/) │
177
+ └─────────────────────────────────────────────────┘
178
+ ```
87
179
 
88
180
  ## Configuration
89
181
 
@@ -111,10 +203,11 @@ ROTIFER_CLOUD_ANON_KEY=your-anon-key
111
203
 
112
204
  ## Links
113
205
 
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://github.com/rotifer-protocol/rotifer-spec)
206
+ - [Rotifer Protocol](https://rotifer.dev) — Main site
207
+ - [MCP Setup Guide](https://rotifer.dev/docs/guides/mcp-setup) — Step-by-step setup
208
+ - [Gene Marketplace](https://rotifer.ai) — Browse and discover Genes
209
+ - [Protocol Specification](https://github.com/rotifer-protocol/rotifer-spec) — Formal spec
210
+ - [CLI Playground](https://github.com/rotifer-protocol/rotifer-playground) — Build and test Genes
118
211
 
119
212
  ## License
120
213
 
package/dist/auth.d.ts CHANGED
@@ -18,7 +18,11 @@ export declare function clearCredentials(): void;
18
18
  export declare function generateCodeVerifier(): string;
19
19
  export declare function generateCodeChallenge(verifier: string): string;
20
20
  /**
21
- * Start a local HTTP server to receive the OAuth callback.
22
- * Handles both PKCE flow (?code=...) and implicit flow (#access_token=...).
21
+ * Start a local OAuth callback server on a random port (127.0.0.1:0).
22
+ * Returns the bound port immediately so the caller can construct the auth URL,
23
+ * plus a promise that resolves when the callback arrives.
23
24
  */
24
- export declare function waitForOAuthCallback(port?: number): Promise<string>;
25
+ export declare function startOAuthCallbackServer(): Promise<{
26
+ port: number;
27
+ waitForCallback: Promise<string>;
28
+ }>;
package/dist/auth.js CHANGED
@@ -1,4 +1,4 @@
1
- import { readFileSync, writeFileSync, existsSync, mkdirSync } from "node:fs";
1
+ import { readFileSync, writeFileSync, existsSync, mkdirSync, unlinkSync } from "node:fs";
2
2
  import { join } from "node:path";
3
3
  import { createServer } from "node:http";
4
4
  import { randomBytes, createHash } from "node:crypto";
@@ -34,7 +34,6 @@ export function saveCredentials(creds) {
34
34
  export function clearCredentials() {
35
35
  const path = credentialsPath();
36
36
  if (existsSync(path)) {
37
- const { unlinkSync } = require("node:fs");
38
37
  unlinkSync(path);
39
38
  }
40
39
  }
@@ -45,13 +44,21 @@ export function generateCodeChallenge(verifier) {
45
44
  return createHash("sha256").update(verifier).digest("base64url");
46
45
  }
47
46
  /**
48
- * Start a local HTTP server to receive the OAuth callback.
49
- * Handles both PKCE flow (?code=...) and implicit flow (#access_token=...).
47
+ * Start a local OAuth callback server on a random port (127.0.0.1:0).
48
+ * Returns the bound port immediately so the caller can construct the auth URL,
49
+ * plus a promise that resolves when the callback arrives.
50
50
  */
51
- export function waitForOAuthCallback(port = 9876) {
51
+ export async function startOAuthCallbackServer() {
52
52
  return new Promise((resolve, reject) => {
53
+ let callbackResolve;
54
+ let callbackReject;
55
+ const waitForCallback = new Promise((res, rej) => {
56
+ callbackResolve = res;
57
+ callbackReject = rej;
58
+ });
53
59
  const server = createServer((req, res) => {
54
- const url = new URL(req.url || "/", `http://localhost:${port}`);
60
+ const boundPort = server.address()?.port || 0;
61
+ const url = new URL(req.url || "/", `http://localhost:${boundPort}`);
55
62
  if (url.pathname === "/callback/token") {
56
63
  const token = url.searchParams.get("access_token");
57
64
  const refresh = url.searchParams.get("refresh_token");
@@ -61,7 +68,7 @@ export function waitForOAuthCallback(port = 9876) {
61
68
  "<p>You can close this window and return to the terminal.</p>" +
62
69
  "</body></html>");
63
70
  server.close();
64
- resolve(`implicit:${token}:${refresh || ""}`);
71
+ callbackResolve(`implicit:${token}:${refresh || ""}`);
65
72
  return;
66
73
  }
67
74
  }
@@ -72,7 +79,7 @@ export function waitForOAuthCallback(port = 9876) {
72
79
  "<p>You can close this window and return to the terminal.</p>" +
73
80
  "</body></html>");
74
81
  server.close();
75
- resolve(code);
82
+ callbackResolve(code);
76
83
  }
77
84
  else {
78
85
  res.writeHead(200, { "Content-Type": "text/html" });
@@ -92,15 +99,16 @@ if (window.location.hash) {
92
99
  </script><noscript>Enable JavaScript to complete login.</noscript></body></html>`);
93
100
  }
94
101
  });
95
- server.listen(port, () => {
96
- // Server ready
102
+ server.listen(0, "127.0.0.1", () => {
103
+ const addr = server.address();
104
+ resolve({ port: addr.port, waitForCallback });
97
105
  });
98
106
  server.on("error", (err) => {
99
107
  reject(new Error(`Failed to start callback server: ${err.message}`));
100
108
  });
101
109
  setTimeout(() => {
102
110
  server.close();
103
- reject(new Error("Login timed out after 120 seconds"));
111
+ callbackReject(new Error("Login timed out after 120 seconds"));
104
112
  }, 120_000);
105
113
  });
106
114
  }
package/dist/auth.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"auth.js","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACj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AC,EAAE,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE;YACzB,MAAM,CAAC,IAAI,KAAK,CAAC,oCAAoC,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;QACvE,CAAC,CAAC,CAAC;QAEH,UAAU,CAAC,GAAG,EAAE;YACd,MAAM,CAAC,KAAK,EAAE,CAAC;YACf,cAAc,CAAC,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC,CAAC;QACjE,CAAC,EAAE,OAAO,CAAC,CAAC;IACd,CAAC,CAAC,CAAC;AACL,CAAC"}
package/dist/cloud.d.ts CHANGED
@@ -11,13 +11,13 @@ export interface Gene {
11
11
  version: string;
12
12
  fidelity: string;
13
13
  description: string;
14
- wasm_size: number;
14
+ wasmSize: number;
15
15
  downloads: number;
16
- reputation_score: number | null;
17
- previous_version_id: string | null;
16
+ reputationScore: number | null;
17
+ previousVersionId: string | null;
18
18
  changelog: string | null;
19
- created_at: string;
20
- updated_at: string;
19
+ createdAt: string;
20
+ updatedAt: string;
21
21
  phenotype?: Record<string, unknown>;
22
22
  }
23
23
  export interface GeneListResult {
@@ -25,6 +25,7 @@ export interface GeneListResult {
25
25
  total: number;
26
26
  page: number;
27
27
  per_page: number;
28
+ has_more: boolean;
28
29
  }
29
30
  export declare function listGenes(options: {
30
31
  domain?: string;
@@ -34,28 +35,34 @@ export declare function listGenes(options: {
34
35
  page?: number;
35
36
  perPage?: number;
36
37
  }): Promise<GeneListResult>;
37
- export declare function getGene(id: string): Promise<Gene & {
38
+ export declare function getGene(idOrName: string): Promise<Gene & {
39
+ phenotype: Record<string, unknown>;
40
+ }>;
41
+ export declare function getGeneByContentHash(hash: string): Promise<Gene & {
38
42
  phenotype: Record<string, unknown>;
39
43
  }>;
40
44
  export interface ArenaEntry {
41
45
  rank: number;
42
- gene_id: string;
43
- gene_name: string;
46
+ geneId: string;
47
+ geneName: string;
44
48
  owner: string;
45
49
  domain: string;
46
50
  fidelity: string;
47
51
  fitness: number;
48
52
  safety: number;
49
- success_rate: number;
50
- latency_score: number;
51
- resource_efficiency: number;
52
- reputation_score: number | null;
53
- total_calls: number;
54
- last_evaluated: string;
53
+ successRate: number;
54
+ latencyScore: number;
55
+ resourceEfficiency: number;
56
+ reputationScore: number | null;
57
+ totalCalls: number;
58
+ lastEvaluated: string;
55
59
  }
56
60
  export interface ArenaRankingsResult {
57
61
  rankings: ArenaEntry[];
58
62
  total: number;
63
+ page: number;
64
+ per_page: number;
65
+ has_more: boolean;
59
66
  domain: string | null;
60
67
  }
61
68
  export declare function getArenaRankings(options: {
@@ -65,31 +72,31 @@ export declare function getArenaRankings(options: {
65
72
  }): Promise<ArenaRankingsResult>;
66
73
  export interface GeneStats {
67
74
  total: number;
68
- last_7d: number;
69
- last_30d: number;
70
- last_90d: number;
75
+ last7d: number;
76
+ last30d: number;
77
+ last90d: number;
71
78
  }
72
79
  export declare function getGeneStatsRpc(geneId: string): Promise<GeneStats>;
73
80
  export interface LeaderboardEntry {
74
- user_id: string;
81
+ userId: string;
75
82
  username: string;
76
- avatar_url: string | null;
83
+ avatarUrl: string | null;
77
84
  score: number;
78
- genes_published: number;
79
- total_downloads: number;
80
- arena_wins: number;
85
+ genesPublished: number;
86
+ totalDownloads: number;
87
+ arenaWins: number;
81
88
  }
82
89
  export declare function getReputationLeaderboard(limit?: number): Promise<LeaderboardEntry[]>;
83
90
  export interface DeveloperProfile {
84
- user_id: string;
91
+ userId: string;
85
92
  username: string;
86
- avatar_url: string | null;
87
- created_at: string;
93
+ avatarUrl: string | null;
94
+ createdAt: string;
88
95
  reputation: {
89
96
  score: number;
90
- genes_published: number;
91
- total_downloads: number;
92
- arena_wins: number;
97
+ genesPublished: number;
98
+ totalDownloads: number;
99
+ arenaWins: number;
93
100
  } | null;
94
101
  }
95
102
  export declare function getDeveloperProfile(username: string): Promise<DeveloperProfile>;
@@ -97,18 +104,18 @@ export interface GeneVersionEntry {
97
104
  id: string;
98
105
  version: string;
99
106
  changelog: string | null;
100
- previous_version_id: string | null;
101
- created_at: string;
107
+ previousVersionId: string | null;
108
+ createdAt: string;
102
109
  }
103
110
  export declare function listGeneVersions(ownerName: string, geneName: string): Promise<GeneVersionEntry[]>;
104
111
  export interface ArenaSubmitResult {
105
- gene_id: string;
112
+ geneId: string;
106
113
  domain: string;
107
- fitness_value: number;
108
- safety_score: number;
109
- success_rate: number;
110
- latency_score: number;
111
- resource_efficiency: number;
114
+ fitnessValue: number;
115
+ safetyScore: number;
116
+ successRate: number;
117
+ latencyScore: number;
118
+ resourceEfficiency: number;
112
119
  }
113
120
  export declare function arenaSubmitCloud(geneId: string, fitness: {
114
121
  value: number;
@@ -118,29 +125,29 @@ export declare function arenaSubmitCloud(geneId: string, fitness: {
118
125
  resource_efficiency: number;
119
126
  }): Promise<ArenaSubmitResult>;
120
127
  export interface GeneReputationResult {
121
- gene_id: string;
122
- gene_name: string;
128
+ geneId: string;
129
+ geneName: string;
123
130
  score: number;
124
- arena_score: number;
125
- usage_score: number;
126
- stability_score: number;
131
+ arenaScore: number;
132
+ usageScore: number;
133
+ stabilityScore: number;
127
134
  epoch: number;
128
- computed_at: string;
135
+ computedAt: string;
129
136
  }
130
137
  export declare function getGeneReputation(geneId: string): Promise<GeneReputationResult>;
131
138
  export interface MyReputationResult {
132
139
  username: string;
133
140
  score: number;
134
- genes_published: number;
135
- total_downloads: number;
136
- arena_wins: number;
137
- community_bonus: number;
141
+ genesPublished: number;
142
+ totalDownloads: number;
143
+ arenaWins: number;
144
+ communityBonus: number;
138
145
  }
139
146
  export declare function getMyReputation(): Promise<MyReputationResult>;
140
147
  export interface DomainSuggestion {
141
148
  domain: string;
142
149
  description: string | null;
143
- gene_count: number;
150
+ geneCount: number;
144
151
  }
145
152
  export declare function suggestDomain(description: string): Promise<DomainSuggestion[]>;
146
153
  export declare function logMcpCall(entry: {
@@ -152,25 +159,25 @@ export declare function logMcpCall(entry: {
152
159
  }): void;
153
160
  export interface McpStatsResult {
154
161
  period: string;
155
- total_calls: number;
156
- success_rate: number;
157
- avg_latency_ms: number;
158
- top_tools: Array<{
159
- tool_name: string;
162
+ totalCalls: number;
163
+ successRate: number;
164
+ avgLatencyMs: number;
165
+ topTools: Array<{
166
+ toolName: string;
160
167
  count: number;
161
168
  }>;
162
- top_genes: Array<{
163
- gene_id: string;
169
+ topGenes: Array<{
170
+ geneId: string;
164
171
  count: number;
165
172
  }>;
166
173
  }
167
174
  export declare function getMcpStats(days?: number): Promise<McpStatsResult>;
168
175
  export interface InstallResult {
169
- gene_id: string;
176
+ geneId: string;
170
177
  name: string;
171
178
  domain: string;
172
179
  fidelity: string;
173
- installed_to: string;
180
+ installedTo: string;
174
181
  }
175
- export declare function installGene(geneId: string, projectRoot: string): Promise<InstallResult>;
182
+ export declare function installGene(geneId: string, projectRoot: string, shouldForce?: boolean): Promise<InstallResult>;
176
183
  export {};