在 setting.json 中配置 MCP Server
{
// ..
"mcp": {
"servers": {
"mpx-rag": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@mpxjs/mcp-server-rag"]
}
}
}
}
{
// ..
"mcp": {
"servers": {
"mpx-rag": {
"type": "stdio",
"command": "node",
"args": ["/Users/didi/mycode/github/mcp-server-rag/dist/index.js"]
}
}
}
}
在 VS Code 中使用 Copilot Chat 调用 MCP Server 如下所示:
<img width="420" alt="mpx-rag" src="https://gips0.baidu.com/it/u=3316713761,988038485&fm=3081&app=3081&f=PNG?w=876&h=1768" />