> ## 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、CLI 和 Agent Skill 配置 API 密钥。

# 集成身份验证

在环境变量中设置 API 密钥：

```bash theme={"system"}
export SOCQ_API_KEY="YOUR_API_KEY"
```

```powershell theme={"system"}
$env:SOCQ_API_KEY="YOUR_API_KEY"
```

远程 MCP 服务还接受 `Authorization: Bearer YOUR_API_KEY` 和 `x-api-key: YOUR_API_KEY`。

> [!WARNING]
>
> 请勿将密钥放入 MCP URL，也不要将包含密钥的客户端配置提交到版本库。手动使用 CLI 时应避免传入 `--api-key`，因为密钥可能留在命令历史记录中。

REST、MCP 和 CLI 使用相同的 API 密钥控制规则。详情参见 [API 身份验证和密钥限制](https://docs.socq.ai/zh/api-manual/agent-api/authentication.md)。


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