docs: update MCP Server configuration paths for VS Code Copilot and Trae IDE #14
@@ -114,11 +114,13 @@ DevStar MCP Server 提供开箱即用的体验,通过 DevStar VS Code 插件
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
**Cursor / Continue**
|
**Cursor**
|
||||||
|
|
||||||
配置文件位置:
|
配置文件位置:
|
||||||
- macOS/Linux: `~/.cursor/mcp.json` 或 `~/.continue/mcpServers/mcp.json`
|
- macOS/Linux: `~/.cursor/mcp.json`
|
||||||
- Windows: `%USERPROFILE%\.cursor\mcp.json` 或 `%USERPROFILE%\.continue\mcpServers\mcp.json`
|
- Windows: `%USERPROFILE%\.cursor\mcp.json`
|
||||||
|
|
||||||
|
<!-- TODO: 添加 Cursor 的详细配置说明 -->
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
@@ -134,9 +136,20 @@ DevStar MCP Server 提供开箱即用的体验,通过 DevStar VS Code 插件
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Windsurf**
|
||||||
|
|
||||||
|
<!-- TODO: 添加 Windsurf 的配置说明 -->
|
||||||
|
|
||||||
**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 +167,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,26 +424,32 @@ 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
|
||||||
|
|
||||||
|
<!-- TODO: 添加 Cursor 的详细说明 -->
|
||||||
|
|
||||||
- 配置文件:`.cursor/mcp.json` 或 `.vscode/mcp.json`
|
- 配置文件:`.cursor/mcp.json` 或 `.vscode/mcp.json`
|
||||||
- 打开 Cursor 后会提示"检测到 MCP Server",点击 Enable 即可
|
|
||||||
- [官方文档](https://cursor.com/cn/docs/context/mcp)
|
- [官方文档](https://cursor.com/cn/docs/context/mcp)
|
||||||
|
|
||||||
### Continue
|
### Trae IDE
|
||||||
|
|
||||||
- 配置文件:`.continue/mcpServers/mcp.json`
|
Trae IDE 运行在**容器内部**,因此配置文件位于容器内:
|
||||||
- [官方文档](https://docs.continue.dev/customize/deep-dives/mcp)
|
- **容器内配置路径**:`/root/.trae-server/data/Machine/mcp.json`
|
||||||
|
- **配置格式**:使用 `mcpServers` 字段
|
||||||
|
- **配置方式**:需要 SSH 进入容器后手动配置,或使用 DevStar VS Code 插件自动配置
|
||||||
|
- **注意**:由于运行在容器内,与 VS Code Copilot(本地运行)使用不同的配置路径
|
||||||
|
|
||||||
### DevStar VS Code 插件(推荐)
|
### Windsurf
|
||||||
|
|
||||||
- **自动配置**:插件会自动检测环境并配置 MCP Server
|
<!-- TODO: 添加 Windsurf 的详细说明 -->
|
||||||
- **开箱即用**:登录 DevStar 账号后即可使用
|
|
||||||
- **多环境支持**:支持本地和容器环境
|
|
||||||
|
|
||||||
## 故障排除
|
## 故障排除
|
||||||
|
|
||||||
@@ -448,8 +496,9 @@ A: 访问令牌有过期时间。如果过期,需要:
|
|||||||
A: 配置文件路径取决于你使用的 IDE:
|
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)
|
- VS Code Copilot: ~/Library/Application Support/Code/User/mcp.json (macOS) 或 %APPDATA%/Code/User/mcp.json (Windows)
|
||||||
- VS Code Copilot: ~/.vscode/mcp.json (macOS/Linux) 或 %USERPROFILE%\.vscode\mcp.json (Windows)
|
- Trae IDE(容器内): /root/.trae-server/data/Machine/mcp.json
|
||||||
|
- Windsurf: <!-- TODO: 添加 Windsurf 配置路径 -->
|
||||||
|
|
||||||
注:具体路径可能因 IDE 版本而异,请参考对应 IDE 的官方文档
|
注:具体路径可能因 IDE 版本而异,请参考对应 IDE 的官方文档
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user