Configure Any MCP Server
Connect a remote MCP server that doesn't have its own guide to a Dtwo gateway.
On this page
Overview
Use this guide for MCP servers that don’t have their own page here. Any remote MCP server that supports the streamable HTTP transport can be added to your gateway. To request a dedicated guide for a vendor’s MCP server, email support@dtwo.ai.
1. Configure the vendor
Some vendors need setup on their side before an MCP client can connect. Check the vendor’s MCP documentation for steps like these, and complete any that apply:
- Enable MCP access for your organization, usually in an admin console.
- Allowlist your gateway’s OAuth callback URL. Some vendors do this in their admin settings; others need a support request. Your gateway’s callback URL can be found in the Overview tab for your gateway in the Dtwo UI.
- Create an OAuth app, or generate an API key or access token, for the gateway to use.
What the vendor gave you at the end of this step determines which configuration to use in Step 2:
| What you have from the vendor | Tab to use in step 2 |
|---|---|
| No credentials — you only enabled access or allowlisted a URL, or there was no setup at all | OAuth (dynamic registration) |
| A client ID and client secret from an OAuth app you created | OAuth (your own app) |
| An API key or access token | API key or token |
2. Add the MCP server to your gateway config
Click the tab below that matches the one you picked from the table in Step 1.
Go to your gateway in the Dtwo UI and open Configuration → Advanced. In the mcp_servers section add the following entry:
- name: <SERVER_NAME>
description: "<DESCRIPTION>"
url: <MCP_URL>
transport_type: streamablehttp
authentication:
type: oauth
grant_type: authorization_code
issuer: "<ISSUER_URL>"
redirect_uri: "<CALLBACK_URL>"
scopes:
- <SCOPE>
dcr_enabled: true
pkce_enabled: true
Replace the placeholder values:
<SERVER_NAME>— a short lowercase name for the server, such asacme. It’s used as the prefix for the server’s tools.<DESCRIPTION>— a one-line description of what the server covers.<MCP_URL>— the server’s MCP endpoint URL, from the vendor’s documentation. It’s usually on their MCP or AI integrations page, often ends in/mcp, and is the same URL they give for connecting clients like Claude or Cursor directly.<ISSUER_URL>— the server’s OAuth issuer. To find it, openhttps://<MCP_HOST>/.well-known/oauth-protected-resourcein your browser, where<MCP_HOST>is the host portion of<MCP_URL>. If it doesn’t load, tryhttps://<MCP_HOST>/.well-known/oauth-protected-resource/mcpinstead. The<ISSUER_URL>is theauthorization_serversvalue from the response.<SCOPE>— one line per scope the server supports. To find them, openhttps://<ISSUER_HOST>/.well-known/oauth-authorization-serverin your browser, where<ISSUER_HOST>is the host portion of<ISSUER_URL>, and use the values listed underscopes_supportedin the response. If no scopes are returned, leave the scopes blank.<CALLBACK_URL>— your Dtwo gateway’s OAuth callback URL, found in the Overview tab for your gateway in the Dtwo UI.
Go to your gateway in the Dtwo UI and open Configuration → Advanced. In the mcp_servers section add the following entry:
- name: <SERVER_NAME>
description: "<DESCRIPTION>"
url: <MCP_URL>
transport_type: streamablehttp
authentication:
type: oauth
grant_type: authorization_code
scopes:
- <SCOPE>
client_id: "<CLIENT_ID>"
client_secret: "<CLIENT_SECRET>"
authorization_url: "<AUTHORIZATION_URL>"
token_url: "<TOKEN_URL>"
redirect_uri: "<CALLBACK_URL>"
Replace the placeholder values:
<SERVER_NAME>— a short lowercase name for the server, such asacme. It’s used as the prefix for the server’s tools.<DESCRIPTION>— a one-line description of what the server covers.<MCP_URL>— the server’s MCP endpoint URL, from the vendor’s documentation. It’s usually on their MCP or AI integrations page, often ends in/mcp, and is the same URL they give for connecting clients like Claude or Cursor directly.<SCOPE>— one line per scope the app needs. These should match the scopes you configured when you created the OAuth app. If you didn’t configure scopes, leave the scopes blank.<CLIENT_ID>and<CLIENT_SECRET>— from the OAuth app you created.<AUTHORIZATION_URL>and<TOKEN_URL>— the vendor’s OAuth authorization and token endpoints, listed in their OAuth documentation.<CALLBACK_URL>— your Dtwo gateway’s OAuth callback URL, found in the Overview tab for your gateway in the Dtwo UI. Set the same URL as the redirect URL in the vendor’s OAuth app.
Go to your gateway in the Dtwo UI and open Configuration → Advanced. In the mcp_servers section add the following entry:
- name: <SERVER_NAME>
description: "<DESCRIPTION>"
url: <MCP_URL>
transport_type: streamablehttp
authentication:
type: bearer
token: "<ACCESS_TOKEN>"
Replace the placeholder values:
<SERVER_NAME>— a short lowercase name for the server, such asacme. It’s used as the prefix for the server’s tools.<DESCRIPTION>— a one-line description of what the server covers.<MCP_URL>— the server’s MCP endpoint URL, from the vendor’s documentation. It’s usually on their MCP or AI integrations page, often ends in/mcp, and is the same URL they give for connecting clients like Claude or Cursor directly.<ACCESS_TOKEN>— the API key or access token from the vendor. Every request runs with the permissions of the account that created it, so use one scoped to what your agents need.
3. Deploy and verify
Save the configuration and deploy the gateway.
If you used one of the OAuth tabs, ask your AI client to authorize the server via the gateway. This opens the vendor’s sign-in and consent screen — sign in as the user whose permissions the agent should inherit, and approve the consent prompt.
Then confirm the server’s tools appear and run a quick read-only call, such as listing or looking up a record, to make sure the connection works. If the tools don’t appear, refresh the tool list in your AI client — some clients don’t pick it up automatically.