@@ -32,6 +32,7 @@ import { ChatSettings, DEFAULT_CHAT_SETTINGS } from "../../shared/ChatSettings"
3232import { DIFF_VIEW_URI_SCHEME } from "../../integrations/editor/DiffViewProvider"
3333import { searchCommits } from "../../utils/git"
3434import { ChatContent } from "../../shared/ChatContent"
35+ import { getShell } from "../../utils/shell"
3536
3637/*
3738https://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 {
12451246 mcpDownloadDetails : mcpDetails ,
12461247 } )
12471248
1248- // Create task with context from README
1249- const task = `Set up the MCP server from ${ mcpDetails . githubUrl } .
1250- Use "${ mcpDetails . mcpId } " as the server name in cline_mcp_settings.json.
1251- Once installed, demonstrate the server's capabilities by using one of its tools.
1249+ // Create task with context from README and added guidelines for MCP server installation
1250+ const task = `Set up the MCP server from ${ mcpDetails . githubUrl } while adhering to these MCP server installation rules:
1251+ - Use "${ mcpDetails . mcpId } " as the server name in cline_mcp_settings.json.
1252+ - Use commands aligned with the user's shell and operating system best practices. The user's shell is: ${ getShell ( ) } .
1253+ - Create the directory for the new MCP server before starting installation.
1254+ - Follow the MCP servers README exactly—only deviate if it clearly conflicts with the user's OS, in which case proceed thoughtfully.
1255+ - Ensure any steps requiring the use of pip, npm, or any other package manager, are followed as required.
1256+ - After running each command, read its output carefully and adjust subsequent steps as needed based on that information.
1257+ - Once installed, demonstrate the server's capabilities by using one of its tools.
12521258Here is the project's README to help you get started:\n\n${ mcpDetails . readmeContent } \n${ mcpDetails . llmsInstallationContent } `
12531259
12541260 // Initialize task and show chat view
0 commit comments