Add an MCP Server with OAuth 2.1

task brazil Updated Sep 10, 2026 3 min read add-an-oauth-2-1-mcp-server.md
Raw file servicenow.com

Add an MCP Server with OAuth 2.1 in the AI Agent Studio.

Before you begin

Role required: sn_mcp_client.admin

About this task

OAuth is the usual method to authenticate the MCP servers. If your MCP server supports it, choose OAuth 2.1 in the Authentication method.

Procedure

  1. Navigate to All > AI Agent Studio > Settings.

  2. Navigate to Manage MCP Servers and select New.

  3. On the form, fill in the fields.

Field

Description

Name

Name for your MCP Server.

Authentication Type

The authentication type with which you want to add your MCP Server.Select OAuth 2.1.

MCP Server URL

The web address of your MCP Server.

\[Omitted image "mcp-server-oauth.png"\] Alt text: Adding an MCP Server in AI Agent Studio with OAuth 2.1.
  1. Select Next.

    The form extends with the registration details.

  2. On the form, fill in the fields:

    The dynamic client registration auto-populates the data in the form fields.

    Note: If dynamic registration is supported by the MCP Server, you’ll be prompted to confirm the grant type and other inputs. If dynamic registration isn’t supported, you can continue with the Manual Registration method in Step 6.

Field

Description

Grant Type

The way you want to obtain an access token for accessing protected resources.One of the following two options is used here with auto-populated data.

  • Authorization Code: A system-generated code that is used for granting access to an application or resource.
  • Client Credentials: Access token provided by the administrator to access the application directly.

Token Authentication Method

Unique token granted to access resources.Select the value from the drop-down list.

Auth Scopes

Define the specific permissions for an application.Note: The Auth scopes must be comma-separated values.

Authentication Token for Client Registration

Authentication token used to verify client's identity and grant it permission to register with an authorization token.Provide the following values:

  • Header: Authorization header.
  • Value: Authentication password.

Authorization URL

Web address of your server to direct authorization.

Token URL

Web address containing the token.

Token Revocation URL

Web address to revoke the previously provided token.

\[Omitted image "aouth-dynamic-client-registration.png"\] Alt text: Dynamic client registration form with auto-populated data in the form fields.
The MCP Server with dynamic client registration is added as a simple connection and credential alias.
  1. On the form, fill in the fields:

    Note:

    • If your MCP Server doesn’t support Dynamic Client Registration, then you can register the OAuth client for AI agents in your MCP Server manually and update those client details in AI Agent Studio.
    • The manual client registration doesn’t auto-populate the data in the form fields and must be manually provided.

Field

Description

Grant Type

The way you want to obtain an access token for accessing protected resources.You can select one of the two options:

  • Authorization Code: A system-generated code that is used for grating access to an application or resource.
  • Client Credentials: Access token provided by the administrator to access the application directly.

Token Authentication Method

Unique token granted to access resources.Select the value from the drop-down list.

Client ID

Unique ID for authentication and authorization purposes.

Client Secret

Unique credentials used for authentication.

Auth Scopes

Define the specific permissions for an application.Note: The Auth scopes must be comma-separated values.

Authentication Token for Client Registration

Authentication token used to verify client's identity and grant it permission to register with an authorization token.Provide the following values:

  • Header: Authorization header.
  • Value: Authentication password.

Authorization URL

Web address of your server to direct authorization.

Token URL

Web address containing the token.

Token Revocation URL

Web address to revoke the previously provided token.

\[Omitted image "mcp-server-manual-registration.png"\] Alt text: Manual client registration for an OAuth MCP Server.
  1. Select Add.

    Selecting Add takes you to the MCP Server record where you must authenticate it for adding an MCP tool to an AI agent.

  2. Select Authenticate.

    Selecting Authenticate takes you to the third-party authorization page where you must select a workspace and select Authorize.

    Note: When the OAuth access or refresh tokens aren’t available, you must authenticate the OAuth configuration on the MCP Server record to add it as a tool to an AI agent.

Search documentation
Search document titles and file paths on the brazil branch