Connect Cursor for Yourself
Add your Dtwo gateway to Cursor just for yourself.
On this page
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.
Set up Cursor
Select how your gateway signs people in.
Step 1: Add the gateway to Cursor
-
Add the gateway to
~/.cursor/mcp.jsonto use it in every project, or to.cursor/mcp.jsonin a project to use it there only:{ "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 withhttps://.<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.
-
Open Customize in the sidebar, go to MCPs, and switch your gateway on.
-
Sign in with your Dtwo account when your browser opens.
If the gateway doesn’t appear, run Developer: Reload Window from the command palette.
Step 2: Verify the connection
- Open Customize → MCPs and confirm your gateway is switched on with its tools listed.
- In a chat, ask which tools it has through your gateway. It should list the tools from the MCP servers behind your gateway.
Step 1: Get Cursor's client ID from Microsoft Entra ID
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, then come back here.
Step 2: Add the gateway to Cursor
-
Add the gateway to
~/.cursor/mcp.jsonto use it in every project, or to.cursor/mcp.jsonin a project to use it there only:{ "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 withhttps://.<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.
-
Open Customize in the sidebar, go to MCPs, and switch your gateway on.
-
Sign in when your browser opens.
If the gateway doesn’t appear, run Developer: Reload Window from the command palette.
Step 3: Verify the connection
- Open Customize → MCPs and confirm your gateway is switched on with its tools listed.
- In a chat, ask which tools it has through your gateway. It should list the tools from the MCP servers behind your gateway.
Step 1: Get Cursor's client ID from Okta
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, then come back here.
Step 2: Add the gateway to Cursor
-
Add the gateway to
~/.cursor/mcp.jsonto use it in every project, or to.cursor/mcp.jsonin a project to use it there only:{ "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 withhttps://.<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.
-
Open Customize in the sidebar, go to MCPs, and switch your gateway on.
-
Sign in when your browser opens.
If the gateway doesn’t appear, run Developer: Reload Window from the command palette.
Step 3: Verify the connection
- Open Customize → MCPs and confirm your gateway is switched on with its tools listed.
- In a chat, ask which tools it has through your gateway. It should list the tools from the MCP servers behind your gateway.