エンタープライズチーム向けClaude Codeセキュリティのベストプラクティス:SSO、AIゲートウェイ、MCPガバナンス

Built for Speed: ~10ms Latency, Even Under Load
Blazingly fast way to build, track and deploy your models!
- Handles 350+ RPS on just 1 vCPU — no tuning needed
- Production-ready with full enterprise support
Claude Code is quickly becoming a standard AI coding assistant for enterprise engineering teams. Developers use it to write code, debug issues, understand codebases, and increasingly interact with enterprise tools through the Model Context Protocol (MCP).
But as Claude Code adoption grows, so do the security challenges. Many organizations still rely on shared API keys, long-lived credentials, unmanaged MCP servers, and limited visibility into how AI tools are being used. These practices can create security, compliance, and governance risks at scale.
Unlike traditional developer tools, Claude Code can access code repositories, internal systems, databases, and MCP-powered tools. Securing it requires more than protecting API keys, it requires identity-based authentication, user-level auditability, access controls, and governance over the tools and data it can access.
In this guide, we'll cover the most important Claude Code security best practices for enterprise deployments, including SSO, AI gateways, audit logging, cost controls, and MCP governance.
Why Claude Code Security Requires a Different Approach
Traditional developer tools operate within a relatively narrow scope. A developer logs in, writes code, and interacts with a specific application. Claude Code is different.
With Claude Code, developers can not only generate and modify code but also interact with external tools, repositories, databases, APIs, and enterprise systems through MCP servers. As a result, the security perimeter extends beyond the model itself to include the tools, data, and actions available to the AI assistant.
This introduces new risks, including:
- Credential leakage and unauthorized access
- Excessive permissions on MCP tools
- Exposure of sensitive enterprise data
- Limited visibility into user activity
- Uncontrolled AI spending
As Claude Code becomes more deeply integrated into engineering workflows, organizations need a security model that focuses on identity, governance, observability, and access control not just API key management.
Best Practice #1: Eliminate Shared API Keys
One of the most common mistakes in enterprise Claude Code deployments is distributing shared API keys or service account credentials across teams.
While this approach may work for a small pilot, it quickly creates security and operational challenges at scale.
Shared credentials make it difficult to:
- Identify which user initiated a request
- Revoke access for a specific employee
- Investigate security incidents
- Enforce team-level permissions
- Track usage and costs accurately
For example, if multiple developers use the same API key, every request appears to originate from a single identity. Security teams lose the ability to attribute actions to individual users, creating audit and compliance gaps.
Instead, enterprises should adopt identity-based authentication where every Claude Code request is associated with a specific user. This allows organizations to maintain user-level attribution, apply access policies, and simplify onboarding and offboarding processes.
The goal is simple: every Claude Code action should be traceable to an individual user, not a shared credential.
Best Practice #2: Use SSO and Identity-Based Authentication
Once shared API keys are eliminated, the next step is to ensure every user accesses Claude Code through your organization's identity provider.
Single Sign-On (SSO) allows developers to authenticate using existing corporate accounts from providers such as OKTA, Microsoft Entra ID, or Google Workspace. Instead of distributing API keys, organizations can leverage the same identity and access management systems already used for applications like GitHub, Jira, Slack, and AWS.
SSO provides several security and operational benefits:
- Centralized user management
- Multi-factor authentication (MFA) enforcement
- Instant access revocation when employees leave
- User-level attribution for every request
- Reduced credential sprawl
For example, when an employee leaves the organization, disabling their account in the identity provider immediately removes access to Claude Code and related AI services. There is no need to track down API keys or rotate shared credentials.
Most importantly, SSO establishes a trusted identity layer that can be used to enforce permissions, audit activity, and govern access across the entire AI stack.
Best Practice #3: Route Claude Code Through an AI Gateway
Authentication alone is not enough. Enterprises also need visibility and control over how Claude Code is being used. When developers connect directly to model providers, organizations often have limited insight into usage patterns, model access, spending, and tool interactions.
A more secure architecture routes all Claude Code traffic through an AI Gateway.
Instead of:
Developer → Claude
The flow becomes:
Developer → AI Gateway → Claude
This additional layer enables organizations to:
- Centralize authentication and authorization
- Enforce security and compliance policies
- Monitor usage across teams
- Track token consumption and costs
- Apply rate limits and spending controls
- Maintain audit logs for all requests
An AI Gateway also creates a consistent control plane for multiple models and providers, allowing organizations to govern AI usage without requiring developers to manage credentials or provider-specific configurations.
For enterprises deploying Claude Code at scale, an AI Gateway becomes the foundation for secure, observable, and cost-controlled AI adoption. Rather than treating Claude Code as a standalone tool, organizations can manage it as part of a broader AI platform with centralized governance and security controls.
Best Practice #4: Enable User-Level Attribution and Audit Logs
As Claude Code adoption grows across engineering teams, visibility becomes just as important as access control. Security and platform teams need answers to questions such as:
- Who accessed Claude Code?
- Which model was used?
- What tools were invoked?
- How many tokens were consumed?
- When did a specific action occur?
Without user-level attribution, these questions become difficult or impossible to answer. If multiple developers share the same API key or service account, all activity appears under a single identity, creating significant audit and compliance gaps.
Every Claude Code request should be traceable to an individual user. Organizations should maintain logs that capture:
- User identity
- Team or department
- Model used
- Token consumption
- Timestamp
- Tool and MCP server activity
These logs are critical for security investigations, compliance reviews, cost allocation, and operational monitoring. By routing traffic through an AI Gateway, enterprises can centralize audit logging and gain a complete view of AI activity across teams. Instead of piecing together logs from multiple providers and tools, organizations get a single source of truth for AI usage and governance.
Best Practice #5: Govern MCP Server Access
As organizations adopt the Model Context Protocol (MCP), the security conversation extends beyond models and prompts. MCP enables Claude Code to interact with external systems such as:
- GitHub repositories
- Jira projects
- Databases
- Internal APIs
- Documentation platforms
- Custom enterprise tools
While this significantly expands what Claude Code can do, it also introduces new security risks.
An over-permissioned MCP server can expose sensitive data or allow actions that users were never intended to perform. In many cases, the risk comes not from the model itself but from the tools it can access.
To securely deploy MCP in the enterprise, organizations should:
- Maintain an approved catalog of MCP servers
- Restrict tool access based on user roles
- Require authentication for MCP endpoints
- Monitor tool usage and activity
- Audit all MCP interactions
For example, not every employee should have access to production databases, deployment systems, or sensitive internal tools through Claude Code. アクセス制御 モデルとMCPサーバーの両方で一貫して適用される必要があります。
ここでMCPガバナンスが重要になります。組織がクラウドインフラストラクチャやSaaSアプリケーションへのアクセスを管理するのと同様に、AIアシスタントが利用できるツールやアクションも管理する必要があります。
MCPゲートウェイ は、認証、認可、可観測性、ポリシー適用のための一元的なレイヤーを提供し、組織がセキュリティを犠牲にすることなく、Claude Codeやその他のAIエージェントを安全に拡張できるよう支援します。
ベストプラクティス #6: コスト管理と利用制限の適用
セキュリティとガバナンスは、もはやアクセス制御だけにとどまりません。AIの導入が進むにつれて、コストガバナンスも企業チームにとって同様に重要な懸念事項となっています。
Claude Codeは開発者の生産性を大幅に向上させることができますが、数百人または数千人の開発者によって使用されると、大量のトークン消費を引き起こす可能性もあります。利用パターンが可視化されていない場合、組織はAIへの支出がどこから来ているのか、またチーム間でどのように割り当てられているのかを把握するのに苦労するかもしれません。
一般的な課題は以下の通りです。
- トークン使用量の予期せぬ急増
- チームレベルでのコスト可視性の欠如
- 支出制限を強制する方法がない
- AI予算の予測の難しさ
- 監視なしで高価なモデルが使用されている
これらの課題に対処するため、組織は以下を導入する必要があります。
- チームレベルの予算
- 利用クォータ
- レート制限
- 支出アラート
- ユーザー別・部署別の費用配分
例えば、エンジニアリングチームは複雑なコーディングタスクのためにプレミアムモデルへのアクセスが必要な場合がありますが、他のチームは低コストのモデルで効率的に作業できます。利用ポリシーを確立することは、生産性とコスト効率のバランスを取るのに役立ちます。
AIゲートウェイは、ユーザー、チーム、モデル、アプリケーション全体でのトークン消費と費用を一元的に可視化することで、ここで重要な役割を果たします。月末に予期せぬ請求を待つのではなく、組織は利用状況を積極的に監視し、リアルタイムでコスト管理を徹底できます。
ベストプラクティス #7: 安全なトークンストレージと認証情報のライフサイクル管理
SSOが導入されている場合でも、組織は認証情報がそのライフサイクル全体にわたって安全に処理されることを保証しなければなりません。
よくある間違いは、有効期限の長いトークンをスクリプト、設定ファイル、または開発環境に保存することです。これらの認証情報は、ソースコードリポジトリ、共有ワークステーション、または設定ミスのあるシステムを通じて誤って公開される可能性があります。
その代わりに、企業は最新の認証情報管理プラクティスに従うべきです。
- ハードコードされたシークレットを避ける
- 短期間有効なアクセストークンを使用する
- 認証情報を安全なローカルストアに保存する
- 可能な場合はトークンの更新を自動化する
- 認証情報を定期的にローテーションする
安全なデプロイメントは、流通している有効期限の長い認証情報の数を最小限に抑え、ユーザーがAPIキーを自分で管理するのではなく、承認されたIDプロバイダーを通じて認証されるようにすべきです。
例えば、Claude CodeがOKTAのようなエンタープライズIDプロバイダーと統合されている場合、ユーザーはSSOを使用して認証でき、アクセストークンはバックグラウンドで自動的に更新されます。これにより、手動での認証情報管理が減り、セキュリティと開発者エクスペリエンスの両方が向上します。目標は、安全なパスを最も簡単なパスにすることです。開発者は、Claude CodeにアクセスするためにAPIキーをコピーしたり、シークレットを管理したり、トークンを手動で更新したりする必要はありません。
ベストプラクティス #8: Claude Codeを単なるコーディングツールではなく、AIエージェントとして扱う
多くの組織は依然としてClaude Codeを開発者向けの生産性向上ツールと見なしていますが、実際には、Claude Codeはエンタープライズシステムへのアクセス権を持ち、ユーザーに代わってアクションを実行できるAIエージェントのように振る舞うことが増えています。
MCP統合を通じて、Claude Codeは次のことができます。
- リポジトリにアクセスする
- データベースを照会する
- 社内ドキュメントを取得する
- チケットシステムと連携する
- APIを呼び出す
- ワークフローをトリガーする
これによりセキュリティモデルは完全に変わります。
もはや主要な問いは「誰がClaudeにアクセスできるか?」ではありません。
その代わりに、「Claudeはユーザーに代わって何にアクセスし、何ができるか?」となります。
組織は、あらゆる特権システムに適用されるのと同じセキュリティ原則を用いて、Claude Codeを評価すべきです。
- 強力な認証
- ロールベースのアクセス制御
- 監査性
- 最小特権アクセス
- 継続的な監視
AIエージェントの能力が向上するにつれて、ガバナンスはモデル自体を超え、それらのエージェントが利用できるツール、データソース、およびアクションを含むように拡張される必要があります。最も成功したエンタープライズ導入事例では、Claude Codeを一元化されたID、ポリシー適用、可観測性、およびアクセス制御を通じて管理される、より広範なAIプラットフォームの一部として扱っています。
安全なエンタープライズ向けClaude Code導入のためのアーキテクチャ
上記で議論されたセキュリティのベストプラクティスを実装するには、Claude Code自体を保護するだけでは不十分です。組織は、AIスタック全体にわたってID、ガバナンス、可観測性、およびコスト管理を提供する一元化されたアーキテクチャを必要とします。
ここで AIゲートウェイ が非常に重要になります。
開発者がAnthropicに直接接続したり、APIキーをチーム間で配布したりするのではなく、企業はすべてのClaude Codeトラフィックを TrueFoundry AI Gatewayを経由させることで、認証、認可、監視、ガバナンスのための一元化されたコントロールプレーンを構築できます。
一般的な企業での導入は次のようになります。
Developer
↓
SSO (OKTA / Entra ID)
↓
TrueFoundry AI Gateway
↓
Claude Models
↓
TrueFoundry MCP Gateway
↓
Enterprise Tools & Systemsこのアーキテクチャにより、組織はセキュリティ、コンプライアンス、プラットフォームエンジニアリングチームが求める制御を維持しながら、開発者にシームレスなClaude Codeエクスペリエンスを提供できます。
SSOによるIDと認証
企業でのClaude Code導入における最大の課題の1つは、認証情報管理です。
多くのチームはAPIキーや共有サービスアカウントから始めますが、これらは大規模になると管理がすぐに困難になります。共有認証情報は監査を困難にし、認証情報漏洩のリスクを高め、ユーザーが組織に参加または離脱するたびに運用上のオーバーヘッドを発生させます。
TrueFoundryは、OKTAやMicrosoft Entra IDなどのエンタープライズIDプロバイダーとClaude Codeを統合し、開発者が既存の企業認証情報を使用して認証できるようにします。
従来のフロー:
開発者 → APIキー → Claude
新しいフロー:
開発者 → SSO → TrueFoundry AI Gateway → Claude
このアプローチにはいくつかの利点があります。
- Anthropic APIキーを配布する必要がなくなります。
- 組織のIDプロバイダーを通じてMFAを強制します。
- すべてのリクエストを検証済みユーザーに関連付けます。
- オンボーディングとオフボーディングを簡素化します。
- 開発環境から長期有効な認証情報を排除します。
企業にとって、Claude Codeは既存のIDエコシステム内で管理されるアプリケーションの一つとなります。
TrueFoundry AI Gateway:エンタープライズコントロールプレーン
%25201%2520(1).avif)
ユーザーが認証されると、すべてのClaude Codeリクエストは TrueFoundry AI Gatewayを経由します。Claude Codeをスタンドアロンの開発者ツールとして扱うのではなく、組織は 一元化されたガバナンスレイヤー を通じて、すべてのAI利用に対する可視性と制御を提供できます。
AI Gatewayは企業に以下のことを可能にします。
ユーザーごとの帰属
すべてのリクエストは、個々のユーザー、チーム、アプリケーションに関連付けられます。共有サービスアカウントからのアクティビティを見る代わりに、プラットフォームチームは次のような質問に答えることができます。
- 誰がClaude Codeを使用しましたか?
- どのモデルがアクセスされましたか?
- いくつのトークンが消費されましたか?
- どのチームが費用を発生させましたか?
コスト監視とガバナンス

