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

# Check Mcp Server Health

> Perform a health check on an MCP server.

Args:
    agent_id: The ID of the agent
    server_id: The ID of the MCP server
    user_id: The user ID of the current user
    organization_id: The organization ID of the current user

Returns:
    Health check results

Raises:
    HTTPException: If server not found or access denied



## OpenAPI

````yaml post /api/v1/mcp/agents/{agent_id}/servers/{server_id}/health-check
openapi: 3.1.0
info:
  title: ThenaAgentStudio
  description: |2-

        ThenaCrew AI CRM Renewal System

        An intelligent platform to automate customer renewal insights and communications through multi-agent workflows.

        Key Features:
        * AI-powered renewal analysis
        * Personalized communication generation
        * Automated opportunity tracking
        * Multi-agent workflow orchestration
        
  version: 1.0.0
servers:
  - url: https://agent-studio.thena.ai
    description: Production server
  - url: http://localhost:8008
    description: Local development server
security:
  - ApiKeyAuth: []
tags:
  - name: Agents
    description: Agent management endpoints
  - name: Chat
    description: Chat and messaging endpoints
paths:
  /api/v1/mcp/agents/{agent_id}/servers/{server_id}/health-check:
    post:
      tags:
        - mcp-servers
      summary: Check Mcp Server Health
      description: |-
        Perform a health check on an MCP server.

        Args:
            agent_id: The ID of the agent
            server_id: The ID of the MCP server
            user_id: The user ID of the current user
            organization_id: The organization ID of the current user

        Returns:
            Health check results

        Raises:
            HTTPException: If server not found or access denied
      operationId: >-
        check_mcp_server_health_api_v1_mcp_agents__agent_id__servers__server_id__health_check_post
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            type: string
            title: Agent Id
        - name: server_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Server Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MCPServerHealthCheck'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    MCPServerHealthCheck:
      properties:
        mcp_server_id:
          type: string
          format: uuid
          title: Mcp Server Id
          description: ID of the MCP server
        status:
          type: string
          title: Status
          description: 'Health status: ''healthy'', ''unhealthy'', ''unreachable'''
        response_time_ms:
          anyOf:
            - type: integer
            - type: 'null'
          title: Response Time Ms
          description: Response time in milliseconds
        available_tools:
          anyOf:
            - type: integer
            - type: 'null'
          title: Available Tools
          description: Number of tools available from the server
        last_error:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Error
          description: Last error message if health check failed
        checked_at:
          type: string
          format: date-time
          title: Checked At
          description: When the health check was performed
      type: object
      required:
        - mcp_server_id
        - status
        - checked_at
      title: MCPServerHealthCheck
      description: Model for MCP server health check results.
      example:
        available_tools: 15
        checked_at: '2023-01-01T00:00:00Z'
        mcp_server_id: 123e4567-e89b-12d3-a456-426614174000
        response_time_ms: 150
        status: healthy
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````