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

# Cursor

> 通过 SocQ stdio 转接程序连接 Cursor 并验证数据采集。

# Cursor

使用 stdio 转接程序是兼容性最好的 Cursor 配置方式，也不需要单独配置 OAuth。

## 前置条件

* Node.js 20 或更高版本；
* SocQ API 密钥；
* 已安装支持 MCP 的新版 Cursor。

## 配置

打开 Cursor 的 MCP 设置，添加本地服务器并使用：

```json theme={"system"}
{
  "mcpServers": {
    "socq": {
      "command": "npx",
      "args": ["-y", "@socq/mcp"],
      "env": {
        "SOCQ_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}
```

> [!WARNING]
>
> 此本地配置包含凭据。不要提交或分享它。

如果当前 Cursor 版本支持通过环境变量提供 Bearer 令牌的可流式 HTTP（Streamable HTTP），可以直接连接 `https://api.socq.ai/mcp`。如果无法为远程连接配置身份验证，请继续使用 stdio 配置。

## 限制工具列表

要只加载 YouTube 的类型化工具（Typed tools），请更改服务器名称和参数：

```json theme={"system"}
{
  "mcpServers": {
    "socq-youtube": {
      "command": "npx",
      "args": ["-y", "@socq/mcp", "--platforms", "youtube"],
      "env": {
        "SOCQ_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}
```

有关模式选择和过滤限制，请参阅[选择 MCP 工具](https://docs.socq.ai/zh/integrations/mcp-filtering)。

## 验证

重新启动 Cursor 中的 SocQ MCP 服务器，然后提问：

```text theme={"system"}
请使用 SocQ 检查我的账户，然后采集这个 YouTube 视频最新的 20 条评论。
等待任务完成后，以表格形式返回结果：
https://www.youtube.com/watch?v=VIDEO_ID
```

当 Cursor 发现 SocQ 工具、调用 `socq_account`、提交采集并使用 `socq_get_task` 读取返回的任务时，连接正在工作。

## 故障排除

配置更改后重新启动服务器，以便 Cursor 刷新工具列表。有关身份验证、缺少工具和任务错误，请参阅[集成故障排除](https://docs.socq.ai/zh/integrations/troubleshooting)。


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