在 setting.json
中配置 MCP Server
- 通过 npm 包加载(推荐)
{
// ..
"mcp": {
"servers": {
"mpx-rag": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@mpxjs/mcp-server-rag"]
}
}
}
}
- 本地 clone 编译项目后调试:
{
// ..
"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 如下:
