> ## 文档索引
> 在以下位置获取完整的文档索引： https://code.claude.com/docs/llms.txt
> 在进一步探索之前，使用此文件来发现所有可用页面。

# 企业部署概览

> 了解 Claude Code 如何与各种第三方服务和基础设施集成，满足企业部署要求。

组织可以直接通过 Anthropic 或通过云服务提供商部署 Claude Code。本页帮助你选择合适的配置。

**准备在整个组织中部署 Claude Code？** 联系销售团队，了解企业套餐、SSO 和集中计费。

查看套餐
联系销售

## 比较部署选项

对于大多数组织，Claude for Teams 或 Claude for Enterprise 提供最佳体验。团队成员通过一份订阅即可使用 Claude Code 和 Claude 网页版，享有集中计费，并可直接开始使用。

**Claude for Teams** 支持自助开通，包含协作功能、管理工具、SSO、账单管理，以及用于全组织 Claude Code 配置的 [服务器管理设置](https://code.claude.com/docs/en/server-managed-settings.md) 。适合需要快速上手的小型团队。

**Claude for Enterprise** 额外提供域名收归、基于角色的权限，以及合规 API 访问。适合有安全和合规要求的大型组织。

进一步了解 [Team 套餐](https://support.claude.com/en/articles/9266767-what-is-the-team-plan) 和 [Enterprise 套餐](https://support.claude.com/en/articles/9797531-what-is-the-enterprise-plan).

下方比较的部署选项涉及模型推理的运行位置。要在组织自行运营的计算资源上运行 Claude Code [云端会话](https://code.claude.com/docs/en/claude-code-on-the-web.md) ，请参阅 [自托管环境](https://code.claude.com/docs/en/self-hosted-environments).

如果你的组织有特定的基础设施要求，请比较以下选项：

<table>
  <thead>
    <tr>
      <th>功能</th>
      <th>Claude for Teams/Enterprise</th>
      <th>Anthropic Console</th>
      <th>Amazon Bedrock</th>
      <th>Claude Platform on AWS</th>
      <th>Google Cloud 的代理平台，原 Vertex AI</th>
      <th>Microsoft Foundry</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>适用对象</td>
      <td>大多数组织（推荐)</td>
      <td>个人开发者</td>
      <td>AWS 原生部署</td>
      <td>通过 AWS Marketplace 计费并使用 Claude API 功能</td>
      <td>GCP 原生部署</td>
      <td>Azure 原生部署</td>
    </tr>

    <tr>
      <td>计费</td>
      <td>**Teams：** 按席位订阅，也可按量付费，参见 [价格](https://claude.com/pricing?utm_source=claude_code\&utm_medium=docs\&utm_content=third_party_pricing#team-&-enterprise)\
      **Enterprise：** [联系销售](https://claude.com/contact-sales?utm_source=claude_code\&utm_medium=docs\&utm_content=third_party_enterprise)</td>
      <td>按量付费</td>
      <td>通过 AWS 按量付费</td>
      <td>通过 AWS Marketplace 按量付费</td>
      <td>通过 GCP 按量付费</td>
      <td>通过 Azure 按量付费</td>
    </tr>

    <tr>
      <td>区域</td>
      <td>支持的 [国家和地区](https://www.anthropic.com/supported-countries)</td>
      <td>支持的 [国家和地区](https://www.anthropic.com/supported-countries)</td>
      <td>多个 AWS [区域](https://docs.aws.amazon.com/bedrock/latest/userguide/models-regions.html)</td>
      <td>多个 AWS 区域</td>
      <td>多个 GCP [区域](https://cloud.google.com/vertex-ai/generative-ai/docs/learn/locations)</td>
      <td>多个 Azure [区域](https://azure.microsoft.com/en-us/explore/global-infrastructure/products-by-region/)</td>
    </tr>

    <tr>
      <td>提示词缓存</td>
      <td>默认启用</td>
      <td>默认启用</td>
      <td>默认启用</td>
      <td>默认启用</td>
      <td>默认启用</td>
      <td>默认启用</td>
    </tr>

    <tr>
      <td>身份验证</td>
      <td>claude.ai SSO 或邮箱</td>
      <td>API 密钥，或 [直接登录 Console](https://code.claude.com/docs/en/authentication.md#sign-in-without-an-api-key)</td>
      <td>API 密钥或 AWS 凭据</td>
      <td>API 密钥或 AWS 凭据</td>
      <td>GCP 凭据</td>
      <td>API 密钥或 Microsoft Entra ID</td>
    </tr>

    <tr>
      <td>费用追踪</td>
      <td>用量仪表板</td>
      <td>用量仪表板</td>
      <td>AWS Cost Explorer</td>
      <td>AWS Cost Explorer</td>
      <td>GCP Billing</td>
      <td>Azure Cost Management</td>
    </tr>

    <tr>
      <td>包含 Claude 网页版</td>
      <td>是</td>
      <td>否</td>
      <td>否</td>
      <td>否</td>
      <td>否</td>
      <td>否</td>
    </tr>

    <tr>
      <td>企业功能</td>
      <td>团队管理、SSO、用量监控</td>
      <td>无</td>
      <td>IAM 策略、CloudTrail</td>
      <td>IAM 策略、CloudTrail</td>
      <td>IAM 角色、Cloud Audit Logs</td>
      <td>RBAC 策略、Azure Monitor</td>
    </tr>
  </tbody>
</table>

有关每个选项可用功能的逐个功能细分，请参阅 [功能可用性](https://code.claude.com/docs/en/feature-availability.md).

选择一个部署选项，查看设置说明：

* [Claude for Teams 或 Enterprise](https://code.claude.com/docs/en/authentication.md#claude-for-teams-or-enterprise)
* [Anthropic Console](https://code.claude.com/docs/en/authentication.md#claude-console-authentication)
* [Claude 应用网关](https://code.claude.com/docs/en/claude-apps-gateway)，一个自托管网关，可在 Amazon Bedrock、AWS 上的 Claude 平台、Google 云代理平台、Microsoft Foundry 或 Anthropic API 前面添加 IdP 登录
* [Amazon Bedrock](https://code.claude.com/docs/en/amazon-bedrock.md)
* [Claude Platform on AWS](https://code.claude.com/docs/en/claude-platform-on-aws.md)
* [Google 云上的 Claude 模型（Anthropic 托管)](https://code.claude.com/docs/en/claude-models-on-google-cloud-anthropic-managed.md)
* [Google云代理平台](https://code.claude.com/docs/en/google-vertex-ai.md)
* [Microsoft Foundry](https://code.claude.com/docs/en/microsoft-foundry.md)

对于 Amazon Bedrock 和 Google Vertex AI，你也可以运行 `claude` ，并在登录提示中选择 **第三方平台** ，启动交互式设置向导。

## 配置代理和网关

如果组织有特定的网络或管理要求，你可能需要配置企业代理或 LLM 网关。这两类配置可以结合使用：

* **企业代理**：通过 HTTP/HTTPS 代理路由流量。当组织出于安全监控、合规或网络策略执行要求，需要让所有出站流量经过代理服务器时使用。通过 `HTTPS_PROXY` 或 `HTTP_PROXY` 环境变量配置。更多信息请参阅 [企业网络配置](https://code.claude.com/docs/en/network-config.md).
* **LLM 网关**：位于 Claude Code 与云服务提供商之间，负责身份验证和路由的服务。适用于需要跨团队集中追踪用量、自定义速率限制或预算，或集中管理身份验证的场景。通过 `ANTHROPIC_BASE_URL`, `ANTHROPIC_BEDROCK_BASE_URL`, `ANTHROPIC_AWS_BASE_URL`, `ANTHROPIC_VERTEX_BASE_URL`或 `ANTHROPIC_FOUNDRY_BASE_URL` 环境变量配置。更多信息请参阅 [LLM 网关](https://code.claude.com/docs/en/llm-gateway).

有关通过 LLM 网关路由 Amazon Bedrock、Microsoft Foundry 或 Google Cloud 代理平台的每个提供商的环境变量，请参阅 [通过网关路由到云服务提供商](https://code.claude.com/docs/en/llm-gateway-connect.md#route-to-a-cloud-provider-through-a-gateway)。在 Claude Code 中运行 `/status` ，验证会话正在使用的提供商、基础 URL 和代理。

如果你的组织使用 [客户管理的加密密钥](https://platform.claude.com/docs/en/manage-claude/cmek) （CMEK) 并通过 LLM 网关或自定义路由 Claude Code `ANTHROPIC_BASE_URL`，CMEK 不适用于 Claude Code 在这些会话上的操作遥测。要为每个开发人员关闭遥测，请提供 `DISABLE_TELEMETRY` ，具体方法见 [为组织关闭遥测](https://code.claude.com/docs/en/managed-settings.md#turn-telemetry-off-for-your-organization).

## 组织最佳实践

### 完善文档和记忆

完善文档，让 Claude Code 理解你的代码库。组织可以在多个层级部署 CLAUDE.md 文件。请参阅 [CLAUDE.md 文件可以放在哪里](https://code.claude.com/docs/en/memory.md#choose-where-to-put-claude-md-files) 和 [如何部署全组织的 CLAUDE.md](https://code.claude.com/docs/en/memory.md#deploy-organization-wide-claude-md).

### 简化部署

如果您有自定义开发环境，那么创建“一键”安装 Claude Code 的方式是提高整个组织采用率的关键。

### 从引导式使用开始

鼓励新用户尝试使用 Claude Code 进行代码库问答，或者较小的错误修复或功能请求。请 Claude Code 制定计划。检查 Claude 的建议，如果偏离轨道，请提供反馈。随着时间的推移，随着用户更好地理解这种新范例，他们将更有效地让 Claude Code 更代理地运行。

### 固定云服务提供商的模型版本

如果你通过 [Amazon Bedrock](https://code.claude.com/docs/en/amazon-bedrock.md), [Google云代理平台](https://code.claude.com/docs/en/google-vertex-ai.md), [Microsoft Foundry](https://code.claude.com/docs/en/microsoft-foundry.md)或 [Claude Platform on AWS](https://code.claude.com/docs/en/claude-platform-on-aws.md)部署，请使用 `ANTHROPIC_DEFAULT_FABLE_MODEL`, `ANTHROPIC_DEFAULT_OPUS_MODEL`, `ANTHROPIC_DEFAULT_SONNET_MODEL`和 `ANTHROPIC_DEFAULT_HAIKU_MODEL`。如果不固定，模型别名将解析为该提供商的 Claude Code 内置默认值，这可能会滞后于最新版本，并且可能尚未在您的帐户中启用。通过固定，您可以控制用户何时转向新模型。参见 [模型配置](https://code.claude.com/docs/en/model-config.md#pin-models-for-third-party-deployments) ，了解默认模型不可用时各提供商的处理方式。

### 配置安全策略

安全团队可以配置托管权限，规定 Claude Code 的操作范围。 [了解更多](https://code.claude.com/docs/en/security.md).

要限制受管设备可以使用哪些部署选项，请在托管设置中设置 [`allowedProviders`](https://code.claude.com/docs/en/settings-reference#allowedproviders) 。例如， `["bedrock"]` 将范围限定为 Amazon Bedrock；同时启用 Mantle 端点的 Bedrock 设备群还会列出 `"mantle"` 。该条目会说明，哪些端点变量还需要在托管设置中固定 `env` 。要求 Claude Code v2.1.285 或更高版本。

> [！注]
>
> 当 Desktop 登录到 claude.ai 时，用户计算机上的 Cowork 会话算作 [`"anthropic"`](https://code.claude.com/docs/en/settings-reference#allowedproviders)。如果 MDM 策略或托管设置文件中的列表省略该项，此类会话会被拒绝。列入该项后，直接发送到 Anthropic 的会话也会通过此列表检查。

### 使用 MCP 进行集成

MCP 是为 Claude Code 提供更多信息的有效方式，例如连接工单管理系统或错误日志。由一个中央团队配置 MCP 服务器，并将一份 `.mcp.json` 配置提交到代码库，让所有用户受益。 [了解更多](https://code.claude.com/docs/en/mcp.md).

## 后续步骤

选择部署选项并为您的团队配置访问权限后：

1. **向团队推广**：分享安装说明，让团队成员 [安装 Claude Code](https://code.claude.com/docs/en/setup.md) ，并使用各自的凭据进行身份验证。
2. **设置共享配置**：在代码仓库中创建 [CLAUDE.md 文件](https://code.claude.com/docs/en/memory.md) ，帮助 Claude Code 理解代码库和编码规范。
3. **配置权限**：检查 [安全设置](https://code.claude.com/docs/en/security.md) ，定义 Claude Code 在你的环境中的操作范围。

