codetyper-cli 0.2.0 → 0.2.2
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 +23 -3
- package/dist/index.js +741 -43
- package/package.json +1 -1
- package/src/version.json +1 -1
package/README.md
CHANGED
|
@@ -284,11 +284,31 @@ CodeTyper has access to these built-in tools:
|
|
|
284
284
|
Connect external MCP (Model Context Protocol) servers for extended capabilities:
|
|
285
285
|
|
|
286
286
|
```bash
|
|
287
|
-
#
|
|
288
|
-
/mcp
|
|
289
|
-
|
|
287
|
+
# Browse and search available servers
|
|
288
|
+
/mcp browse # Interactive browser
|
|
289
|
+
/mcp search <query> # Search by keyword
|
|
290
|
+
/mcp popular # Show popular servers
|
|
291
|
+
/mcp categories # List all categories
|
|
292
|
+
|
|
293
|
+
# Install a server
|
|
294
|
+
/mcp install sqlite
|
|
295
|
+
/mcp install github
|
|
296
|
+
|
|
297
|
+
# Manage servers
|
|
298
|
+
/mcp status # Show connected servers
|
|
299
|
+
/mcp connect # Connect all servers
|
|
300
|
+
/mcp disconnect # Disconnect all servers
|
|
301
|
+
/mcp tools # List available tools
|
|
302
|
+
/mcp add # Add custom server
|
|
290
303
|
```
|
|
291
304
|
|
|
305
|
+
**MCP Browser Features:**
|
|
306
|
+
- Search by name, description, or tags
|
|
307
|
+
- Filter by category (database, web, AI, etc.)
|
|
308
|
+
- View server details and required environment variables
|
|
309
|
+
- One-click installation and connection
|
|
310
|
+
- 15+ verified servers from Anthropic
|
|
311
|
+
|
|
292
312
|
## Extensibility
|
|
293
313
|
|
|
294
314
|
### Hooks System
|
package/dist/index.js
CHANGED
|
@@ -65601,7 +65601,7 @@ var logIdCounter = 0, generateLogId = () => `log-${++logIdCounter}-${Date.now()}
|
|
|
65601
65601
|
selectedIndex: 0
|
|
65602
65602
|
}), AppStoreProvider, useAppStore, storeRef = null, setAppStoreRef = (store) => {
|
|
65603
65603
|
storeRef = store;
|
|
65604
|
-
}, appStore;
|
|
65604
|
+
}, defaultAppState, appStore;
|
|
65605
65605
|
var init_app = __esm(async () => {
|
|
65606
65606
|
init_server();
|
|
65607
65607
|
init_server2();
|
|
@@ -66062,10 +66062,36 @@ var init_app = __esm(async () => {
|
|
|
66062
66062
|
};
|
|
66063
66063
|
}
|
|
66064
66064
|
}));
|
|
66065
|
+
defaultAppState = {
|
|
66066
|
+
mode: "idle",
|
|
66067
|
+
screenMode: "home",
|
|
66068
|
+
interactionMode: "agent",
|
|
66069
|
+
currentAgent: "default",
|
|
66070
|
+
inputBuffer: "",
|
|
66071
|
+
logs: [],
|
|
66072
|
+
currentToolCall: null,
|
|
66073
|
+
permissionRequest: null,
|
|
66074
|
+
learningPrompt: null,
|
|
66075
|
+
thinkingMessage: null,
|
|
66076
|
+
sessionId: null,
|
|
66077
|
+
provider: "copilot",
|
|
66078
|
+
model: "",
|
|
66079
|
+
version: "0.1.0",
|
|
66080
|
+
sessionStats: createInitialSessionStats(),
|
|
66081
|
+
cascadeEnabled: true,
|
|
66082
|
+
todosVisible: true,
|
|
66083
|
+
debugLogVisible: false,
|
|
66084
|
+
interruptPending: false,
|
|
66085
|
+
exitPending: false,
|
|
66086
|
+
isCompacting: false,
|
|
66087
|
+
streamingLog: createInitialStreamingState(),
|
|
66088
|
+
suggestions: createInitialSuggestionState()
|
|
66089
|
+
};
|
|
66065
66090
|
appStore = {
|
|
66066
66091
|
getState: () => {
|
|
66067
|
-
if (!storeRef)
|
|
66068
|
-
|
|
66092
|
+
if (!storeRef) {
|
|
66093
|
+
return defaultAppState;
|
|
66094
|
+
}
|
|
66069
66095
|
return {
|
|
66070
66096
|
mode: storeRef.mode(),
|
|
66071
66097
|
screenMode: storeRef.screenMode(),
|
|
@@ -66094,177 +66120,177 @@ var init_app = __esm(async () => {
|
|
|
66094
66120
|
},
|
|
66095
66121
|
addLog: (entry) => {
|
|
66096
66122
|
if (!storeRef)
|
|
66097
|
-
|
|
66123
|
+
return "";
|
|
66098
66124
|
return storeRef.addLog(entry);
|
|
66099
66125
|
},
|
|
66100
66126
|
updateLog: (id, updates) => {
|
|
66101
66127
|
if (!storeRef)
|
|
66102
|
-
|
|
66128
|
+
return;
|
|
66103
66129
|
storeRef.updateLog(id, updates);
|
|
66104
66130
|
},
|
|
66105
66131
|
setMode: (mode) => {
|
|
66106
66132
|
if (!storeRef)
|
|
66107
|
-
|
|
66133
|
+
return;
|
|
66108
66134
|
storeRef.setMode(mode);
|
|
66109
66135
|
},
|
|
66110
66136
|
toggleInteractionMode: () => {
|
|
66111
66137
|
if (!storeRef)
|
|
66112
|
-
|
|
66138
|
+
return;
|
|
66113
66139
|
storeRef.toggleInteractionMode();
|
|
66114
66140
|
},
|
|
66115
66141
|
setCurrentAgent: (agent) => {
|
|
66116
66142
|
if (!storeRef)
|
|
66117
|
-
|
|
66143
|
+
return;
|
|
66118
66144
|
storeRef.setCurrentAgent(agent);
|
|
66119
66145
|
},
|
|
66120
66146
|
setCurrentToolCall: (toolCall) => {
|
|
66121
66147
|
if (!storeRef)
|
|
66122
|
-
|
|
66148
|
+
return;
|
|
66123
66149
|
storeRef.setCurrentToolCall(toolCall);
|
|
66124
66150
|
},
|
|
66125
66151
|
updateToolCall: (updates) => {
|
|
66126
66152
|
if (!storeRef)
|
|
66127
|
-
|
|
66153
|
+
return;
|
|
66128
66154
|
storeRef.updateToolCall(updates);
|
|
66129
66155
|
},
|
|
66130
66156
|
setThinkingMessage: (message) => {
|
|
66131
66157
|
if (!storeRef)
|
|
66132
|
-
|
|
66158
|
+
return;
|
|
66133
66159
|
storeRef.setThinkingMessage(message);
|
|
66134
66160
|
},
|
|
66135
66161
|
setPermissionRequest: (request) => {
|
|
66136
66162
|
if (!storeRef)
|
|
66137
|
-
|
|
66163
|
+
return;
|
|
66138
66164
|
storeRef.setPermissionRequest(request);
|
|
66139
66165
|
},
|
|
66140
66166
|
setLearningPrompt: (prompt2) => {
|
|
66141
66167
|
if (!storeRef)
|
|
66142
|
-
|
|
66168
|
+
return;
|
|
66143
66169
|
storeRef.setLearningPrompt(prompt2);
|
|
66144
66170
|
},
|
|
66145
66171
|
clearInput: () => {
|
|
66146
66172
|
if (!storeRef)
|
|
66147
|
-
|
|
66173
|
+
return;
|
|
66148
66174
|
storeRef.clearInput();
|
|
66149
66175
|
},
|
|
66150
66176
|
clearLogs: () => {
|
|
66151
66177
|
if (!storeRef)
|
|
66152
|
-
|
|
66178
|
+
return;
|
|
66153
66179
|
storeRef.clearLogs();
|
|
66154
66180
|
},
|
|
66155
66181
|
openCommandMenu: () => {
|
|
66156
66182
|
if (!storeRef)
|
|
66157
|
-
|
|
66183
|
+
return;
|
|
66158
66184
|
storeRef.openCommandMenu();
|
|
66159
66185
|
},
|
|
66160
66186
|
closeCommandMenu: () => {
|
|
66161
66187
|
if (!storeRef)
|
|
66162
|
-
|
|
66188
|
+
return;
|
|
66163
66189
|
storeRef.closeCommandMenu();
|
|
66164
66190
|
},
|
|
66165
66191
|
transitionFromCommandMenu: (newMode) => {
|
|
66166
66192
|
if (!storeRef)
|
|
66167
|
-
|
|
66193
|
+
return;
|
|
66168
66194
|
storeRef.transitionFromCommandMenu(newMode);
|
|
66169
66195
|
},
|
|
66170
66196
|
setAvailableModels: (models) => {
|
|
66171
66197
|
if (!storeRef)
|
|
66172
|
-
|
|
66198
|
+
return;
|
|
66173
66199
|
storeRef.setAvailableModels(models);
|
|
66174
66200
|
},
|
|
66175
66201
|
setModel: (model) => {
|
|
66176
66202
|
if (!storeRef)
|
|
66177
|
-
|
|
66203
|
+
return;
|
|
66178
66204
|
storeRef.setModel(model);
|
|
66179
66205
|
},
|
|
66180
66206
|
startThinking: () => {
|
|
66181
66207
|
if (!storeRef)
|
|
66182
|
-
|
|
66208
|
+
return;
|
|
66183
66209
|
storeRef.startThinking();
|
|
66184
66210
|
},
|
|
66185
66211
|
stopThinking: () => {
|
|
66186
66212
|
if (!storeRef)
|
|
66187
|
-
|
|
66213
|
+
return;
|
|
66188
66214
|
storeRef.stopThinking();
|
|
66189
66215
|
},
|
|
66190
66216
|
addTokens: (input, output) => {
|
|
66191
66217
|
if (!storeRef)
|
|
66192
|
-
|
|
66218
|
+
return;
|
|
66193
66219
|
storeRef.addTokens(input, output);
|
|
66194
66220
|
},
|
|
66195
66221
|
resetSessionStats: () => {
|
|
66196
66222
|
if (!storeRef)
|
|
66197
|
-
|
|
66223
|
+
return;
|
|
66198
66224
|
storeRef.resetSessionStats();
|
|
66199
66225
|
},
|
|
66200
66226
|
toggleTodos: () => {
|
|
66201
66227
|
if (!storeRef)
|
|
66202
|
-
|
|
66228
|
+
return;
|
|
66203
66229
|
storeRef.toggleTodos();
|
|
66204
66230
|
},
|
|
66205
66231
|
toggleDebugLog: () => {
|
|
66206
66232
|
if (!storeRef)
|
|
66207
|
-
|
|
66233
|
+
return;
|
|
66208
66234
|
storeRef.toggleDebugLog();
|
|
66209
66235
|
},
|
|
66210
66236
|
setInterruptPending: (pending) => {
|
|
66211
66237
|
if (!storeRef)
|
|
66212
|
-
|
|
66238
|
+
return;
|
|
66213
66239
|
storeRef.setInterruptPending(pending);
|
|
66214
66240
|
},
|
|
66215
66241
|
setIsCompacting: (compacting) => {
|
|
66216
66242
|
if (!storeRef)
|
|
66217
|
-
|
|
66243
|
+
return;
|
|
66218
66244
|
storeRef.setIsCompacting(compacting);
|
|
66219
66245
|
},
|
|
66220
66246
|
startStreaming: () => {
|
|
66221
66247
|
if (!storeRef)
|
|
66222
|
-
|
|
66248
|
+
return "";
|
|
66223
66249
|
return storeRef.startStreaming();
|
|
66224
66250
|
},
|
|
66225
66251
|
appendStreamContent: (content) => {
|
|
66226
66252
|
if (!storeRef)
|
|
66227
|
-
|
|
66253
|
+
return;
|
|
66228
66254
|
storeRef.appendStreamContent(content);
|
|
66229
66255
|
},
|
|
66230
66256
|
completeStreaming: () => {
|
|
66231
66257
|
if (!storeRef)
|
|
66232
|
-
|
|
66258
|
+
return;
|
|
66233
66259
|
storeRef.completeStreaming();
|
|
66234
66260
|
},
|
|
66235
66261
|
cancelStreaming: () => {
|
|
66236
66262
|
if (!storeRef)
|
|
66237
|
-
|
|
66263
|
+
return;
|
|
66238
66264
|
storeRef.cancelStreaming();
|
|
66239
66265
|
},
|
|
66240
66266
|
setSuggestions: (suggestions) => {
|
|
66241
66267
|
if (!storeRef)
|
|
66242
|
-
|
|
66268
|
+
return;
|
|
66243
66269
|
storeRef.setSuggestions(suggestions);
|
|
66244
66270
|
},
|
|
66245
66271
|
clearSuggestions: () => {
|
|
66246
66272
|
if (!storeRef)
|
|
66247
|
-
|
|
66273
|
+
return;
|
|
66248
66274
|
storeRef.clearSuggestions();
|
|
66249
66275
|
},
|
|
66250
66276
|
hideSuggestions: () => {
|
|
66251
66277
|
if (!storeRef)
|
|
66252
|
-
|
|
66278
|
+
return;
|
|
66253
66279
|
storeRef.hideSuggestions();
|
|
66254
66280
|
},
|
|
66255
66281
|
setProvider: (provider) => {
|
|
66256
66282
|
if (!storeRef)
|
|
66257
|
-
|
|
66283
|
+
return;
|
|
66258
66284
|
storeRef.setProvider(provider);
|
|
66259
66285
|
},
|
|
66260
66286
|
setCascadeEnabled: (enabled) => {
|
|
66261
66287
|
if (!storeRef)
|
|
66262
|
-
|
|
66288
|
+
return;
|
|
66263
66289
|
storeRef.setCascadeEnabled(enabled);
|
|
66264
66290
|
},
|
|
66265
66291
|
toggleCascadeEnabled: () => {
|
|
66266
66292
|
if (!storeRef)
|
|
66267
|
-
|
|
66293
|
+
return;
|
|
66268
66294
|
storeRef.toggleCascadeEnabled();
|
|
66269
66295
|
}
|
|
66270
66296
|
};
|
|
@@ -73666,14 +73692,565 @@ var init_semantic_search = __esm(() => {
|
|
|
73666
73692
|
var version_default;
|
|
73667
73693
|
var init_version = __esm(() => {
|
|
73668
73694
|
version_default = {
|
|
73669
|
-
version: "0.2.
|
|
73695
|
+
version: "0.2.2"
|
|
73696
|
+
};
|
|
73697
|
+
});
|
|
73698
|
+
|
|
73699
|
+
// src/constants/mcp-registry.ts
|
|
73700
|
+
var MCP_REGISTRY_SOURCES, MCP_REGISTRY_CACHE, MCP_CATEGORY_LABELS, MCP_CATEGORY_ICONS, MCP_SEARCH_DEFAULTS, MCP_CURATED_SERVERS, MCP_REGISTRY_ERRORS;
|
|
73701
|
+
var init_mcp_registry = __esm(() => {
|
|
73702
|
+
MCP_REGISTRY_SOURCES = {
|
|
73703
|
+
OFFICIAL: "https://raw.githubusercontent.com/modelcontextprotocol/servers/main/README.md",
|
|
73704
|
+
SMITHERY: "https://registry.smithery.ai/servers"
|
|
73705
|
+
};
|
|
73706
|
+
MCP_REGISTRY_CACHE = {
|
|
73707
|
+
DURATION_MS: 60 * 60 * 1000,
|
|
73708
|
+
FILE_NAME: "mcp-registry-cache.json"
|
|
73709
|
+
};
|
|
73710
|
+
MCP_CATEGORY_LABELS = {
|
|
73711
|
+
database: "Database",
|
|
73712
|
+
filesystem: "File System",
|
|
73713
|
+
web: "Web & Browser",
|
|
73714
|
+
ai: "AI & ML",
|
|
73715
|
+
"dev-tools": "Developer Tools",
|
|
73716
|
+
productivity: "Productivity",
|
|
73717
|
+
communication: "Communication",
|
|
73718
|
+
cloud: "Cloud Services",
|
|
73719
|
+
security: "Security",
|
|
73720
|
+
other: "Other"
|
|
73721
|
+
};
|
|
73722
|
+
MCP_CATEGORY_ICONS = {
|
|
73723
|
+
database: "\uD83D\uDDC4️",
|
|
73724
|
+
filesystem: "\uD83D\uDCC1",
|
|
73725
|
+
web: "\uD83C\uDF10",
|
|
73726
|
+
ai: "\uD83E\uDD16",
|
|
73727
|
+
"dev-tools": "\uD83D\uDEE0️",
|
|
73728
|
+
productivity: "\uD83D\uDCCB",
|
|
73729
|
+
communication: "\uD83D\uDCAC",
|
|
73730
|
+
cloud: "☁️",
|
|
73731
|
+
security: "\uD83D\uDD12",
|
|
73732
|
+
other: "\uD83D\uDCE6"
|
|
73733
|
+
};
|
|
73734
|
+
MCP_SEARCH_DEFAULTS = {
|
|
73735
|
+
LIMIT: 20,
|
|
73736
|
+
SORT_BY: "popularity"
|
|
73737
|
+
};
|
|
73738
|
+
MCP_CURATED_SERVERS = [
|
|
73739
|
+
{
|
|
73740
|
+
id: "filesystem",
|
|
73741
|
+
name: "Filesystem",
|
|
73742
|
+
description: "Read, write, and manage files on the local filesystem",
|
|
73743
|
+
author: "Anthropic",
|
|
73744
|
+
repository: "https://github.com/modelcontextprotocol/servers",
|
|
73745
|
+
package: "@modelcontextprotocol/server-filesystem",
|
|
73746
|
+
command: "npx",
|
|
73747
|
+
args: ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/dir"],
|
|
73748
|
+
category: "filesystem",
|
|
73749
|
+
tags: ["files", "read", "write", "directory"],
|
|
73750
|
+
transport: "stdio",
|
|
73751
|
+
version: "latest",
|
|
73752
|
+
popularity: 100,
|
|
73753
|
+
verified: true,
|
|
73754
|
+
installHint: "Replace /path/to/dir with the directory you want to access",
|
|
73755
|
+
updatedAt: "2024-12-01"
|
|
73756
|
+
},
|
|
73757
|
+
{
|
|
73758
|
+
id: "sqlite",
|
|
73759
|
+
name: "SQLite",
|
|
73760
|
+
description: "Query and manage SQLite databases",
|
|
73761
|
+
author: "Anthropic",
|
|
73762
|
+
repository: "https://github.com/modelcontextprotocol/servers",
|
|
73763
|
+
package: "@modelcontextprotocol/server-sqlite",
|
|
73764
|
+
command: "npx",
|
|
73765
|
+
args: ["-y", "@modelcontextprotocol/server-sqlite", "/path/to/db.sqlite"],
|
|
73766
|
+
category: "database",
|
|
73767
|
+
tags: ["sql", "database", "query", "sqlite"],
|
|
73768
|
+
transport: "stdio",
|
|
73769
|
+
version: "latest",
|
|
73770
|
+
popularity: 95,
|
|
73771
|
+
verified: true,
|
|
73772
|
+
installHint: "Replace /path/to/db.sqlite with your database file path",
|
|
73773
|
+
updatedAt: "2024-12-01"
|
|
73774
|
+
},
|
|
73775
|
+
{
|
|
73776
|
+
id: "postgres",
|
|
73777
|
+
name: "PostgreSQL",
|
|
73778
|
+
description: "Connect to and query PostgreSQL databases",
|
|
73779
|
+
author: "Anthropic",
|
|
73780
|
+
repository: "https://github.com/modelcontextprotocol/servers",
|
|
73781
|
+
package: "@modelcontextprotocol/server-postgres",
|
|
73782
|
+
command: "npx",
|
|
73783
|
+
args: ["-y", "@modelcontextprotocol/server-postgres"],
|
|
73784
|
+
category: "database",
|
|
73785
|
+
tags: ["sql", "database", "query", "postgres", "postgresql"],
|
|
73786
|
+
transport: "stdio",
|
|
73787
|
+
version: "latest",
|
|
73788
|
+
popularity: 90,
|
|
73789
|
+
verified: true,
|
|
73790
|
+
envVars: ["POSTGRES_CONNECTION_STRING"],
|
|
73791
|
+
installHint: "Set POSTGRES_CONNECTION_STRING environment variable",
|
|
73792
|
+
updatedAt: "2024-12-01"
|
|
73793
|
+
},
|
|
73794
|
+
{
|
|
73795
|
+
id: "github",
|
|
73796
|
+
name: "GitHub",
|
|
73797
|
+
description: "Interact with GitHub repositories, issues, and pull requests",
|
|
73798
|
+
author: "Anthropic",
|
|
73799
|
+
repository: "https://github.com/modelcontextprotocol/servers",
|
|
73800
|
+
package: "@modelcontextprotocol/server-github",
|
|
73801
|
+
command: "npx",
|
|
73802
|
+
args: ["-y", "@modelcontextprotocol/server-github"],
|
|
73803
|
+
category: "dev-tools",
|
|
73804
|
+
tags: ["github", "git", "repository", "issues", "pr"],
|
|
73805
|
+
transport: "stdio",
|
|
73806
|
+
version: "latest",
|
|
73807
|
+
popularity: 92,
|
|
73808
|
+
verified: true,
|
|
73809
|
+
envVars: ["GITHUB_PERSONAL_ACCESS_TOKEN"],
|
|
73810
|
+
installHint: "Set GITHUB_PERSONAL_ACCESS_TOKEN environment variable",
|
|
73811
|
+
updatedAt: "2024-12-01"
|
|
73812
|
+
},
|
|
73813
|
+
{
|
|
73814
|
+
id: "gitlab",
|
|
73815
|
+
name: "GitLab",
|
|
73816
|
+
description: "Interact with GitLab repositories and CI/CD",
|
|
73817
|
+
author: "Anthropic",
|
|
73818
|
+
repository: "https://github.com/modelcontextprotocol/servers",
|
|
73819
|
+
package: "@modelcontextprotocol/server-gitlab",
|
|
73820
|
+
command: "npx",
|
|
73821
|
+
args: ["-y", "@modelcontextprotocol/server-gitlab"],
|
|
73822
|
+
category: "dev-tools",
|
|
73823
|
+
tags: ["gitlab", "git", "repository", "ci", "cd"],
|
|
73824
|
+
transport: "stdio",
|
|
73825
|
+
version: "latest",
|
|
73826
|
+
popularity: 75,
|
|
73827
|
+
verified: true,
|
|
73828
|
+
envVars: ["GITLAB_PERSONAL_ACCESS_TOKEN", "GITLAB_API_URL"],
|
|
73829
|
+
installHint: "Set GITLAB_PERSONAL_ACCESS_TOKEN and optionally GITLAB_API_URL",
|
|
73830
|
+
updatedAt: "2024-12-01"
|
|
73831
|
+
},
|
|
73832
|
+
{
|
|
73833
|
+
id: "slack",
|
|
73834
|
+
name: "Slack",
|
|
73835
|
+
description: "Send messages and interact with Slack workspaces",
|
|
73836
|
+
author: "Anthropic",
|
|
73837
|
+
repository: "https://github.com/modelcontextprotocol/servers",
|
|
73838
|
+
package: "@modelcontextprotocol/server-slack",
|
|
73839
|
+
command: "npx",
|
|
73840
|
+
args: ["-y", "@modelcontextprotocol/server-slack"],
|
|
73841
|
+
category: "communication",
|
|
73842
|
+
tags: ["slack", "messaging", "chat", "team"],
|
|
73843
|
+
transport: "stdio",
|
|
73844
|
+
version: "latest",
|
|
73845
|
+
popularity: 80,
|
|
73846
|
+
verified: true,
|
|
73847
|
+
envVars: ["SLACK_BOT_TOKEN", "SLACK_TEAM_ID"],
|
|
73848
|
+
installHint: "Set SLACK_BOT_TOKEN and SLACK_TEAM_ID environment variables",
|
|
73849
|
+
updatedAt: "2024-12-01"
|
|
73850
|
+
},
|
|
73851
|
+
{
|
|
73852
|
+
id: "google-drive",
|
|
73853
|
+
name: "Google Drive",
|
|
73854
|
+
description: "Access and manage files in Google Drive",
|
|
73855
|
+
author: "Anthropic",
|
|
73856
|
+
repository: "https://github.com/modelcontextprotocol/servers",
|
|
73857
|
+
package: "@modelcontextprotocol/server-gdrive",
|
|
73858
|
+
command: "npx",
|
|
73859
|
+
args: ["-y", "@modelcontextprotocol/server-gdrive"],
|
|
73860
|
+
category: "cloud",
|
|
73861
|
+
tags: ["google", "drive", "cloud", "storage", "files"],
|
|
73862
|
+
transport: "stdio",
|
|
73863
|
+
version: "latest",
|
|
73864
|
+
popularity: 78,
|
|
73865
|
+
verified: true,
|
|
73866
|
+
installHint: "Requires Google OAuth credentials setup",
|
|
73867
|
+
updatedAt: "2024-12-01"
|
|
73868
|
+
},
|
|
73869
|
+
{
|
|
73870
|
+
id: "memory",
|
|
73871
|
+
name: "Memory",
|
|
73872
|
+
description: "Persistent memory and knowledge graph for context",
|
|
73873
|
+
author: "Anthropic",
|
|
73874
|
+
repository: "https://github.com/modelcontextprotocol/servers",
|
|
73875
|
+
package: "@modelcontextprotocol/server-memory",
|
|
73876
|
+
command: "npx",
|
|
73877
|
+
args: ["-y", "@modelcontextprotocol/server-memory"],
|
|
73878
|
+
category: "ai",
|
|
73879
|
+
tags: ["memory", "knowledge", "graph", "context", "persistent"],
|
|
73880
|
+
transport: "stdio",
|
|
73881
|
+
version: "latest",
|
|
73882
|
+
popularity: 85,
|
|
73883
|
+
verified: true,
|
|
73884
|
+
updatedAt: "2024-12-01"
|
|
73885
|
+
},
|
|
73886
|
+
{
|
|
73887
|
+
id: "brave-search",
|
|
73888
|
+
name: "Brave Search",
|
|
73889
|
+
description: "Search the web using Brave Search API",
|
|
73890
|
+
author: "Anthropic",
|
|
73891
|
+
repository: "https://github.com/modelcontextprotocol/servers",
|
|
73892
|
+
package: "@modelcontextprotocol/server-brave-search",
|
|
73893
|
+
command: "npx",
|
|
73894
|
+
args: ["-y", "@modelcontextprotocol/server-brave-search"],
|
|
73895
|
+
category: "web",
|
|
73896
|
+
tags: ["search", "web", "brave", "internet"],
|
|
73897
|
+
transport: "stdio",
|
|
73898
|
+
version: "latest",
|
|
73899
|
+
popularity: 82,
|
|
73900
|
+
verified: true,
|
|
73901
|
+
envVars: ["BRAVE_API_KEY"],
|
|
73902
|
+
installHint: "Set BRAVE_API_KEY environment variable",
|
|
73903
|
+
updatedAt: "2024-12-01"
|
|
73904
|
+
},
|
|
73905
|
+
{
|
|
73906
|
+
id: "puppeteer",
|
|
73907
|
+
name: "Puppeteer",
|
|
73908
|
+
description: "Browser automation and web scraping with Puppeteer",
|
|
73909
|
+
author: "Anthropic",
|
|
73910
|
+
repository: "https://github.com/modelcontextprotocol/servers",
|
|
73911
|
+
package: "@modelcontextprotocol/server-puppeteer",
|
|
73912
|
+
command: "npx",
|
|
73913
|
+
args: ["-y", "@modelcontextprotocol/server-puppeteer"],
|
|
73914
|
+
category: "web",
|
|
73915
|
+
tags: ["browser", "automation", "scraping", "puppeteer", "chrome"],
|
|
73916
|
+
transport: "stdio",
|
|
73917
|
+
version: "latest",
|
|
73918
|
+
popularity: 76,
|
|
73919
|
+
verified: true,
|
|
73920
|
+
updatedAt: "2024-12-01"
|
|
73921
|
+
},
|
|
73922
|
+
{
|
|
73923
|
+
id: "fetch",
|
|
73924
|
+
name: "Fetch",
|
|
73925
|
+
description: "Make HTTP requests and fetch web content",
|
|
73926
|
+
author: "Anthropic",
|
|
73927
|
+
repository: "https://github.com/modelcontextprotocol/servers",
|
|
73928
|
+
package: "@modelcontextprotocol/server-fetch",
|
|
73929
|
+
command: "npx",
|
|
73930
|
+
args: ["-y", "@modelcontextprotocol/server-fetch"],
|
|
73931
|
+
category: "web",
|
|
73932
|
+
tags: ["http", "fetch", "api", "request", "web"],
|
|
73933
|
+
transport: "stdio",
|
|
73934
|
+
version: "latest",
|
|
73935
|
+
popularity: 88,
|
|
73936
|
+
verified: true,
|
|
73937
|
+
updatedAt: "2024-12-01"
|
|
73938
|
+
},
|
|
73939
|
+
{
|
|
73940
|
+
id: "sequential-thinking",
|
|
73941
|
+
name: "Sequential Thinking",
|
|
73942
|
+
description: "Step-by-step reasoning and problem-solving",
|
|
73943
|
+
author: "Anthropic",
|
|
73944
|
+
repository: "https://github.com/modelcontextprotocol/servers",
|
|
73945
|
+
package: "@modelcontextprotocol/server-sequential-thinking",
|
|
73946
|
+
command: "npx",
|
|
73947
|
+
args: ["-y", "@modelcontextprotocol/server-sequential-thinking"],
|
|
73948
|
+
category: "ai",
|
|
73949
|
+
tags: ["thinking", "reasoning", "chain-of-thought", "problem-solving"],
|
|
73950
|
+
transport: "stdio",
|
|
73951
|
+
version: "latest",
|
|
73952
|
+
popularity: 70,
|
|
73953
|
+
verified: true,
|
|
73954
|
+
updatedAt: "2024-12-01"
|
|
73955
|
+
},
|
|
73956
|
+
{
|
|
73957
|
+
id: "everart",
|
|
73958
|
+
name: "EverArt",
|
|
73959
|
+
description: "AI image generation with EverArt",
|
|
73960
|
+
author: "Anthropic",
|
|
73961
|
+
repository: "https://github.com/modelcontextprotocol/servers",
|
|
73962
|
+
package: "@modelcontextprotocol/server-everart",
|
|
73963
|
+
command: "npx",
|
|
73964
|
+
args: ["-y", "@modelcontextprotocol/server-everart"],
|
|
73965
|
+
category: "ai",
|
|
73966
|
+
tags: ["image", "generation", "ai", "art", "creative"],
|
|
73967
|
+
transport: "stdio",
|
|
73968
|
+
version: "latest",
|
|
73969
|
+
popularity: 65,
|
|
73970
|
+
verified: true,
|
|
73971
|
+
envVars: ["EVERART_API_KEY"],
|
|
73972
|
+
installHint: "Set EVERART_API_KEY environment variable",
|
|
73973
|
+
updatedAt: "2024-12-01"
|
|
73974
|
+
},
|
|
73975
|
+
{
|
|
73976
|
+
id: "sentry",
|
|
73977
|
+
name: "Sentry",
|
|
73978
|
+
description: "Access Sentry error tracking and monitoring",
|
|
73979
|
+
author: "Anthropic",
|
|
73980
|
+
repository: "https://github.com/modelcontextprotocol/servers",
|
|
73981
|
+
package: "@modelcontextprotocol/server-sentry",
|
|
73982
|
+
command: "npx",
|
|
73983
|
+
args: ["-y", "@modelcontextprotocol/server-sentry"],
|
|
73984
|
+
category: "dev-tools",
|
|
73985
|
+
tags: ["sentry", "errors", "monitoring", "debugging"],
|
|
73986
|
+
transport: "stdio",
|
|
73987
|
+
version: "latest",
|
|
73988
|
+
popularity: 72,
|
|
73989
|
+
verified: true,
|
|
73990
|
+
envVars: ["SENTRY_AUTH_TOKEN", "SENTRY_ORG"],
|
|
73991
|
+
installHint: "Set SENTRY_AUTH_TOKEN and SENTRY_ORG environment variables",
|
|
73992
|
+
updatedAt: "2024-12-01"
|
|
73993
|
+
},
|
|
73994
|
+
{
|
|
73995
|
+
id: "aws-kb-retrieval",
|
|
73996
|
+
name: "AWS Knowledge Base",
|
|
73997
|
+
description: "Retrieve information from AWS Bedrock Knowledge Bases",
|
|
73998
|
+
author: "Anthropic",
|
|
73999
|
+
repository: "https://github.com/modelcontextprotocol/servers",
|
|
74000
|
+
package: "@modelcontextprotocol/server-aws-kb-retrieval",
|
|
74001
|
+
command: "npx",
|
|
74002
|
+
args: ["-y", "@modelcontextprotocol/server-aws-kb-retrieval"],
|
|
74003
|
+
category: "cloud",
|
|
74004
|
+
tags: ["aws", "bedrock", "knowledge-base", "retrieval", "rag"],
|
|
74005
|
+
transport: "stdio",
|
|
74006
|
+
version: "latest",
|
|
74007
|
+
popularity: 68,
|
|
74008
|
+
verified: true,
|
|
74009
|
+
envVars: ["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_REGION"],
|
|
74010
|
+
installHint: "Set AWS credentials environment variables",
|
|
74011
|
+
updatedAt: "2024-12-01"
|
|
74012
|
+
}
|
|
74013
|
+
];
|
|
74014
|
+
MCP_REGISTRY_ERRORS = {
|
|
74015
|
+
FETCH_FAILED: "Failed to fetch MCP registry",
|
|
74016
|
+
PARSE_FAILED: "Failed to parse registry data",
|
|
74017
|
+
NOT_FOUND: "No servers found matching your search",
|
|
74018
|
+
INSTALL_FAILED: "Failed to install MCP server",
|
|
74019
|
+
ALREADY_INSTALLED: "Server is already installed"
|
|
74020
|
+
};
|
|
74021
|
+
});
|
|
74022
|
+
|
|
74023
|
+
// src/services/mcp/registry.ts
|
|
74024
|
+
import { homedir as homedir4 } from "os";
|
|
74025
|
+
import { join as join13 } from "path";
|
|
74026
|
+
var registryCache = null, getCacheFilePath = () => {
|
|
74027
|
+
return join13(homedir4(), ".codetyper", MCP_REGISTRY_CACHE.FILE_NAME);
|
|
74028
|
+
}, loadCache = async () => {
|
|
74029
|
+
try {
|
|
74030
|
+
const cachePath = getCacheFilePath();
|
|
74031
|
+
const file2 = Bun.file(cachePath);
|
|
74032
|
+
if (await file2.exists()) {
|
|
74033
|
+
const data = await file2.json();
|
|
74034
|
+
return data;
|
|
74035
|
+
}
|
|
74036
|
+
} catch {}
|
|
74037
|
+
return null;
|
|
74038
|
+
}, saveCache = async (cache) => {
|
|
74039
|
+
try {
|
|
74040
|
+
const cachePath = getCacheFilePath();
|
|
74041
|
+
await Bun.write(cachePath, JSON.stringify(cache, null, 2));
|
|
74042
|
+
} catch {}
|
|
74043
|
+
}, isCacheValid2 = (cache) => {
|
|
74044
|
+
const now = Date.now();
|
|
74045
|
+
return now - cache.updatedAt < MCP_REGISTRY_CACHE.DURATION_MS;
|
|
74046
|
+
}, fetchFromSmithery = async () => {
|
|
74047
|
+
try {
|
|
74048
|
+
const response2 = await fetch(MCP_REGISTRY_SOURCES.SMITHERY);
|
|
74049
|
+
if (!response2.ok) {
|
|
74050
|
+
return [];
|
|
74051
|
+
}
|
|
74052
|
+
const data = await response2.json();
|
|
74053
|
+
if (Array.isArray(data)) {
|
|
74054
|
+
return data.map((server) => ({
|
|
74055
|
+
id: String(server.name || server.id || ""),
|
|
74056
|
+
name: String(server.displayName || server.name || ""),
|
|
74057
|
+
description: String(server.description || ""),
|
|
74058
|
+
author: String(server.author || server.vendor || "Community"),
|
|
74059
|
+
repository: String(server.homepage || server.repository || ""),
|
|
74060
|
+
package: String(server.qualifiedName || server.package || ""),
|
|
74061
|
+
command: "npx",
|
|
74062
|
+
args: ["-y", String(server.qualifiedName || server.package || "")],
|
|
74063
|
+
category: mapCategory(String(server.category || "other")),
|
|
74064
|
+
tags: Array.isArray(server.tags) ? server.tags.map(String) : [],
|
|
74065
|
+
transport: "stdio",
|
|
74066
|
+
version: String(server.version || "latest"),
|
|
74067
|
+
popularity: Number(server.downloads || server.useCount || 0),
|
|
74068
|
+
verified: Boolean(server.verified || server.isOfficial),
|
|
74069
|
+
installHint: String(server.installHint || ""),
|
|
74070
|
+
envVars: Array.isArray(server.environmentVariables) ? server.environmentVariables.map(String) : undefined,
|
|
74071
|
+
updatedAt: String(server.updatedAt || new Date().toISOString())
|
|
74072
|
+
}));
|
|
74073
|
+
}
|
|
74074
|
+
return [];
|
|
74075
|
+
} catch {
|
|
74076
|
+
return [];
|
|
74077
|
+
}
|
|
74078
|
+
}, mapCategory = (category) => {
|
|
74079
|
+
const categoryMap = {
|
|
74080
|
+
database: "database",
|
|
74081
|
+
databases: "database",
|
|
74082
|
+
db: "database",
|
|
74083
|
+
filesystem: "filesystem",
|
|
74084
|
+
files: "filesystem",
|
|
74085
|
+
file: "filesystem",
|
|
74086
|
+
web: "web",
|
|
74087
|
+
browser: "web",
|
|
74088
|
+
http: "web",
|
|
74089
|
+
ai: "ai",
|
|
74090
|
+
ml: "ai",
|
|
74091
|
+
"machine-learning": "ai",
|
|
74092
|
+
"dev-tools": "dev-tools",
|
|
74093
|
+
developer: "dev-tools",
|
|
74094
|
+
development: "dev-tools",
|
|
74095
|
+
tools: "dev-tools",
|
|
74096
|
+
productivity: "productivity",
|
|
74097
|
+
communication: "communication",
|
|
74098
|
+
chat: "communication",
|
|
74099
|
+
messaging: "communication",
|
|
74100
|
+
cloud: "cloud",
|
|
74101
|
+
aws: "cloud",
|
|
74102
|
+
gcp: "cloud",
|
|
74103
|
+
azure: "cloud",
|
|
74104
|
+
security: "security"
|
|
74105
|
+
};
|
|
74106
|
+
const normalized = category.toLowerCase().trim();
|
|
74107
|
+
return categoryMap[normalized] || "other";
|
|
74108
|
+
}, getAllServers = async (forceRefresh = false) => {
|
|
74109
|
+
if (!forceRefresh && registryCache && isCacheValid2(registryCache)) {
|
|
74110
|
+
return registryCache.servers;
|
|
74111
|
+
}
|
|
74112
|
+
if (!forceRefresh) {
|
|
74113
|
+
const diskCache = await loadCache();
|
|
74114
|
+
if (diskCache && isCacheValid2(diskCache)) {
|
|
74115
|
+
registryCache = diskCache;
|
|
74116
|
+
return diskCache.servers;
|
|
74117
|
+
}
|
|
74118
|
+
}
|
|
74119
|
+
const externalServers = await fetchFromSmithery();
|
|
74120
|
+
const curatedIds = new Set(MCP_CURATED_SERVERS.map((s) => s.id));
|
|
74121
|
+
const filteredExternal = externalServers.filter((s) => !curatedIds.has(s.id));
|
|
74122
|
+
const allServers = [...MCP_CURATED_SERVERS, ...filteredExternal];
|
|
74123
|
+
registryCache = {
|
|
74124
|
+
servers: allServers,
|
|
74125
|
+
updatedAt: Date.now(),
|
|
74126
|
+
source: MCP_REGISTRY_SOURCES.SMITHERY
|
|
74127
|
+
};
|
|
74128
|
+
await saveCache(registryCache);
|
|
74129
|
+
return allServers;
|
|
74130
|
+
}, searchServers = async (options2 = {}) => {
|
|
74131
|
+
const {
|
|
74132
|
+
query = "",
|
|
74133
|
+
category,
|
|
74134
|
+
tags,
|
|
74135
|
+
verifiedOnly = false,
|
|
74136
|
+
sortBy = MCP_SEARCH_DEFAULTS.SORT_BY,
|
|
74137
|
+
limit = MCP_SEARCH_DEFAULTS.LIMIT,
|
|
74138
|
+
offset = 0
|
|
74139
|
+
} = options2;
|
|
74140
|
+
const allServers = await getAllServers();
|
|
74141
|
+
let filtered = allServers;
|
|
74142
|
+
if (query) {
|
|
74143
|
+
const lowerQuery = query.toLowerCase();
|
|
74144
|
+
filtered = filtered.filter((server) => {
|
|
74145
|
+
const searchableText = [
|
|
74146
|
+
server.name,
|
|
74147
|
+
server.description,
|
|
74148
|
+
server.author,
|
|
74149
|
+
...server.tags
|
|
74150
|
+
].join(" ").toLowerCase();
|
|
74151
|
+
return searchableText.includes(lowerQuery);
|
|
74152
|
+
});
|
|
74153
|
+
}
|
|
74154
|
+
if (category) {
|
|
74155
|
+
filtered = filtered.filter((server) => server.category === category);
|
|
74156
|
+
}
|
|
74157
|
+
if (tags && tags.length > 0) {
|
|
74158
|
+
filtered = filtered.filter((server) => tags.some((tag) => server.tags.some((serverTag) => serverTag.toLowerCase().includes(tag.toLowerCase()))));
|
|
74159
|
+
}
|
|
74160
|
+
if (verifiedOnly) {
|
|
74161
|
+
filtered = filtered.filter((server) => server.verified);
|
|
74162
|
+
}
|
|
74163
|
+
const sortFunctions = {
|
|
74164
|
+
popularity: (a2, b2) => b2.popularity - a2.popularity,
|
|
74165
|
+
name: (a2, b2) => a2.name.localeCompare(b2.name),
|
|
74166
|
+
updated: (a2, b2) => new Date(b2.updatedAt).getTime() - new Date(a2.updatedAt).getTime()
|
|
73670
74167
|
};
|
|
74168
|
+
filtered.sort(sortFunctions[sortBy] || sortFunctions.popularity);
|
|
74169
|
+
const total = filtered.length;
|
|
74170
|
+
const paginated = filtered.slice(offset, offset + limit);
|
|
74171
|
+
return {
|
|
74172
|
+
servers: paginated,
|
|
74173
|
+
total,
|
|
74174
|
+
query,
|
|
74175
|
+
category
|
|
74176
|
+
};
|
|
74177
|
+
}, getServerById = async (id) => {
|
|
74178
|
+
const allServers = await getAllServers();
|
|
74179
|
+
return allServers.find((server) => server.id === id);
|
|
74180
|
+
}, isServerInstalled = (serverId) => {
|
|
74181
|
+
const instances = getServerInstances();
|
|
74182
|
+
return instances.some((instance) => instance.config.name === serverId || instance.config.name.toLowerCase() === serverId.toLowerCase());
|
|
74183
|
+
}, installServer = async (server, options2 = {}) => {
|
|
74184
|
+
const { global: global3 = false, connect = true, customArgs } = options2;
|
|
74185
|
+
if (isServerInstalled(server.id)) {
|
|
74186
|
+
return {
|
|
74187
|
+
success: false,
|
|
74188
|
+
serverName: server.id,
|
|
74189
|
+
error: MCP_REGISTRY_ERRORS.ALREADY_INSTALLED,
|
|
74190
|
+
connected: false
|
|
74191
|
+
};
|
|
74192
|
+
}
|
|
74193
|
+
try {
|
|
74194
|
+
await addServer({
|
|
74195
|
+
name: server.id,
|
|
74196
|
+
command: server.command,
|
|
74197
|
+
args: customArgs || server.args,
|
|
74198
|
+
transport: server.transport,
|
|
74199
|
+
enabled: true
|
|
74200
|
+
}, global3);
|
|
74201
|
+
let connected = false;
|
|
74202
|
+
if (connect) {
|
|
74203
|
+
try {
|
|
74204
|
+
await connectServer(server.id);
|
|
74205
|
+
connected = true;
|
|
74206
|
+
} catch {}
|
|
74207
|
+
}
|
|
74208
|
+
return {
|
|
74209
|
+
success: true,
|
|
74210
|
+
serverName: server.id,
|
|
74211
|
+
connected
|
|
74212
|
+
};
|
|
74213
|
+
} catch (error49) {
|
|
74214
|
+
return {
|
|
74215
|
+
success: false,
|
|
74216
|
+
serverName: server.id,
|
|
74217
|
+
error: error49 instanceof Error ? error49.message : MCP_REGISTRY_ERRORS.INSTALL_FAILED,
|
|
74218
|
+
connected: false
|
|
74219
|
+
};
|
|
74220
|
+
}
|
|
74221
|
+
}, installServerById = async (serverId, options2 = {}) => {
|
|
74222
|
+
const server = await getServerById(serverId);
|
|
74223
|
+
if (!server) {
|
|
74224
|
+
return {
|
|
74225
|
+
success: false,
|
|
74226
|
+
serverName: serverId,
|
|
74227
|
+
error: MCP_REGISTRY_ERRORS.NOT_FOUND,
|
|
74228
|
+
connected: false
|
|
74229
|
+
};
|
|
74230
|
+
}
|
|
74231
|
+
return installServer(server, options2);
|
|
74232
|
+
}, getPopularServers = async (limit = 10) => {
|
|
74233
|
+
const allServers = await getAllServers();
|
|
74234
|
+
return allServers.sort((a2, b2) => b2.popularity - a2.popularity).slice(0, limit);
|
|
74235
|
+
}, getCategoriesWithCounts = async () => {
|
|
74236
|
+
const allServers = await getAllServers();
|
|
74237
|
+
const counts = new Map;
|
|
74238
|
+
for (const server of allServers) {
|
|
74239
|
+
const current = counts.get(server.category) || 0;
|
|
74240
|
+
counts.set(server.category, current + 1);
|
|
74241
|
+
}
|
|
74242
|
+
return Array.from(counts.entries()).map(([category, count]) => ({ category, count })).sort((a2, b2) => b2.count - a2.count);
|
|
74243
|
+
};
|
|
74244
|
+
var init_registry2 = __esm(() => {
|
|
74245
|
+
init_mcp_registry();
|
|
74246
|
+
init_manager();
|
|
73671
74247
|
});
|
|
73672
74248
|
|
|
73673
74249
|
// src/services/mcp/index.ts
|
|
73674
74250
|
var init_mcp = __esm(() => {
|
|
73675
74251
|
init_client();
|
|
73676
74252
|
init_manager();
|
|
74253
|
+
init_registry2();
|
|
73677
74254
|
});
|
|
73678
74255
|
|
|
73679
74256
|
// src/services/upgrade.ts
|
|
@@ -105890,6 +106467,7 @@ ${basePrompt}`;
|
|
|
105890
106467
|
// src/commands/components/chat/mcp/handle-mcp.ts
|
|
105891
106468
|
init_source();
|
|
105892
106469
|
init_mcp();
|
|
106470
|
+
init_mcp_registry();
|
|
105893
106471
|
|
|
105894
106472
|
// src/commands/components/chat/mcp/show-mcp-status.ts
|
|
105895
106473
|
init_source();
|
|
@@ -105945,7 +106523,6 @@ MCP Status
|
|
|
105945
106523
|
};
|
|
105946
106524
|
|
|
105947
106525
|
// src/commands/components/chat/mcp/handle-mcp.ts
|
|
105948
|
-
await init_app();
|
|
105949
106526
|
var handleMCP = async (args) => {
|
|
105950
106527
|
const subcommand = args[0] || "status";
|
|
105951
106528
|
const handlers = {
|
|
@@ -105953,12 +106530,17 @@ var handleMCP = async (args) => {
|
|
|
105953
106530
|
connect: handleConnect,
|
|
105954
106531
|
disconnect: handleDisconnect,
|
|
105955
106532
|
tools: handleTools,
|
|
105956
|
-
add: handleAdd
|
|
106533
|
+
add: handleAdd,
|
|
106534
|
+
search: handleSearch,
|
|
106535
|
+
browse: handleBrowse,
|
|
106536
|
+
install: handleInstall,
|
|
106537
|
+
popular: handlePopular,
|
|
106538
|
+
categories: handleCategories
|
|
105957
106539
|
};
|
|
105958
106540
|
const handler = handlers[subcommand];
|
|
105959
106541
|
if (!handler) {
|
|
105960
106542
|
console.log(source_default.yellow(`Unknown MCP command: ${subcommand}`));
|
|
105961
|
-
console.log(source_default.gray("Available: status, connect, disconnect, tools, add"));
|
|
106543
|
+
console.log(source_default.gray("Available: status, connect, disconnect, tools, add, search, browse, install, popular, categories"));
|
|
105962
106544
|
return;
|
|
105963
106545
|
}
|
|
105964
106546
|
await handler(args.slice(1));
|
|
@@ -106035,6 +106617,122 @@ MCP Tools
|
|
|
106035
106617
|
var handleAdd = async (_args) => {
|
|
106036
106618
|
appStore.setMode("mcp_add");
|
|
106037
106619
|
};
|
|
106620
|
+
var handleSearch = async (args) => {
|
|
106621
|
+
const query = args.join(" ");
|
|
106622
|
+
if (!query) {
|
|
106623
|
+
console.log(source_default.yellow(`
|
|
106624
|
+
Usage: /mcp search <query>`));
|
|
106625
|
+
console.log(source_default.gray("Example: /mcp search database"));
|
|
106626
|
+
console.log(source_default.gray("Or use /mcp browse for interactive browser"));
|
|
106627
|
+
console.log();
|
|
106628
|
+
return;
|
|
106629
|
+
}
|
|
106630
|
+
console.log(source_default.gray(`
|
|
106631
|
+
Searching for "${query}"...`));
|
|
106632
|
+
try {
|
|
106633
|
+
const result = await searchServers({ query, limit: 10 });
|
|
106634
|
+
if (result.servers.length === 0) {
|
|
106635
|
+
console.log(source_default.yellow(`
|
|
106636
|
+
No servers found matching your search.`));
|
|
106637
|
+
console.log(source_default.gray("Try /mcp popular to see popular servers"));
|
|
106638
|
+
console.log();
|
|
106639
|
+
return;
|
|
106640
|
+
}
|
|
106641
|
+
console.log(source_default.bold(`
|
|
106642
|
+
Found ${result.total} servers:
|
|
106643
|
+
`));
|
|
106644
|
+
for (const server of result.servers) {
|
|
106645
|
+
const icon = MCP_CATEGORY_ICONS[server.category];
|
|
106646
|
+
const verified = server.verified ? source_default.green(" ✓") : "";
|
|
106647
|
+
console.log(`${icon} ${source_default.white(server.name)}${verified}`);
|
|
106648
|
+
console.log(` ${source_default.gray(server.description)}`);
|
|
106649
|
+
console.log(` ${source_default.cyan("Install:")} /mcp install ${server.id}`);
|
|
106650
|
+
console.log();
|
|
106651
|
+
}
|
|
106652
|
+
} catch (error49) {
|
|
106653
|
+
console.log(source_default.red(`
|
|
106654
|
+
Search failed: ${error49}`));
|
|
106655
|
+
console.log();
|
|
106656
|
+
}
|
|
106657
|
+
};
|
|
106658
|
+
var handleBrowse = async (_args) => {
|
|
106659
|
+
appStore.setMode("mcp_browse");
|
|
106660
|
+
};
|
|
106661
|
+
var handleInstall = async (args) => {
|
|
106662
|
+
const serverId = args[0];
|
|
106663
|
+
if (!serverId) {
|
|
106664
|
+
console.log(source_default.yellow(`
|
|
106665
|
+
Usage: /mcp install <server-id>`));
|
|
106666
|
+
console.log(source_default.gray("Example: /mcp install sqlite"));
|
|
106667
|
+
console.log(source_default.gray("Use /mcp search to find server IDs"));
|
|
106668
|
+
console.log();
|
|
106669
|
+
return;
|
|
106670
|
+
}
|
|
106671
|
+
console.log(source_default.gray(`
|
|
106672
|
+
Installing ${serverId}...`));
|
|
106673
|
+
try {
|
|
106674
|
+
const result = await installServerById(serverId, { connect: true });
|
|
106675
|
+
if (result.success) {
|
|
106676
|
+
console.log(source_default.green(`
|
|
106677
|
+
✓ Installed ${result.serverName}`));
|
|
106678
|
+
if (result.connected) {
|
|
106679
|
+
console.log(source_default.gray(" Server is now connected"));
|
|
106680
|
+
}
|
|
106681
|
+
} else {
|
|
106682
|
+
console.log(source_default.red(`
|
|
106683
|
+
✗ Installation failed: ${result.error}`));
|
|
106684
|
+
}
|
|
106685
|
+
console.log();
|
|
106686
|
+
} catch (error49) {
|
|
106687
|
+
console.log(source_default.red(`
|
|
106688
|
+
Installation failed: ${error49}`));
|
|
106689
|
+
console.log();
|
|
106690
|
+
}
|
|
106691
|
+
};
|
|
106692
|
+
var handlePopular = async (_args) => {
|
|
106693
|
+
console.log(source_default.gray(`
|
|
106694
|
+
Fetching popular servers...`));
|
|
106695
|
+
try {
|
|
106696
|
+
const servers = await getPopularServers(10);
|
|
106697
|
+
console.log(source_default.bold(`
|
|
106698
|
+
Popular MCP Servers:
|
|
106699
|
+
`));
|
|
106700
|
+
for (const server of servers) {
|
|
106701
|
+
const icon = MCP_CATEGORY_ICONS[server.category];
|
|
106702
|
+
const verified = server.verified ? source_default.green(" ✓") : "";
|
|
106703
|
+
console.log(`${icon} ${source_default.white(server.name)}${verified}`);
|
|
106704
|
+
console.log(` ${source_default.gray(server.description)}`);
|
|
106705
|
+
console.log(` ${source_default.cyan("Install:")} /mcp install ${server.id}`);
|
|
106706
|
+
console.log();
|
|
106707
|
+
}
|
|
106708
|
+
} catch (error49) {
|
|
106709
|
+
console.log(source_default.red(`
|
|
106710
|
+
Failed to fetch servers: ${error49}`));
|
|
106711
|
+
console.log();
|
|
106712
|
+
}
|
|
106713
|
+
};
|
|
106714
|
+
var handleCategories = async (_args) => {
|
|
106715
|
+
console.log(source_default.gray(`
|
|
106716
|
+
Fetching categories...`));
|
|
106717
|
+
try {
|
|
106718
|
+
const categories = await getCategoriesWithCounts();
|
|
106719
|
+
console.log(source_default.bold(`
|
|
106720
|
+
MCP Server Categories:
|
|
106721
|
+
`));
|
|
106722
|
+
for (const { category, count } of categories) {
|
|
106723
|
+
const icon = MCP_CATEGORY_ICONS[category];
|
|
106724
|
+
const label = MCP_CATEGORY_LABELS[category];
|
|
106725
|
+
console.log(`${icon} ${source_default.white(label)} ${source_default.gray(`(${count} servers)`)}`);
|
|
106726
|
+
}
|
|
106727
|
+
console.log();
|
|
106728
|
+
console.log(source_default.gray("Use /mcp search <category> to filter by category"));
|
|
106729
|
+
console.log();
|
|
106730
|
+
} catch (error49) {
|
|
106731
|
+
console.log(source_default.red(`
|
|
106732
|
+
Failed to fetch categories: ${error49}`));
|
|
106733
|
+
console.log();
|
|
106734
|
+
}
|
|
106735
|
+
};
|
|
106038
106736
|
|
|
106039
106737
|
// src/commands/components/chat/commands/commandsRegistry.ts
|
|
106040
106738
|
init_terminal2();
|
|
@@ -108272,4 +108970,4 @@ ${plan.steps.map((s) => `${s.id}. ${s.description}`).join(`
|
|
|
108272
108970
|
});
|
|
108273
108971
|
program2.parse(process.argv);
|
|
108274
108972
|
|
|
108275
|
-
//# debugId=
|
|
108973
|
+
//# debugId=0B841F2DBC1F214564756E2164756E21
|
package/package.json
CHANGED
package/src/version.json
CHANGED