> ## 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 搜索本文档。

代理负责协助部署。你仍需负责审查命令并保护凭据。

### 开始之前

准备一台受支持的 Linux 服务器，并确保可以通过 SSH 访问。继续之前，请先查看[系统要求](/zh-CN/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-CN/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-CN/on-premises/configuration/overleaf-toolkit/toolkit-settings "mention") 和 [authentication](/zh-CN/on-premises/configuration/overleaf-toolkit/authentication "mention")。

### 验证部署

代理完成各步骤后：

1. 确认每条命令都已成功完成，没有错误。
2. 在浏览器中打开已配置的 Ayakaleaf Pro URL。
3. 完成 [6.-post-installation-tasks.md](/zh-CN/on-premises/installation/using-the-toolkit/6.-post-installation-tasks "mention")。

对于已有的 Community Edition 安装，请使用 [migrate-from-existing.md](/zh-CN/on-premises/installation/migrate-from-existing "mention") 指南，而不是进行全新部署。


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