> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getqr.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 连接 Cursor

> 一键或通过 mcp.json 将 GetQR 添加到 Cursor。

将 GetQR 作为 MCP 服务器添加到 Cursor，即可在 Cursor 的聊天中创建二维码并查看扫描情况。您可以在 GetQR 中一键安装，也可以将其添加到 `mcp.json` 文件中。

## 开始之前

* 拥有 Admin 或 Editor 角色且订阅有效的 GetQR 账户。请参阅 [AI 连接器概览](/zh/ai-connectors/overview)。
* 电脑上安装了 Cursor 桌面应用。Cursor 只能从电脑上连接。

## 一键安装

**1. 打开 My Account**

在电脑上的 GetQR 中，点击侧边栏底部的您的姓名，然后点击 **My Account**。

**2. 打开 AI connectors 选项卡**

点击 **AI connectors**。

**3. 开始连接**

点击 **Connect an assistant**。如果您已有连接，请改为点击 **Connect**。

**4. 选择 Cursor**

在对话框中选择 **Cursor**。

**5. 打开 Cursor**

点击 **Open Cursor**。浏览器会询问是否打开 Cursor，请允许。

**6. 安装服务器**

Cursor 会显示已预先填好的 GetQR MCP 服务器。确认安装。

**7. 登录**

在 Cursor 的 MCP 设置中，开始 GetQR 的登录流程。浏览器会打开 GetQR 登录页面。

**8. 批准访问**

如有提示，请登录 GetQR。查看权限后点击 **Allow**。

**9. 检查连接**

返回 GetQR，对话框会自动更新并显示“Cursor connected”。Cursor 现在会出现在 **Connected clients** 下。

## 手动添加

如果一键安装不起作用，或者您想与团队共享设置，请使用此方法。

**1. 在 Cursor 中打开 MCP 设置**

在 Cursor 中，打开 **Customize** → **MCPs** → **Add MCP**（或 **Add server**，取决于您的 Cursor 版本）。

**2. 添加 GetQR 服务器**

将 GetQR 添加到您的 `mcp.json` 文件中：

```json Global (~/.cursor/mcp.json) theme={null}
{
  "mcpServers": {
    "GetQR": {
      "url": "https://getqr.com/api/mcp"
    }
  }
}
```

```json Project (.cursor/mcp.json) theme={null}
{
  "mcpServers": {
    "GetQR": {
      "url": "https://getqr.com/api/mcp"
    }
  }
}
```

如果文件中已列出其他服务器，请在 `mcpServers` 内将 `"GetQR"` 条目添加到它们旁边。

**3. 保存文件**

保存 `mcp.json`。GetQR 会出现在 Cursor 的 MCP 列表中。

**4. 登录并批准**

在 Cursor 中开始 GetQR 的登录流程。在 GetQR 页面上点击 **Allow**。

> [!NOTE]
>
> 您不需要 API 密钥。Cursor 通过 OAuth 登录并自动续期访问权限。

## 试一试

打开 Cursor 的聊天并提问：

```text theme={null}
Using GetQR, create a Website QR code for https://example.com/launch titled "Launch page" and give me a PNG download link at 2048 px.
```

更多灵感请参阅[示例提示词](/zh/ai-connectors/example-prompts)。

## 常见问题

> **点击 Open Cursor 后没有反应**
>
> 请确保已安装 Cursor 桌面应用，并允许浏览器打开它。否则，请[手动添加服务器](#手动添加)。

> **GetQR 显示“Set up Cursor on desktop”**
>
> 您是在手机上打开的对话框。Cursor 是桌面应用，只能从电脑上连接。

> **GetQR 在 Cursor 中显示需要登录或出现错误**
>
> 访问令牌有效期为 1 小时，Cursor 会自动续期。如果 Cursor 30 天未使用，或您撤销了访问权限，请在 Cursor 的 MCP 设置中重新登录。

> **GetQR 页面显示“AI connectors aren't available”**
>
> Viewer 无法连接 AI 助手。请让工作区 Admin 将您设为 Editor。

> **GetQR 页面显示“An active subscription is required”**
>
> AI 助手只能连接到拥有有效订阅的账户。有关套餐的问题，请参阅[帮助中心](https://getqr.com/help)。

## 后续步骤

> **[功能一览](/zh/ai-connectors/capabilities)**

> **[示例提示词](/zh/ai-connectors/example-prompts)**


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.