# Connect Cursor for Yourself

Add your Dtwo gateway to Cursor just for yourself.

## Overview

This guide adds your Dtwo gateway to Cursor just for you. To set it up for everyone in your organization instead, see [Roll Out Dtwo in Cursor](/docs/connect-client-cursor).

## Set up Cursor

Select how your gateway signs people in.

<div class="doc-tabs" data-tabs>

<div class="doc-tablist doc-tablist-cards" role="tablist" aria-label="Sign-in type">
<button type="button" role="tab" class="doc-tab" data-tab="dtwo" aria-selected="true"><img src="/favicon.svg" alt="" width="36" height="36" data-no-lightbox>Dtwo authentication</button>
<button type="button" role="tab" class="doc-tab" data-tab="entra"><img src="/logos/azure.svg" alt="" width="36" height="36" data-no-lightbox>Microsoft Entra ID</button>
<button type="button" role="tab" class="doc-tab" data-tab="okta"><img src="/logos/okta.png" alt="" width="36" height="36" data-no-lightbox>Okta</button>
</div>

<div class="doc-tabpanel" data-panel="dtwo" role="tabpanel">

<p class="doc-step">Step 1: Add the gateway to Cursor</p>

1. Add the gateway to `~/.cursor/mcp.json` to use it in every project, or to `.cursor/mcp.json` in a project to use it there only:

   ```json
   {
     "mcpServers": {
       "<GatewayName>": {
         "url": "<GatewayURL>",
         "auth": {
           "CLIENT_ID": "<ClientId>"
         }
       }
     }
   }
   ```

   Replace the placeholders:

   - `<GatewayName>`: your gateway's name.
   - `<GatewayURL>`: your gateway's MCP URL. Copy it from your gateway's **Overview** tab in the Dtwo UI. It must start with `https://`.
   - `<ClientId>`: Cursor's client ID. Go to your gateway in the Dtwo UI, open **Configuration → Authentication**, and copy the client ID.

   If the file already lists other servers, add this entry next to them.

2. Open **Customize** in the sidebar, go to **MCPs**, and switch your gateway on.
3. Sign in with your Dtwo account when your browser opens.

If the gateway doesn't appear, run **Developer: Reload Window** from the command palette.

<p class="doc-step">Step 2: Verify the connection</p>

1. Open **Customize → MCPs** and confirm your gateway is switched on with its tools listed.
2. In a chat, ask which tools it has through your gateway. It should list the tools from the MCP servers behind your gateway.

</div>

<div class="doc-tabpanel" data-panel="entra" role="tabpanel">

<p class="doc-step">Step 1: Get Cursor's client ID from Microsoft Entra ID</p>

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

If you haven't registered Cursor in Microsoft Entra ID yet, follow [Register Cursor in Microsoft Entra ID](/docs/register-cursor-entra), then come back here.

<p class="doc-step">Step 2: Add the gateway to Cursor</p>

1. Add the gateway to `~/.cursor/mcp.json` to use it in every project, or to `.cursor/mcp.json` in a project to use it there only:

   ```json
   {
     "mcpServers": {
       "<GatewayName>": {
         "url": "<GatewayURL>",
         "auth": {
           "CLIENT_ID": "<ClientId>"
         }
       }
     }
   }
   ```

   Replace the placeholders:

   - `<GatewayName>`: your gateway's name.
   - `<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 you copied when you registered the client in your identity provider.

   If the file already lists other servers, add this entry next to them.

2. Open **Customize** in the sidebar, go to **MCPs**, and switch your gateway on.
3. Sign in when your browser opens.

If the gateway doesn't appear, run **Developer: Reload Window** from the command palette.

<p class="doc-step">Step 3: Verify the connection</p>

1. Open **Customize → MCPs** and confirm your gateway is switched on with its tools listed.
2. In a chat, ask which tools it has through your gateway. It should list the tools from the MCP servers behind your gateway.

</div>

<div class="doc-tabpanel" data-panel="okta" role="tabpanel">

<p class="doc-step">Step 1: Get Cursor's client ID from Okta</p>

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

If you haven't registered Cursor in Okta yet, follow [Register Cursor in Okta](/docs/register-cursor-okta), then come back here.

<p class="doc-step">Step 2: Add the gateway to Cursor</p>

1. Add the gateway to `~/.cursor/mcp.json` to use it in every project, or to `.cursor/mcp.json` in a project to use it there only:

   ```json
   {
     "mcpServers": {
       "<GatewayName>": {
         "url": "<GatewayURL>",
         "auth": {
           "CLIENT_ID": "<ClientId>"
         }
       }
     }
   }
   ```

   Replace the placeholders:

   - `<GatewayName>`: your gateway's name.
   - `<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 you copied when you registered the client in your identity provider.

   If the file already lists other servers, add this entry next to them.

2. Open **Customize** in the sidebar, go to **MCPs**, and switch your gateway on.
3. Sign in when your browser opens.

If the gateway doesn't appear, run **Developer: Reload Window** from the command palette.

<p class="doc-step">Step 3: Verify the connection</p>

1. Open **Customize → MCPs** and confirm your gateway is switched on with its tools listed.
2. In a chat, ask which tools it has through your gateway. It should list the tools from the MCP servers behind your gateway.

</div>

</div>

---

Having trouble? Email [support@dtwo.ai](mailto:support@dtwo.ai).