diff --git a/README.md b/README.md index c729c93f8e1659c7cf3cd1d14dd986b789f33d86..67f510bc887a7253a23b520370181726afba15fa 100644 --- a/README.md +++ b/README.md @@ -64,14 +64,18 @@ mcp-gitee --version **Cursor**: -stdio mode -```bash -mcp-gitee -token -``` - -sse mode -```bash -mcp-gitee -transport sse -token +```json +{ + "mcpServers": { + "gitee": { + "command": "mcp-gitee", + "env": { + "GITEE_API_BASE": "https://gitee.com/api/v5", + "GITEE_ACCESS_TOKEN": "" + } + } + } +} ``` **Windsurf**: diff --git a/docs/install/cursor.md b/docs/install/cursor.md index f88b28d879722fe72efcc7775655943222f03072..2c71260d689f0317ff4da5739c21486d18d1b6c2 100644 --- a/docs/install/cursor.md +++ b/docs/install/cursor.md @@ -1,11 +1,23 @@ -stdio mode -```bash -mcp-gitee -token -``` -![stdio](./images/cursor_stdio.png) +# 在 Cursor 中配置 mcp-gitee + +根据 [Cursor MCP 文档](https://docs.cursor.com/context/model-context-protocol),使用 JSON 配置: -sse mode -```bash -mcp-gitee -transport sse -token +```json +{ + "mcpServers": { + "gitee": { + "command": "mcp-gitee", + "env": { + "GITEE_API_BASE": "https://gitee.com/api/v5", + "GITEE_ACCESS_TOKEN": "" + } + } + } +} ``` -![sse](./images/cursor_sse.png) \ No newline at end of file + +将此配置添加到以下位置之一: +- **项目级配置**: 在项目根目录下创建 `.cursor/mcp.json` 文件 +- **全局配置**: 在你的主目录下创建 `~/.cursor/mcp.json` 文件 + +![cursor-config](./images/cursor_stdio.png) \ No newline at end of file