# VS Code、Cursor 及其他 MCP 客户端

> 将聚易连接到 VS Code 中的 GitHub Copilot、Cursor，或任何支持远程 MCP 服务器的客户端。

Source: https://help.gathereasy.rsvp/zh-cn/ai-assistants/other-clients/

聚易可与任何支持**通过 Streamable HTTP 连接远程服务器**并支持 **OAuth 登录**的 MCP 客户端配合使用。服务器地址是：

```
https://gathereasy.rsvp/api/mcp
```

<Tabs syncKey="client">
<TabItem label="VS Code（Copilot）">

在工作区中创建或打开 `.vscode/mcp.json`（或在命令面板中运行 **MCP: Open User Configuration**，为所有工作区添加），并加入：

```json
{
  "servers": {
    "gathereasy": {
      "type": "http",
      "url": "https://gathereasy.rsvp/api/mcp"
    }
  }
}
```

点击服务器条目上方的 **Start**。VS Code 会请求登录聚易，允许后在浏览器中登录并点击**允许访问**。之后在 Copilot Chat 的 **Agent** 模式中使用聚易。

也可以在命令面板中运行 **MCP: Add Server**，选择 **HTTP** 并粘贴地址。

</TabItem>
<TabItem label="Cursor">

打开 **Cursor Settings → MCP → Add new MCP server**，或编辑 `~/.cursor/mcp.json`，加入：

```json
{
  "mcpServers": {
    "gathereasy": {
      "url": "https://gathereasy.rsvp/api/mcp"
    }
  }
}
```

在 **Cursor Settings → MCP** 中，聚易会提示需要登录。点击它打开聚易登录页面，然后点击**允许访问**。

</TabItem>
<TabItem label="其他客户端">

大多数接受 `mcpServers` 配置的客户端使用类似格式：

```json
{
  "mcpServers": {
    "gathereasy": {
      "type": "http",
      "url": "https://gathereasy.rsvp/api/mcp"
    }
  }
}
```

不同客户端的字段名可能不同（`url`、`serverUrl` 或 `httpUrl`；`http` 或 `streamable-http`）。请在客户端文档中查找“remote MCP server”。

</TabItem>
</Tabs>

## 客户端需要支持的功能

要登录，客户端必须支持 MCP 的标准 OAuth 流程：

- **动态客户端注册**，无需客户端 ID 或密钥即可向聚易注册，
- **PKCE（S256）**，
- **资源指示符（resource indicators）**。

要显示聚易的交互式面板，还需要支持 **MCP Apps** 扩展。不支持的客户端会以文字形式获得相同结果。

不支持登录的客户端仍可使用公开的发现功能（例如搜索活动和场地），但无法进行任何需要账户的操作。

## 只能运行本地服务器的客户端

如果你的客户端只能启动本地（stdio）MCP 服务器，可以使用开源桥接工具 `mcp-remote`，它会帮你完成浏览器登录。需要安装 [Node.js](https://nodejs.org)：

```json
{
  "mcpServers": {
    "gathereasy": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://gathereasy.rsvp/api/mcp"]
    }
  }
}
```

<Aside type="caution">
  只将聚易连接到你信任的客户端。已连接的客户端可以在你授权的范围内代表你的账户执行操作。
</Aside>

## 提示词和资源

除了工具，聚易还提供：

- **提示词**：现成的起点。参见[现成的提示词](https://help.gathereasy.rsvp/zh-cn/ai-assistants/what-you-can-do.md#现成的提示词)。
- **资源**，客户端可以把它们附加到对话中：`gathereasy://events/{event_id}`、`gathereasy://events/{event_id}/calendar.ics`、`gathereasy://venues/{venue_id}` 和 `gathereasy://groups/{group_id}`。活动、社群和场地 ID 会自动补全，优先显示你自己的活动和社群。
