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