> ## 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.

# MCP 快速入门

> 连接 AI 客户端并完成第一次 SocQ 数据采集。

# MCP 快速入门

使用 SocQ MCP 从 Claude、Cursor、Codex、VS Code 或其他 MCP 兼容客户端采集社交数据。配置服务器一次，然后用自然语言描述您需要的数据。

## 开始之前

您需要：

* SocQ API 密钥；
* 兼容 MCP 的客户端；
* 使用 stdio 转接程序时，还需要 Node.js 20 或更高版本。

将密钥保留在 URL 和提交的配置之外。请参阅[集成身份验证](https://docs.socq.ai/zh/integrations/authentication.md)。

## 连接 SocQ

选择客户端支持的传输方式：

| 传输方式 | 配置 | 适用场景 |
| - | - | - |
| 远程 MCP | `https://api.socq.ai/mcp` | 支持身份验证和可流式 HTTP（Streamable HTTP）的客户端 |
| stdio 转接程序 | `npx -y @socq/mcp` | 只能运行本地 stdio 服务器的客户端 |

有关具体配置，请参阅 [Claude](https://docs.socq.ai/zh/integrations/claude-desktop.md)、[Cursor](https://docs.socq.ai/zh/integrations/cursor.md)、[Codex](https://docs.socq.ai/zh/integrations/codex.md) 或 [VS Code](https://docs.socq.ai/zh/integrations/vscode.md) 指南。

## 完成首次采集

连接后，向客户端提问：

```text theme={"system"}
Use SocQ to check my account, then collect the latest 20 comments from this
YouTube video. Wait for the task to finish and return the results as a table:
https://www.youtube.com/watch?v=VIDEO_ID
```

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

## 后续步骤

* [选择 MCP 工具](https://docs.socq.ai/zh/integrations/mcp-filtering)：选择精简、平台或精确工具模式。
* [任务和结果](https://docs.socq.ai/zh/integrations/tasks-results)：了解如何等待任务、安全重试、分页和下载原始文件。
* [集成故障排除](https://docs.socq.ai/zh/integrations/troubleshooting)：解决连接和执行错误。

## 标记 Agent Skill 执行来源

当 Agent Skill 通过精简模式（Compact）或类型化工具（Typed tools）提交任务时，请在执行参数中加入 `_request_source: "skill"`。SocQ 会以 `request_source="skill-mcp"` 记录该任务。普通的远程 MCP 和 stdio MCP 调用仍分别记录为 `mcp-remote` 和 `mcp-stdio`。


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