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

# Mcp setup

首先，将你的 API 密钥设置为环境变量：

```bash theme={null}
export THEO_API_KEY=theo_sk_...
```

然后选择你使用的 IDE：

<Tabs>
  <Tab title="Cursor">
    在项目根目录的 `.cursor/mcp.json` 中添加：

    ```json theme={null}
    {
      "mcpServers": {
        "theo": {
          "command": "npx",
          "args": ["-y", "@hitheo/mcp"],
          "env": {
            "THEO_API_KEY": "${env:THEO_API_KEY}"
          }
        }
      }
    }
    ```

    或运行：

    ```bash theme={null}
    theo mcp install --ide cursor
    ```
  </Tab>

  <Tab title="Claude Code">
    在终端中运行：

    ```bash theme={null}
    claude mcp add theo npx -y @hitheo/mcp
    ```

    或运行：

    ```bash theme={null}
    theo mcp install --ide claude-code
    ```
  </Tab>

  <Tab title="Warp">
    在项目根目录的 `.warp/mcp.json` 中添加：

    ```json theme={null}
    {
      "mcpServers": {
        "theo": {
          "command": "npx",
          "args": ["-y", "@hitheo/mcp"],
          "env": {
            "THEO_API_KEY": "${env:THEO_API_KEY}"
          }
        }
      }
    }
    ```

    或运行：

    ```bash theme={null}
    theo mcp install --ide warp
    ```
  </Tab>

  <Tab title="Windsurf">
    添加到 `~/.codeium/windsurf/mcp_config.json`：

    ```json theme={null}
    {
      "mcpServers": {
        "theo": {
          "command": "npx",
          "args": ["-y", "@hitheo/mcp"],
          "env": {
            "THEO_API_KEY": "${env:THEO_API_KEY}"
          }
        }
      }
    }
    ```

    或运行：

    ```bash theme={null}
    theo mcp install --ide windsurf
    ```
  </Tab>

  <Tab title="VS Code">
    在项目根目录的 `.vscode/mcp.json` 中添加：

    ```json theme={null}
    {
      "mcpServers": {
        "theo": {
          "command": "npx",
          "args": ["-y", "@hitheo/mcp"],
          "env": {
            "THEO_API_KEY": "${env:THEO_API_KEY}"
          }
        }
      }
    }
    ```

    或运行：

    ```bash theme={null}
    theo mcp install --ide vscode
    ```
  </Tab>

  <Tab title="所有 IDE">
    自动检测并一次性配置所有已安装的 IDE：

    ```bash theme={null}
    npm install -g @hitheo/sdk
    theo init
    ```

    该命令会检测 Cursor、Claude Code、Warp、Windsurf 和 VS Code，为每个 IDE 写入正确的配置，并创建一个用于项目级设置的 `theo.config.json`。
  </Tab>
</Tabs>

添加配置后请重启你的 IDE。


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