Connecting to an MCP server from an MCP client

  • 릴리스 버전: Australia
  • 업데이트 날짜 2026년 03월 12일
  • 소요 시간: 15분
  • Connect to a Model Context Protocol (MCP) server from an MCP client by creating an OAuth inbound integration and configuring the client with the server details.

    With the Quickstart Server or after creating a server, you can complete the following steps to connect to a server from a client:

    1. Create an OAuth inbound integration for an MCP client
    2. Configure an MCP client to connect to an MCP server

    The process to configure a client to connect to a server is dependent on the client used. For more information, refer to the documentation for your AI application and client.

    Create an OAuth inbound integration for an MCP client

    Secure access to Model Context Protocol (MCP) servers on an instance by creating an OAuth inbound integration for each MCP client.

    시작하기 전에

    Role required: oauth_admin, mi_admin, admin

    이 태스크 정보

    For each client that you want to access servers on an instance, create an OAuth inbound integration in Machine Identity Console. To create the OAuth integration, you need a redirect URL from the client. For more information, refer to the documentation for your AI application and client.

    프로시저

    1. Navigate to All > MCP Server Console.
    2. From the Configuration tab, select Servers.
    3. From the OAuth setup required banner, select Set up OAuth.
      Alternatively, you can navigate to All > Machine Identity Console and select the Inbound integrations tab.
      주:
      In the list of existing inbound integrations, you might see integrations created with the same names as servers (including underscores). These are integrations for monitoring servers from AI Control Tower and shouldn't be used to integrate with clients.
    4. Select New integration.
    5. Select OAuth - Authorization code grant.
    6. On the form, fill in the required fields.
      For more information about this form, see Configure an OAuth authorization code grant.
      표 1. Inbound integration form
      Field Value
      Details section
      Name Enter a name for the OAuth integration.
      Redirect URLs Enter the redirect URL for a client. The authorization code is sent to this URL after authentication. To get the redirect URL, refer to the documentation for your AI application and client.

      To connect to the ServiceNow MCP client on another instance, use the following redirect URL: https://<client-instance>.service-now.com/oauth_redirect.do. For more information, see the Model Context Protocol Client documentation.

      Auth scope section
      Allow access only to APIs in selected scope Clear the check box to make the OAuth integration broadly scoped.
      Advanced options section
      Token Format Select JWT.
    7. Select Save.
      The OAuth inbound integration is created as broadly scoped with a client ID and client secret that you use when configuring the client to connect to servers on the instance.

      An OAuth inbound integration for Claude to connect to MCP servers as an MCP client.

    다음에 수행할 작업

    Configure the client to use the client ID and client secret to authenticate with servers on the instance.

    Configure an MCP client to connect to an MCP server

    Configure a Model Context Protocol (MCP) client to connect to an MCP server and prompt the server to perform a task.

    시작하기 전에

    Role required: none

    이 태스크 정보

    The process to configure a client to connect to a server is dependent on the client used. The following procedure is a high-level overview of the workflow to configure a client to call a server. For more information, refer to the documentation for your AI application and client. For an example that demonstrates how to connect from a server on one instance to the ServiceNow Model Context Protocol Client on another instance, see the example following this procedure.

    프로시저

    1. Configure a client with the required server details as determined by the client.
      표 2. Server details for MCP client configuration
      Server details Value
      Server URL https://<server-instance>.service-now.com/sncapps/mcp-server/mcp/<server-name>

      To connect to the preconfigured Quickstart Server, use https://<server-instance>.service-now.com/sncapps/mcp-server/mcp/sn_mcp_server_default.

      Host <server-instance>.service-now.com
      Base URL /sncapps/mcp-server
      Scope mcp_server
      Authentication type OAuth 2.0
      Identity Provider Generic OAuth 2
      Authorization URL https://<server-instance>.service-now.com/oauth_auth.do
      Token URL https://<server-instance>.service-now.com/oauth_token.do
      Token Revocation URL https://<server-instance>.service-now.com/oauth_revoke.do
      Refresh URL https://<server-instance>.service-now.com/oauth_auth.do
      Redirect URL https://<server-instance>.service-now.com/oauth/callback
      Client ID The client ID from the OAuth inbound integration on the server instance.
      Client secret The client secret from the OAuth inbound integration on the server instance.

      After configuring these details, the client calls the server with the Authorization: Bearer <token> header. If the token is validated by the server, the client receives the list of tools available for use.

    2. From the client, you can view the list of tools available to determine how to prompt the server.
    3. Enter a prompt for the information you need or for the tool to perform an action on the instance.

      For example, if the Look up Incident Records tool is available, you could enter "Get all open incidents." With the Case summarization tool, you could enter "Summarize all cases closed this week."

      The server runs the relevant tools and returns the result to the client as JSON data. The client presents the response as formatted text.

    Connecting to an MCP server from ServiceNow Model Context Protocol Client

    This example demonstrates how to connect to a server from an AI agent on another instance using the ServiceNow Model Context Protocol Client. First, you configure the client to call the preconfigured Quickstart Server. From an AI agent, you access the Quickstart Server's list of tools and add individual tools to the agent. Lastly, you test the agent in AI Agent Studio by providing a prompt and seeing the agent's response. For more information, see the Model Context Protocol Client documentation.

    Role required: sn_mcp_client.admin

    1. On the server instance, create an OAuth inbound integration for the ServiceNow Model Context Protocol Client.

      For more information, see Create an OAuth inbound integration for an MCP client.

    2. On the client instance, navigate to All > AI Agent Studio > Settings.
    3. Select Manage MCP Servers.
    4. Select New.
    5. Add the Quickstart Server.

      For more information about this step, see Add an MCP Server with OAuth 2.1.

      1. On the Add MCP server form, fill in the fields.
        표 3. Add MCP server form
        Field Value
        Name Quickstart Server
        Authentication Type OAuth 2.1
        MCP server URL https://<server-instance>.service-now.com/sncapps/mcp-server/mcp/sn_mcp_server_default
      2. Select Next.
      3. On the form, fill in the fields.
        표 4. Add MCP server form
        Field Value
        Client registration type Manual Registration
        Grant type Authorization Code
        Token authentication method Client Secret Post
        Client ID The client ID from the OAuth inbound integration for the Model Context Protocol Client on the server instance.
        Client secret The client secret from the OAuth inbound integration for the Model Context Protocol Client on the server instance.
        Authorization URL https://<server-instance>.service-now.com/oauth_auth.do
        Token URL https://<server-instance>.service-now.com/oauth_token.do
        Token Revocation URL https://<server-instance>.service-now.com/oauth_revoke.do
      4. Select Save.
    6. Verify the OAuth configuration.
      1. Select Authenticate.
      2. Select Allow to allow the client to connect to the server.
    7. Add tools from the Quickstart Server to an AI agent.

      For more information about this step, see Add a Model Context Protocol to an AI agent.

      1. In AI Agent Studio, select the Create and manage tab.
      2. From the AI agents tab, select an existing agent or create one.

        For information about creating an agent, see Create an AI agent.

      3. Select Add tools and information.
      4. Select Add tool > MCP server tool.
      5. On the form, fill in the fields.
        표 5. Add a Model Context Protocol Tool form
        Field Value
        Select Model Context Protocol server Quickstart Server
        Select tool Select the tools from the Quickstart Server that you want to use with this AI agent.

        Viewing the tools list for the Quickstart Server from an AI agent in AI Agent Studio.

      6. Select Add.
      7. Select Save and continue.
    8. Test the AI agent.

      For more information about this step, see Test an AI agent.

      1. In AI Agent Studio, select the Testing tab.
      2. Select Start manual test.
      3. In the Choose a test type field, select AI agent or workflow.
      4. Select the AI agent you configured and its version.
      5. In the Task field, enter a prompt to get information or to perform an action on the instance.

        The prompt should be based on which tools are available. For example, if you added the Look up Case Records and Case summarization tools, you can enter "Summarize all cases closed this week."

        Prompting the AI agent for summaries of cases closed by Abel Tuter this week.

      6. Select Continue to Test Chat Response.

      The AI agent calls the server, and the server runs the tools requested based on the prompt. The server returns the information to the agent as JSON data, and the agent presents it as formatted text. In this example, the agent returns summaries of the cases closed by Abel Tuter in the past week.

      The agent responds with summaries of two cases closed by Abel Tuter this week.