# Configure the ServiceNow MCP Server

Connect ServiceNow's MCP Server Console to a Dtwo gateway via OAuth.

## Overview

ServiceNow's MCP Server Console lets you expose REST APIs, Scripted REST APIs, Actions/Subflows, Knowledge Graph capabilities, and Now Assist skills as MCP tools directly from your instance, with each server you create getting its own endpoint. Access is authorized through OAuth via a client integration you register yourself.

## 1. Configure ServiceNow

Confirm MCP Server Console is available — it requires the `snmcpserver` plugin and activation through the appropriate Now Assist application, and the admin performing setup needs the `sn_mcp_server.admin` or `admin` role.

1. Go to **All → MCP Server Console → Configuration → Servers** and click **Create server**. Give it a name, label, and description — the name becomes part of the MCP endpoint URL. You can also use ServiceNow's preconfigured **Quickstart Server** instead of creating one from scratch.
2. Add at least one tool to the server. ServiceNow can expose capabilities such as REST APIs, Scripted REST APIs, Actions/Subflows, Knowledge Graph capabilities, and Now Assist skills.
3. Copy the server's MCP URL from the server record. ServiceNow's MCP endpoints follow the pattern `https://<SERVICENOW_INSTANCE>.service-now.com/sncapps/mcp-server/mcp/<SERVER_NAME>`; the server record shows the actual URL for the server you created.
4. Create the OAuth client for Dtwo. Go to **MCP Server Console → Client authorization → Create integration**, give it a name (for example, `Dtwo`), and enter your Dtwo gateway's OAuth callback URL — found in the Overview tab for your gateway in the Dtwo UI. ServiceNow generates a **Client ID** and **Client Secret** and provides the connection URLs — copy all of these, since the secret is shown only in the connection summary.

## 2. Add the MCP server to your gateway config

Go to your gateway in the Dtwo UI and open **Configuration → Advanced**. In the `mcp_servers` section add the following entry:

```yaml
  - name: servicenow
    description: "ServiceNow MCP server."
    url: "https://<SERVICENOW_INSTANCE>.service-now.com/sncapps/mcp-server/mcp/<SERVER_NAME>"
    transport_type: streamablehttp
    authentication:
      type: oauth
      grant_type: authorization_code
      issuer: "https://<SERVICENOW_INSTANCE>.service-now.com"
      scopes:
        - mcp_server
      client_id: "<SERVICENOW_CLIENT_ID>"
      client_secret: "<SERVICENOW_CLIENT_SECRET>"
      authorization_url: "https://<SERVICENOW_INSTANCE>.service-now.com/oauth_auth.do"
      token_url: "https://<SERVICENOW_INSTANCE>.service-now.com/oauth_token.do"
      redirect_uri: "<CALLBACK_URL>"
      pkce_enabled: true
```

Replace the placeholder values:

- `<SERVICENOW_INSTANCE>` — your ServiceNow instance name.
- `<SERVER_NAME>` — the name you gave the server when you created it in step 1.
- `<SERVICENOW_CLIENT_ID>` and `<SERVICENOW_CLIENT_SECRET>` — come from the integration you created in step 1.
- `<CALLBACK_URL>` — your Dtwo gateway's OAuth callback URL, found in the Overview tab for your gateway in the Dtwo UI.

## 3. Deploy and verify

Save the configuration and deploy the gateway.

Then, in your AI client, ask it to authorize ServiceNow via the gateway. This opens the ServiceNow login screen — sign in as the user whose permissions the agent should inherit, and approve the consent prompt. Once authorized, confirm the server's tools appear and run a quick read-only call, such as listing incidents, to make sure the connection works.

If the tools don't appear after you authorize, refresh the tool list in your AI client — some clients don't pick it up automatically.

---

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