> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cloudhumans.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Probe an MCP server

> Ask a server for its tool list, with the same call the agent runtime makes, and report what happened. Nothing is registered or changed. Use it before createMcpServer to check an endpoint and its credential, and afterwards with `serverId` to check whether a server you already registered is still answering.



## OpenAPI

````yaml /api-reference/specs/claudia/v1.json post /v1/tenants/{tenant}/mcp-servers/validate
openapi: 3.0.1
info:
  title: Claudia API
  version: 1.0.0
servers:
  - url: https://api.cloudhumans.com/claudia
    description: Production
  - url: https://api.cloudhumans.com/claudia/staging
    description: Staging
security:
  - bearerAuth: []
tags:
  - name: MCP Servers
    description: >-
      The MCP servers your agents can call tools on. Registering one here is
      what makes its tools selectable in an agent; the credentials it needs are
      stored encrypted and never read back.
  - name: Knowledge Base Content
    description: Read, search and edit the content that answers your customers.
  - name: Content Quality
    description: Rewrites proposed for content that is answering your customers badly.
  - name: Playground
    description: >-
      Talk to one of your agents as if you were a customer, without touching a
      real conversation.
  - name: Project Settings
    description: >-
      Read and change how a ClaudIA project behaves — the settings screens of
      the ClaudIA app, as an API.
  - name: Content Improvements
    description: Answers Claudia proposes for questions your content does not cover yet.
  - name: Knowledge Bases
    description: The knowledge bases your account can manage.
  - name: Content Sources
    description: The sites Claudia crawls to keep a knowledge base in sync.
paths:
  /v1/tenants/{tenant}/mcp-servers/validate:
    post:
      tags:
        - MCP Servers
      summary: Probe an MCP server
      description: >-
        Ask a server for its tool list, with the same call the agent runtime
        makes, and report what happened. Nothing is registered or changed. Use
        it before createMcpServer to check an endpoint and its credential, and
        afterwards with `serverId` to check whether a server you already
        registered is still answering.
      operationId: validateMcpServer
      parameters:
        - name: tenant
          in: path
          description: >-
            Tenant whose MCP servers you are managing. Get it from the
            backoffice `GET /auth/v1/me/claudia-projects`, which answers with
            the tenant your credentials cover. A tenant your credentials do not
            cover is indistinguishable from one that does not exist.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/McpServerProbe'
        required: true
      responses:
        '200':
          description: >-
            The probe ran. Read `valid` — a server that is down answers here,
            not as a failed request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/McpServerProbeResult'
        '400':
          description: The request could not be answered as written.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing, expired or invalid credentials.
        '403':
          description: The credentials hold no account allowed to manage this content.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: >-
            No such resource, or none these credentials can reach — the two are
            deliberately indistinguishable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit applied by the API gateway. Back off and retry.
        '503':
          description: >-
            The stored credential could not be resolved, so the probe never ran
            — this says nothing about the server being probed. Retrying is
            reasonable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    McpServerProbe:
      required:
        - authType
        - url
      type: object
      properties:
        url:
          type: string
          description: >-
            The MCP endpoint to call, http or https. Probed exactly as written,
            with the same request the agent runtime makes, so a passing probe
            means the runtime will reach the same endpoint.
          example: https://mcp.acme.com/mcp
        authType:
          type: string
          description: >-
            How to authenticate the probe. `forwarded_user` and `oauth` are
            probed without any credential, because their identity only exists at
            agent call time — such a server may legitimately answer `valid:
            false` and still be worth saving.
          example: bearer
          enum:
            - none
            - bearer
            - apiKey
            - forwarded_user
            - oauth
        credentials:
          type: string
          description: >-
            The secret to probe with, in full. Omit it together with `serverId`
            to re-probe an already registered server using its stored secret.
          example: sk-live-9f3c2b7a
        customHeaders:
          type: object
          additionalProperties:
            type: string
            description: >-
              Extra headers to send on the probe. Always taken from this
              request, so a headers-only change can be probed before it is
              saved.
            example: '{"x-acme-region":"br"}'
          description: >-
            Extra headers to send on the probe. Always taken from this request,
            so a headers-only change can be probed before it is saved.
          example:
            x-acme-region: br
        serverId:
          type: string
          description: >-
            An already registered server to reuse the stored secret from, as
            returned by listMcpServers. The stored secret is reused only while
            `url` and `authType` still match what is stored for it; change
            either and the probe runs with no credential, so you must supply one
            to get a truthful answer.
          example: 6683f1c2a4b19e0012ab34cd
      description: >-
        The MCP server to probe. Nothing is stored — the probe only reports
        whether the server answers.
    McpServerProbeResult:
      required:
        - valid
      type: object
      properties:
        valid:
          type: boolean
          description: Whether the server answered the tool listing successfully.
          example: true
        toolsCount:
          type: integer
          description: >-
            How many tools the server exposed. Absent when the probe did not
            succeed.
          format: int32
          example: 7
        reason:
          type: string
          description: >-
            Why the probe failed. `UNREACHABLE` is network or timeout,
            `AUTH_FAILED` means the credential was rejected, `RPC_ERROR` means
            the server answered with an error, `INVALID_RESPONSE` means it
            answered something that is not MCP. Absent when valid.
          example: UNREACHABLE
          enum:
            - UNREACHABLE
            - RPC_ERROR
            - INVALID_RESPONSE
            - AUTH_FAILED
        error:
          type: string
          description: A short description of the failure. Absent when valid.
          example: Could not reach the MCP server
      description: >-
        What the probe found. A server that is down or misbehaving is reported
        here as `valid: false`, not as a failed request.
    Error:
      required:
        - error
      type: object
      properties:
        error:
          type: string
          description: What went wrong.
          example: 'Forbidden: token holds no claim for the requested account'
      description: Something the caller needs to fix.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````