Roll Out Dtwo in Claude Code

Roll out your Dtwo gateway to everyone in your organization in Claude Code.

On this page
  1. Overview
  2. Roll out Dtwo to your organization in Claude Code

Overview

This guide walks you through rolling out Dtwo to your whole organization in Claude Code and turning off direct connections to MCP servers. If you only want to set it up for yourself, see Connect Claude Code for yourself.

Roll out Dtwo to your organization in Claude Code

Select how your gateway signs people in.

Step 1: Add the gateway and turn off direct connections to MCP servers

This step adds the gateway to your Claude Code managed settings and turns off direct connections to MCP servers. Everyone gets the gateway automatically, can’t remove it, and only has to sign in with their Dtwo account.

In the Claude admin console, go to Organization settings → Claude Code → Managed settings and add the config below.

{
  "managedMcpServers": {
    "<GatewayName>": {
      "type": "http",
      "url": "<GatewayURL>"
    }
  },
  "allowManagedMcpServersOnly": true,
  "allowedMcpServers": [],
  "disableClaudeAiConnectors": true
}

Replace the placeholders:

  • <GatewayURL>: your gateway’s MCP URL. Copy it from your gateway’s Overview tab in the Dtwo UI. It must start with https://.
  • <GatewayName>: your gateway’s name. This is the name people see for the server in Claude Code.

What each setting does:

  • managedMcpServers adds the gateway for everyone. Requires Claude Code v2.1.259 or later.
  • allowedMcpServers: [] blocks every server users, plugins, or claude.ai add. The gateway still loads because servers in managedMcpServers skip the allowlist.
  • allowManagedMcpServersOnly stops people from widening the allowlist in their own settings. Requires Claude Code v2.1.273 or later.
  • disableClaudeAiConnectors stops Claude Code from loading the connectors people set up on claude.ai.

Claude Code picks up the config the next time people start it, as long as they’re signed in with their work Claude account. See Anthropic’s server-managed settings guide for details.

Warning: MCP servers people already had stop loading the next time they start Claude Code, and nothing tells them why. Let your team know before you roll it out.

Step 2: Check the rollout

  1. Restart Claude Code. It only picks up the new managed settings when it starts, so quit any open sessions and start it again.

  2. Run /mcp in Claude Code. Your gateway shows as connected, with its tools listed. When you pushed it to your organization, it’s listed under Managed MCPs.

  3. Run claude mcp list. If you turned off other servers, your gateway is the only one.

  4. Try adding another server:

    claude mcp add --transport http test https://example.com/mcp

    With other servers turned off, Claude Code refuses with an enterprise policy error.

To see which managed settings reached a machine, run /status and check the Setting sources line.

Step 1: Get Claude Code's client ID from Microsoft Entra ID

If you’ve already registered Claude Code as an app in Microsoft Entra ID, go to App registrations, open the Claude Code app, and copy the Application (client) ID from its Overview page. This is your <ClientId>.

If you haven’t registered Claude Code in Microsoft Entra ID yet, follow Register Claude Code in Microsoft Entra ID, then come back here.

Step 2: Add the gateway and turn off direct connections to MCP servers

This step adds the gateway to your Claude Code managed settings and turns off direct connections to MCP servers. Everyone gets the gateway automatically, can’t remove it, and only has to sign in.

In the Claude admin console, go to Organization settings → Claude Code → Managed settings and add the config below.

{
  "managedMcpServers": {
    "<GatewayName>": {
      "type": "http",
      "url": "<GatewayURL>",
      "oauth": {
        "clientId": "<ClientId>",
        "callbackPort": 33418
      }
    }
  },
  "allowManagedMcpServersOnly": true,
  "allowedMcpServers": [],
  "disableClaudeAiConnectors": true
}

Replace the placeholders:

  • <GatewayURL>: your gateway’s MCP URL. Copy it from your gateway’s Overview tab in the Dtwo UI. It must start with https://.
  • <ClientId>: the client ID from Step 1.
  • <GatewayName>: your gateway’s name. This is the name people see for the server in Claude Code.

