Introducing confident-trace — our new tracing SDK

Get MCP Server

(v2)

GET

Retrieves an MCP server by id, with its full configuration and the tools its last successful connection discovered. The stored OAuth client secret is not returned: authConfig.clientSecretPreview masks it instead.

GET/v2/mcp-servers/{mcpServerId}
curl -X GET "https://api.confident-ai.com/v2/mcp-servers/{mcpServerId}" \
  -H "CONFIDENT_API_KEY: <PROJECT-API-KEY>"
200
{
  "success": true,
  "data": {
    "id": "<MCP-SERVER-ID>",
    "name": "Internal Tools",
    "description": "Internal engineering tools",
    "transport": "STDIO",
    "connected": true,
    "url": "https://mcp.internal.example.com/sse",
    "headers": {
      "Authorization": "Bearer YOUR-TOKEN"
    },
    "authType": "HEADERS",
    "authConfig": {
      "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47",
      "clientId": "9a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d",
      "scope": "api://internal-tools/.default",
      "clientSecretPreview": "••••••••Xk3mZq"
    },
    "command": "npx",
    "args": [
      "-y",
      "@modelcontextprotocol/server-filesystem"
    ],
    "availableTools": [
      {
        "name": "search_issues",
        "description": "Search issues in a repository",
        "inputSchema": {
          "type": "object"
        },
        "annotations": {
          "readOnlyHint": true
        }
      }
    ]
  },
  "deprecated": false
}

Headers

  • CONFIDENT_API_KEYstringRequired

    The API key of your Confident AI project.

Path parameters

  • mcpServerIdstringRequired

    The id of the MCP server.

Response

Get MCP Server succeeded.

  • successboolean

    Indicates if the request was successful.

  • dataobject

    An MCP server registered with your project: how Confident AI reaches it, how it authenticates, and the tools the last connection found. The stored OAuth client secret is never returned — authConfig.clientSecretPreview masks it.

    Show 12 propertiesHide 12 properties
    • idstring

      The id of the MCP server, generated by Confident AI.

    • namestring

      The name of the MCP server.

    • descriptionstring | null

      What the MCP server is for.

    • transportenum

      How Confident AI reaches the server. HTTP requires url and is the only transport that authenticates; STDIO requires command and launches the server as a local process.

      Show 2 enum valuesHide 2 enum values
      • STDIO
      • HTTP
    • connectedboolean

      Whether the last connection attempt succeeded. Set by the connect route, and reset to false by any update.

    • urlstring | null

      The URL of the server. Only set when transport is HTTP.

    • headersobject | null

      The static headers sent with every request, returned as stored. Only set when authType is HEADERS.

    • authTypeenum

      How Confident AI authenticates to the server. HEADERS sends the static headers map, OAUTH_CLIENT_CREDENTIALS and AZURE_AD fetch a token from authConfig before every call. HTTP transport only; a STDIO server is always HEADERS.

      Show 3 enum valuesHide 3 enum values
      • HEADERS
      • OAUTH_CLIENT_CREDENTIALS
      • AZURE_AD
    • authConfigobject | null

      The stored credentials with the secret removed: clientSecret never leaves Confident AI, and a masked clientSecretPreview stands in for it.

      Show 4 propertiesHide 4 properties
      • tenantIdstring

        The Azure AD directory (tenant) id, as stored.

      • clientIdstring

        The OAuth client id, as stored.

      • scopestring

        The OAuth scope requested, as stored.

      • clientSecretPreviewstring

        A mask of the stored OAuth client secret — bullets followed by its last six characters — so you can tell which secret is stored without reading it. This is not a credential and sending it back sets nothing: to leave the stored secret alone omit clientSecret from your update, and to change it send the new secret in clientSecret.

    • commandstring | null

      The command that launches the server. Only set when transport is STDIO.

    • argslist of strings

      The arguments passed to command. Empty unless transport is STDIO.

    • availableToolslist of objects | null

      Show 4 propertiesHide 4 properties
      • namestring

        The name of the tool, as the server reports it.

      • descriptionstring | null

        What the tool does, or null when the server describes it.

      • inputSchemaobject

        The JSON Schema describing the tool's arguments.

      • annotationsobject | null

  • deprecatedboolean

    Indicates if this endpoint is deprecated.

Built byConfident AI