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

# 使用 Cursor

# 使用 Cursor 连接 Marrow

Cursor 可通过 MCP 读取您在 Marrow 中已同步的店铺和广告数据。请先连接并同步至少一个数据源，在 AI Platforms 中创建 MCP key，并确保已安装且登录 [Cursor](https://cursor.com)。

## 配置 MCP 服务器

创建或编辑全局 `~/.cursor/mcp.json`，或项目级 `.cursor/mcp.json`：

```json theme={null}
{
  "mcpServers": {
    "marrow": {
      "url": "https://mcp.marrow.ai/mcp/v1",
      "headers": {
        "Authorization": "Bearer ${env:MARROW_MCP_KEY}"
      }
    }
  }
}
```

在 shell 配置或系统环境中将 `MARROW_MCP_KEY` 设置为 AI Platforms 中创建的密钥。Cursor 加载配置时会解析 `${env:...}`。也可在 **Cursor Settings → Tools & MCP → New MCP Server** 粘贴同一 JSON。

重启 Cursor 或重新加载窗口，确认 MCP 工具中出现 **marrow**，然后在 Agent 对话中测试：

```
Show me my Amazon Seller sales for the last 7 days.
```

优先使用环境变量，避免将密钥硬编码到可能被提交的项目配置中。项目级 `.cursor/mcp.json` 会覆盖全局文件中的同名服务器。密钥轮换后，请更新环境变量并重新加载 Cursor。