What each setting does:

  • managedMcpServers adds the gateway for everyone. Requires Claude Code v2.1.259 or later.
  • allowedMcpServers: [] blocks every server users, plugins, or claude.ai add. The gateway still loads because servers in managedMcpServers skip the allowlist.
  • allowManagedMcpServersOnly stops people from widening the allowlist in their own settings. Requires Claude Code v2.1.273 or later.
  • disableClaudeAiConnectors stops Claude Code from loading the connectors people set up on claude.ai.

Claude Code picks up the config the next time people start it, as long as they’re signed in with their work Claude account. See Anthropic’s server-managed settings guide for details.

Warning: MCP servers people already had stop loading the next time they start Claude Code, and nothing tells them why. Let your team know before you roll it out.

Step 3: Check the rollout

  1. Restart Claude Code. It only picks up the new managed settings when it starts, so quit any open sessions and start it again.

  2. Run /mcp in Claude Code. Your gateway shows as connected, with its tools listed. When you pushed it to your organization, it’s listed under Managed MCPs.

  3. Run claude mcp list. If you turned off other servers, your gateway is the only one.

  4. Try adding another server:

    claude mcp add --transport http test https://example.com/mcp

    With other servers turned off, Claude Code refuses with an enterprise policy error.

To see which managed settings reached a machine, run /status and check the Setting sources line.

Step 1: Get Claude Code's client ID from Okta

If you’ve already registered Claude Code as an app in Okta, go to Applications and Resources → Applications, open the Claude Code app integration, and copy the Client ID from its General tab. This is your <ClientId>.

If you haven’t registered Claude Code in Okta yet, follow Register Claude Code in Okta, then come back here.

Step 2: Add the gateway and turn off direct connections to MCP servers

This step adds the gateway to your Claude Code managed settings and turns off direct connections to MCP servers. Everyone gets the gateway automatically, can’t remove it, and only has to sign in.

In the Claude admin console, go to Organization settings → Claude Code → Managed settings and add the config below.

{
  "managedMcpServers": {
    "<GatewayName>": {
      "type": "http",
      "url": "<GatewayURL>",
      "oauth": {
        "clientId": "<ClientId>",
        "callbackPort": 33418
      }
    }
  },
  "allowManagedMcpServersOnly": true,
  "allowedMcpServers": [],
  "disableClaudeAiConnectors": true
}

Replace the placeholders:

  • <GatewayURL>: your gateway’s MCP URL. Copy it from your gateway’s Overview tab in the Dtwo UI. It must start with https://.
  • <ClientId>: the client ID from Step 1.
  • <GatewayName>: your gateway’s name. This is the name people see for the server in Claude Code.

What each setting does:

  • managedMcpServers adds the gateway for everyone. Requires Claude Code v2.1.259 or later.
  • allowedMcpServers: [] blocks every server users, plugins, or claude.ai add. The gateway still loads because servers in managedMcpServers skip the allowlist.
  • allowManagedMcpServersOnly stops people from widening the allowlist in their own settings. Requires Claude Code v2.1.273 or later.
  • disableClaudeAiConnectors stops Claude Code from loading the connectors people set up on claude.ai.

Claude Code picks up the config the next time people start it, as long as they’re signed in with their work Claude account. See Anthropic’s server-managed settings guide for details.

Warning: MCP servers people already had stop loading the next time they start Claude Code, and nothing tells them why. Let your team know before you roll it out.

Step 3: Check the rollout

  1. Restart Claude Code. It only picks up the new managed settings when it starts, so quit any open sessions and start it again.

  2. Run /mcp in Claude Code. Your gateway shows as connected, with its tools listed. When you pushed it to your organization, it’s listed under Managed MCPs.

  3. Run claude mcp list. If you turned off other servers, your gateway is the only one.

  4. Try adding another server:

    claude mcp add --transport http test https://example.com/mcp

    With other servers turned off, Claude Code refuses with an enterprise policy error.

To see which managed settings reached a machine, run /status and check the Setting sources line.

Having trouble?

Email us and we'll help you get set up.

Email support
Get in touch

Tell us what you need to govern.

A few lines is plenty — what you're deploying, and what you need control over. We read every one.

↑↓ to navigate ↵ to open