Elffuss BraidHub

kikocis/continue public

Merge pull request #7826 from uinstinct/install-guide-mcp

feat: add installation guides for mcp commands
Changeset8d27d859265e0081584f31449cc69760e5fe96b9c52a3af03e666704d96a2c12
AuthorDallin Romney <dallinromney@gmail.com> · 2025-09-18 12:17 -07:00
CommitterGitHub <noreply@github.com> · 2025-09-18 12:17 -07:00
Parents36262159272d, 0e8f78162e26

Browse the files at this changeset

5 files changed

modified core/context/mcp/MCPConnection.ts +13 −0
@@ -52,6 +52,7 @@
5252 public status: MCPConnectionStatus = "not-connected";
5353 public isProtectedResource = false;
5454 public errors: string[] = [];
55+ public infos: string[] = [];
5556 public prompts: MCPPrompt[] = [];
5657 public tools: MCPTool[] = [];
5758 public resources: MCPResource[] = [];
@@ -93,6 +94,7 @@
9394 return {
9495 ...this.options,
9596 errors: this.errors,
97+ infos: this.infos,
9698 prompts: this.prompts,
9799 resources: this.resources,
98100 resourceTemplates: this.resourceTemplates,
@@ -122,6 +124,7 @@
122124 this.resources = [];
123125 this.resourceTemplates = [];
124126 this.errors = [];
127+ this.infos = [];
125128 this.stdioOutput = { stdout: "", stderr: "" };
126129
127130 this.abortController.abort();
@@ -280,6 +283,16 @@
280283 if (msg.includes("spawn") && msg.includes("enoent")) {
281284 const command = msg.split(" ")[1];
282285 errorMessage += `Error: command "${command}" not found. To use this MCP server, install the ${command} CLI.`;
286+ if (["uv", "uvx"].includes(command)) {
287+ this.infos.push(
288+ 'Please install uv by following the installation guide: <a href="https://docs.astral.sh/uv/getting-started/installation/">https://docs.astral.sh/uv/getting-started/installation/</a>',
289+ );
290+ }
291+ if (["node", "npx"].includes(command)) {
292+ this.infos.push(
293+ 'Please install npx by following the installation guide: <a href="https://docs.npmjs.com/downloading-and-installing-node-js-and-npm">https://docs.npmjs.com/downloading-and-installing-node-js-and-npm</a>',
294+ );
295+ }
283296 } else {
284297 errorMessage += "Error: " + error.message;
285298 }
modified core/context/mcp/MCPConnection.vitest.ts +1 −0
@@ -142,6 +142,7 @@
142142 expect(status).toEqual({
143143 ...options,
144144 errors: [],
145+ infos: [],
145146 isProtectedResource: false,
146147 prompts: [],
147148 resources: [],
modified core/index.d.ts +1 −0
@@ -1335,6 +1335,7 @@
13351335 export interface MCPServerStatus extends MCPOptions {
13361336 status: MCPConnectionStatus;
13371337 errors: string[];
1338+ infos: string[];
13381339 isProtectedResource: boolean;
13391340
13401341 prompts: MCPPrompt[];
modified core/tools/mcpToolName.vitest.ts +1 −0
@@ -5,6 +5,7 @@
55 const createMcpServer = (name: string): MCPServerStatus => ({
66 name,
77 errors: [],
8+ infos: [],
89 prompts: [],
910 tools: [],
1011 resources: [],
modified gui/src/pages/config/sections/ToolsSection.tsx +21 −1
@@ -5,7 +5,6 @@
55 CircleStackIcon,
66 CommandLineIcon,
77 GlobeAltIcon,
8- PlusIcon,
98 UserCircleIcon,
109 WrenchScrewdriverIcon,
1110 } from "@heroicons/react/24/outline";
@@ -268,6 +267,27 @@
268267 ))}
269268 </div>
270269 )}
270+
271+ {server.infos && server.infos.length > 0 && (
272+ <div className="mt-3 space-y-2">
273+ {server.infos.map((info, infoIndex) => (
274+ <Alert
275+ key={infoIndex}
276+ type="info"
277+ size="sm"
278+ className="transition-all"
279+ onClick={() =>
280+ void ideMessenger.ide.showVirtualFile(server.name, info)
281+ }
282+ >
283+ <span
284+ className="text-xs"
285+ dangerouslySetInnerHTML={{ __html: info }}
286+ />
287+ </Alert>
288+ ))}
289+ </div>
290+ )}
271291 </div>
272292 );
273293 }