> ## Documentation Index
> Fetch the complete documentation index at: https://ayakaleaf-pro.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 使用 Claude 或 Codex

> 將 AI 程式設計代理連接到文件並部署 Ayakaleaf Pro。

使用 Claude Code 或 Codex 來規劃並執行 Ayakaleaf Pro 部署。代理在工作時可以透過 MCP 搜尋本文件。

代理會協助您完成部署，但您仍需負責審查指令並保護憑證。

### 開始之前

準備一台可透過 SSH 存取、受支援的 Linux 伺服器。繼續之前，請先檢視[系統需求](/zh-TW/on-premises/getting-started/requirements "mention")。

<Warning>
  請勿將密碼、私密金鑰、權杖或授權金鑰貼到代理的提示中。執行每個指令之前都要先審查，特別是會修改檔案、網路或容器的指令。
</Warning>

### 連接文件

將文件的 MCP 端點新增到您的本機代理。

<Tabs>
  <Tab title="Claude Code">
    ```bash wrap theme={null}
    claude mcp add ayakaleaf-pro --scope user --transport http https://ayakaleaf-pro.ayaka.space/~gitbook/mcp
    ```
  </Tab>

  <Tab title="Codex">
    ```bash wrap theme={null}
    codex mcp add ayakaleaf-pro --url https://ayakaleaf-pro.ayaka.space/~gitbook/mcp
    ```
  </Tab>
</Tabs>

新增伺服器後，請開始新的工作階段。請代理確認它能夠搜尋 Ayakaleaf Pro 文件。

### 部署 Ayakaleaf Pro

在您的部署伺服器上開啟終端機，並在那裡啟動 Claude Code 或 Codex。然後傳送以下提示：

```text wrap theme={null}
Use the Ayakaleaf Pro documentation MCP server to guide this deployment.
First, inspect the requirements and installation guides.
Ask me for missing deployment details before making changes.
Use the Ayakaleaf Toolkit unless the documentation requires another approach.
Before configuring the instance, summarize relevant optional features.
Ask which features and integrations I want to enable.
Include TLS, sandboxed compiles, Git integration, external MongoDB or Redis,
SSO (OIDC, SAML, or LDAP), GitHub Synchronisation, Zotero, S3 storage,
email delivery, branding, and localization when relevant.
Explain each selected option's prerequisites, security impact, and configuration steps.
Keep unselected optional features disabled.
Show each command before running it.
Do not expose, store, or request secrets in chat.
After deployment, verify that the service is healthy and summarize the changes.
```

代理應該會引導您完成 Docker 設定、Toolkit 設定、映像檔擷取與啟動。標準工作流程請依照 [using-the-toolkit](/zh-TW/on-premises/installation/using-the-toolkit "mention") 指南操作。

### 選擇選用功能

請代理只推薦適合您環境的功能。常見的選擇包括：

* <strong>存取與安全性：</strong> TLS、沙箱編譯，以及 OIDC、SAML 或 LDAP SSO。
* <strong>外部服務：</strong> MongoDB、Redis、S3 儲存空間與電子郵件寄送。
* <strong>協作：</strong> Git 整合、GitHub 同步與 Zotero。

代理應在編輯設定之前說明相依關係。啟用正式環境整合之前，請先檢視 [toolkit-settings.md](/zh-TW/on-premises/configuration/overleaf-toolkit/toolkit-settings "mention") 與 [authentication](/zh-TW/on-premises/configuration/overleaf-toolkit/authentication "mention")。

### 驗證部署

代理完成所有步驟後：

1. 確認每個指令都已順利完成且沒有錯誤。
2. 在瀏覽器中開啟您設定的 Ayakaleaf Pro URL。
3. 完成 [6.-post-installation-tasks.md](/zh-TW/on-premises/installation/using-the-toolkit/6.-post-installation-tasks "mention")。

對於現有的 Community Edition 安裝，請改用 [migrate-from-existing.md](/zh-TW/on-premises/installation/migrate-from-existing "mention") 指南，而非全新部署。


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