docs: update MCP Server configuration paths for VS Code Copilot and Trae IDE #14
@@ -136,7 +136,14 @@ DevStar MCP Server 提供开箱即用的体验,通过 DevStar VS Code 插件
|
|||||||
|
|
||||||
**VS Code Copilot**
|
**VS Code Copilot**
|
||||||
|
|
||||||
- 手工配置:Ctrl + Shift + P 输入 workbench.mcp.openUserMcpJson 命令执行,然后在弹出的mcp.json配置文件中添加devstar如下:
|
VS Code Copilot 的 MCP 配置文件位置:
|
||||||
|
- **macOS**: `~/Library/Application Support/Code/User/mcp.json`
|
||||||
|
- **Windows**: `%APPDATA%/Code/User/mcp.json`
|
||||||
|
|
||||||
|
配置方式:
|
||||||
|
1. 使用快捷键 `Ctrl + Shift + P` (Windows/Linux) 或 `Cmd + Shift + P` (macOS)
|
||||||
|
2. 输入命令 `workbench.mcp.openUserMcpJson` 并执行
|
||||||
|
3. 在打开的 `mcp.json` 配置文件中添加以下内容:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
@@ -154,7 +161,36 @@ DevStar MCP Server 提供开箱即用的体验,通过 DevStar VS Code 插件
|
|||||||
|
|
||||||
**Trae IDE(容器环境)**
|
**Trae IDE(容器环境)**
|
||||||
|
|
||||||
配置文件位置因具体部署环境而异,通常在容器内的某个配置目录中。具体路径请参考 Trae IDE 文档或联系管理员。
|
Trae IDE 运行在容器内部,其 MCP 配置文件位于:
|
||||||
|
- **容器内路径**: `/root/.trae-server/data/Machine/mcp.json`
|
||||||
|
|
||||||
|
由于 Trae IDE 运行在容器内,需要通过 SSH 访问容器来修改配置文件。建议使用 **DevStar VS Code 插件**自动配置,插件会自动处理容器内的配置。
|
||||||
|
|
||||||
|
如果需要手动配置,SSH 进入容器后,编辑配置文件:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# SSH 进入容器
|
||||||
|
ssh root@<container-ip>
|
||||||
|
|
||||||
|
# 编辑 MCP 配置文件
|
||||||
|
vi /root/.trae-server/data/Machine/mcp.json
|
||||||
|
```
|
||||||
|
|
||||||
|
添加以下内容:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"mcpServers": {
|
||||||
|
"devstar": {
|
||||||
|
"type": "http",
|
||||||
|
"url": "http://<YOUR_DEVSTAR_HOST>/api/mcp",
|
||||||
|
"headers": {
|
||||||
|
"Authorization": "Bearer <YOUR_TOKEN>"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
> **注意**:
|
> **注意**:
|
||||||
> - 将 `<YOUR_TOKEN>` 替换为你的访问令牌
|
> - 将 `<YOUR_TOKEN>` 替换为你的访问令牌
|
||||||
@@ -382,8 +418,12 @@ DevStar MCP Server 支持所有遵循 MCP 协议的 AI 编程助手。以下是
|
|||||||
|
|
||||||
### VS Code Copilot
|
### VS Code Copilot
|
||||||
|
|
||||||
- 配置文件:`.vscode/mcp.json`
|
VS Code Copilot 运行在**本地机器**上(容器外),因此配置文件位于本地文件系统:
|
||||||
- 重启 VS Code 后自动加载
|
- **配置文件路径**:
|
||||||
|
- macOS: `~/Library/Application Support/Code/User/mcp.json`
|
||||||
|
- Windows: `%APPDATA%/Code/User/mcp.json`
|
||||||
|
- **配置格式**:使用 `servers` 字段
|
||||||
|
- **配置方式**:使用 `Ctrl+Shift+P` 输入 `workbench.mcp.openUserMcpJson` 命令打开配置文件
|
||||||
- [官方文档](https://vscode.js.cn/docs/copilot/customization/mcp-servers)
|
- [官方文档](https://vscode.js.cn/docs/copilot/customization/mcp-servers)
|
||||||
|
|
||||||
### Cursor
|
### Cursor
|
||||||
@@ -392,6 +432,14 @@ DevStar MCP Server 支持所有遵循 MCP 协议的 AI 编程助手。以下是
|
|||||||
- 打开 Cursor 后会提示"检测到 MCP Server",点击 Enable 即可
|
- 打开 Cursor 后会提示"检测到 MCP Server",点击 Enable 即可
|
||||||
- [官方文档](https://cursor.com/cn/docs/context/mcp)
|
- [官方文档](https://cursor.com/cn/docs/context/mcp)
|
||||||
|
|
||||||
|
### Trae IDE
|
||||||
|
|
||||||
|
Trae IDE 运行在**容器内部**,因此配置文件位于容器内:
|
||||||
|
- **容器内配置路径**:`/root/.trae-server/data/Machine/mcp.json`
|
||||||
|
- **配置格式**:使用 `mcpServers` 字段
|
||||||
|
- **配置方式**:需要 SSH 进入容器后手动配置,或使用 DevStar VS Code 插件自动配置
|
||||||
|
- **注意**:由于运行在容器内,与 VS Code Copilot(本地运行)使用不同的配置路径
|
||||||
|
|
||||||
### Continue
|
### Continue
|
||||||
|
|
||||||
- 配置文件:`.continue/mcpServers/mcp.json`
|
- 配置文件:`.continue/mcpServers/mcp.json`
|
||||||
@@ -449,7 +497,8 @@ A: 配置文件路径取决于你使用的 IDE:
|
|||||||
- Claude Code: ~/.claude/mcp_servers.json (macOS/Linux) 或 %APPDATA%\Claude\mcp_servers.json (Windows)
|
- Claude Code: ~/.claude/mcp_servers.json (macOS/Linux) 或 %APPDATA%\Claude\mcp_servers.json (Windows)
|
||||||
- Cursor: ~/.cursor/mcp.json (macOS/Linux) 或 %USERPROFILE%\.cursor\mcp.json (Windows)
|
- Cursor: ~/.cursor/mcp.json (macOS/Linux) 或 %USERPROFILE%\.cursor\mcp.json (Windows)
|
||||||
- Continue: ~/.continue/mcpServers/mcp.json (macOS/Linux) 或 %USERPROFILE%\.continue\mcpServers\mcp.json (Windows)
|
- Continue: ~/.continue/mcpServers/mcp.json (macOS/Linux) 或 %USERPROFILE%\.continue\mcpServers\mcp.json (Windows)
|
||||||
- VS Code Copilot: ~/.vscode/mcp.json (macOS/Linux) 或 %USERPROFILE%\.vscode\mcp.json (Windows)
|
- VS Code Copilot: ~/Library/Application Support/Code/User/mcp.json (macOS) 或 %APPDATA%/Code/User/mcp.json (Windows)
|
||||||
|
- Trae IDE(容器内): /root/.trae-server/data/Machine/mcp.json
|
||||||
|
|
||||||
注:具体路径可能因 IDE 版本而异,请参考对应 IDE 的官方文档
|
注:具体路径可能因 IDE 版本而异,请参考对应 IDE 的官方文档
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user