Claude Codeの導入が進むにつれて、エンジニアリングチーム全体でAI費用が急速に増加する可能性があります。TrueFoundry AI Gatewayは、以下に対する一元的な可視性を提供します。
- トークン消費量
- ユーザーごとのコスト
- チームごとのコスト
- アプリケーションごとのコスト
- モデル利用の傾向
組織は、生産的なAI利用を可能にしつつ、予期せぬコスト超過を防ぐために、予算、支出アラート、クォータ、レート制限を導入できます。
マルチモデルガバナンス
多くの企業が 複数のプロバイダー とモデルを同時に利用しています。AI Gatewayは、プロバイダー間のアクセスを標準化し、開発者のワークフローを変更することなく、チームがClaude、GPT、Gemini、その他のモデルを単一のプラットフォームで管理できるようにします。
一元的な監査可能性
すべてのリクエスト、レスポンス、トークン数、モデル呼び出しを一元的にログに記録できます。これにより、以下をサポートする完全な監査証跡が作成されます。
- コンプライアンス要件
- 内部調査
- セキュリティレビュー
- 運用監視
TrueFoundryはどのClaude製品をガバナンスできますか?
異なるClaude製品は、異なるレベルの企業制御を公開しています。以下の表は、TrueFoundry AI GatewayとMCP Gatewayが現在ガバナンスを適用できる範囲をまとめたものです。
TrueFoundry MCP GatewayによるMCPアクセス管理
組織がMCPを導入するにつれて、セキュリティの焦点はモデルアクセスからツールアクセスへと拡大します。Claude Codeは以下と連携できます。
- GitHubリポジトリ
- Jiraプロジェクト
- データベース
- 内部API
- ドキュメントシステム
- カスタムエンタープライズアプリケーション
強力である一方で、これらの統合はリスクも伴います。権限が過剰に付与されたMCPサーバーは、機密情報を漏洩させたり、意図しない操作を許してしまう可能性があります。多くの場合、セキュリティ上の課題はモデルそのものではなく、モデルがアクセスできるシステムにあります。TrueFoundry MCP Gatewayは、MCPのやり取りを管理するための一元化されたレイヤーを提供します。
組織は次のことができます:
- MCPサーバーを一元的に承認・管理する
- MCPリクエストを認証する
- アクセス制御を適用する
- ツールの使用状況を監視する
- MCP呼び出しを監査する
- ユーザーとアプリケーション間のやり取りを追跡する
これにより、セキュリティチームはClaude Codeがエンタープライズシステムとどのように連携しているかを可視化しつつ、開発者が必要なツールにアクセスできるようにします。
エンタープライズシステムと機密データ
スタックの最下層には、Claude CodeがMCPを介してアクセスするリポジトリ、データベース、API、ビジネスアプリケーションがあります。
これらのシステムには、多くの場合、次のものが含まれています:
- 独自のソースコード
- 顧客データ
- 社内ドキュメント
- 運用ワークフロー
- ビジネス上重要な情報
Claude Codeとエンタープライズシステム間にID、ガバナンス、および可観測性のレイヤーを配置することで、組織は開発者の生産性を維持しつつ、リスクを大幅に軽減できます。
TrueFoundryでClaude Codeを大規模に安全に利用する
ほとんどの企業にとって、目標は単に開発者にClaude Codeへのアクセスを許可することではありません。Claude Codeを安全にデプロイし、企業システムとの連携を管理し、導入が進むにつれて利用状況とコストを可視化することが目標です。
TrueFoundryは、これを実現するために必要なインフラを以下を通じて提供します。
- SSOベースの認証
- ユーザーレベルの帰属
- AIゲートウェイガバナンス
- コスト監視と制御
- 一元化された監査ログ
- MCPセキュリティと可観測性
- マルチモデルサポート
TrueFoundry AI GatewayとMCP Gatewayを組み合わせることで、組織は Claude Code をスタンドアロンのAIツールから、安全で管理された、AI支援開発のためのエンタープライズ対応プラットフォームへと変革できます。
Claude Code セキュリティチェックリスト
組織全体にClaude Codeを展開する前に、以下のチェックリストを使用してセキュリティ体制を検証してください。
IDと認証
☑ 共有APIキーを排除する
☑ OKTA、Entra ID、またはその他のIDプロバイダーを通じてSSOを有効にする
☑ 多要素認証(MFA)を強制する
☑ すべてのリクエストが個々のユーザーに紐付けられていることを確認する
ガバナンスと可観測性
☑ Claude Codeのトラフィックを次の経由でルーティングする AIゲートウェイ
☑ ユーザーレベルの監査ログを有効にする
☑ モデルの使用状況とトークンの消費量を追跡する
☑ チーム全体で一元的な可視性を維持する
MCPセキュリティ
☑ 承認済みMCPサーバーのリストを管理する
☑ ロールベースの権限を使用してアクセスを制限する
☑ MCPツールの使用状況を監査する
☑ エンタープライズシステムとのやり取りを監視する
コスト管理
☑ チームの予算とクォータを設定する
☑ レート制限と支出アラートを設定する
☑ ユーザー、チーム、モデル別の使用状況を監視する
☑ AI関連の支出を定期的に確認する
認証情報管理
☑ ハードコードされた認証情報を避ける
☑ 短期間有効なトークンを使用する
☑ トークンの更新を自動化する
☑ 認証情報を安全に保管する
これらの制御を導入する組織は、大規模なClaude Codeの導入に伴うセキュリティ、コンプライアンス、および運用上のリスクを大幅に削減できます。
まとめ
Claude Codeは、エンジニアリングチームがソフトウェアを記述、レビュー、保守する方法を変革しています。しかし、MCP統合やエンタープライズシステムへのアクセスを通じてその機能が拡大するにつれて、セキュリティ要件もより複雑になります。
最大のリスクはモデル自体ではなく、大規模に安全に運用するために必要なID、ガバナンス、可観測性の制御なしにClaude Codeを導入することです。
共有APIキーを排除し、SSOを導入し、AIゲートウェイを介してトラフィックをルーティングし、MCPアクセスを管理し、監査ログを有効にし、コスト管理を徹底することで、組織は開発者にClaude Codeのメリットを提供しながら、エンタープライズレベルのセキュリティとコンプライアンスを維持できます。
安全なClaude Codeの導入は、可視性と制御から始まります。TrueFoundryのAIゲートウェイやMCPゲートウェイのようなプラットフォームは、ユーザー認証、AIアクティビティの管理、コスト監視、そしてチーム全体でのAIを活用した開発の安全な拡張のために、企業が必要とする基盤を提供します。
よくある質問
企業はClaude Codeをどのように安全に導入しますか?
エンタープライズ環境でClaude Codeを最も安全に導入する方法は、シングルサインオン(SSO)、一元化されたアクセス制御、監査ログ、およびMCPガバナンスを組み合わせることです。個々の開発者にAPIキーを配布する代わりに、組織は、ユーザーを認証し、ポリシーを適用し、利用状況を監視し、AIアクティビティを完全に可視化するAIゲートウェイを介してClaude Codeのトラフィックをルーティングできます。
開発者はClaude Codeで共有APIキーを使用すべきですか?
いいえ。共有APIキーでは、どのユーザーがアクションを実行したかを特定したり、インシデントを調査したり、チームレベルの権限を適用したりすることが困難になります。エンタープライズ導入では、OKTAやMicrosoft Entra IDなどのプロバイダーを介したIDベースの認証を使用し、すべてのClaude Codeリクエストが特定のユーザーに関連付けられるようにする必要があります。
Claude CodeのセキュリティにおけるAIゲートウェイの役割は何ですか?
AIゲートウェイは、Claude CodeとAIモデルプロバイダー間の集中制御プレーンとして機能します。これにより、組織は認証を強制し、利用状況を追跡し、コストを監視し、レート制限を適用し、監査ログを維持し、モデル全体でアクセスを標準化できます。これにより、プラットフォームチームとセキュリティチームは、開発者のエクスペリエンスを妨げることなく、可視性とガバナンスを得ることができます。
組織はClaude Codeが使用するMCPサーバーをどのように保護できますか?
組織はMCPサーバーを特権インフラストラクチャとして扱うべきです。ベストプラクティスには、承認されたMCPサーバーのリストを維持すること、認証とロールベースのアクセス制御を強制すること、ツール利用状況を監視すること、およびすべてのMCPインタラクションを監査することが含まれます。MCPゲートウェイは、Claude Codeのエンタープライズツール、API、データベース、およびリポジトリへのアクセスに対して、一元的なガバナンスと可観測性を提供できます。
TrueFoundry AI Gateway delivers ~3–4 ms latency, handles 350+ RPS on 1 vCPU, scales horizontally with ease, and is production-ready, while LiteLLM suffers from high latency, struggles beyond moderate RPS, lacks built-in scaling, and is best for light or prototype workloads.
The fastest way to build, govern and scale your AI












.webp)




.png)








.webp)
.webp)








