diff --git a/.changeset/wicked-pears-tickle.md b/.changeset/wicked-pears-tickle.md new file mode 100644 index 0000000000..a2df4034b6 --- /dev/null +++ b/.changeset/wicked-pears-tickle.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +Adjustment to MCP server installation prompt diff --git a/src/core/webview/ClineProvider.ts b/src/core/webview/ClineProvider.ts index 87a2f83fbf..3eac593af2 100644 --- a/src/core/webview/ClineProvider.ts +++ b/src/core/webview/ClineProvider.ts @@ -32,6 +32,7 @@ import { ChatSettings, DEFAULT_CHAT_SETTINGS } from "../../shared/ChatSettings" import { DIFF_VIEW_URI_SCHEME } from "../../integrations/editor/DiffViewProvider" import { searchCommits } from "../../utils/git" import { ChatContent } from "../../shared/ChatContent" +import { getShell } from "../../utils/shell" /* https://github.com/microsoft/vscode-webview-ui-toolkit-samples/blob/main/default/weather-webview/src/providers/WeatherViewProvider.ts @@ -1245,10 +1246,15 @@ export class ClineProvider implements vscode.WebviewViewProvider { mcpDownloadDetails: mcpDetails, }) - // Create task with context from README - const task = `Set up the MCP server from ${mcpDetails.githubUrl}. -Use "${mcpDetails.mcpId}" as the server name in cline_mcp_settings.json. -Once installed, demonstrate the server's capabilities by using one of its tools. + // Create task with context from README and added guidelines for MCP server installation + const task = `Set up the MCP server from ${mcpDetails.githubUrl} while adhering to these MCP server installation rules: +- Use "${mcpDetails.mcpId}" as the server name in cline_mcp_settings.json. +- Use commands aligned with the user's shell and operating system best practices. The user's shell is: ${getShell()}. +- Create the directory for the new MCP server before starting installation. +- Follow the MCP servers README exactly—only deviate if it clearly conflicts with the user's OS, in which case proceed thoughtfully. +- Ensure any steps requiring the use of pip, npm, or any other package manager, are followed as required. +- After running each command, read its output carefully and adjust subsequent steps as needed based on that information. +- Once installed, demonstrate the server's capabilities by using one of its tools. Here is the project's README to help you get started:\n\n${mcpDetails.readmeContent}\n${mcpDetails.llmsInstallationContent}` // Initialize task and show chat view