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

# Mcp Servers List

> List all MCP servers for the current tenant.

Args:
    current_user: The current authenticated user
    tenant: The tenant database
    server_type: Optional filter by server type
    enabled_only: Only return enabled servers

Returns:
    List[MCPServer]: List of MCP servers

Raises:
    HTTPException(400): If input validation fails
    HTTPException(500): If database operation fails or other error occurs



## OpenAPI

````yaml get /api/mcp-server/list
openapi: 3.1.0
info:
  title: Apigene
  description: Apigene API
  version: 1.0.0
  contact:
    name: Apigene Support
    url: https://app.apigene.ai
    email: support@apigene.ai
servers:
  - url: https://app.apigene.ai
security:
  - BearerAuth: []
paths:
  /api/mcp-server/list:
    get:
      tags:
        - MCP Server
      summary: Mcp Servers List
      description: |-
        List all MCP servers for the current tenant.

        Args:
            current_user: The current authenticated user
            tenant: The tenant database
            server_type: Optional filter by server type
            enabled_only: Only return enabled servers

        Returns:
            List[MCPServer]: List of MCP servers

        Raises:
            HTTPException(400): If input validation fails
            HTTPException(500): If database operation fails or other error occurs
      operationId: mcp_servers_list
      parameters:
        - name: server_type
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/MCPServerType'
              - type: 'null'
            description: Filter by server type
            title: Server Type
          description: Filter by server type
        - name: enabled_only
          in: query
          required: false
          schema:
            type: boolean
            description: Only return enabled servers
            default: false
            title: Enabled Only
          description: Only return enabled servers
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MCPServer'
                title: Response Mcp Servers List
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - BearerAuth: []
components:
  schemas:
    MCPServerType:
      type: string
      enum:
        - apigene
        - public
      title: MCPServerType
      description: MCP Server visibility types
    MCPServer:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier for the MCP server
        name:
          type: string
          title: Name
          description: Name of the MCP server
        config:
          $ref: '#/components/schemas/MCPServerConfig'
          description: MCP server configuration
        enabled:
          type: boolean
          title: Enabled
          description: Whether the MCP server is enabled
        server_type:
          $ref: '#/components/schemas/MCPServerType'
          description: Type of MCP server (public/private)
        created_at:
          type: string
          format: date-time
          title: Created At
          description: When the MCP server was created
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: When the MCP server was last updated
        created_by:
          type: string
          format: email
          title: Created By
          description: Email of the user who created the MCP server
        icon_url:
          type: string
          title: Icon Url
          description: Icon URL of the MCP server for display
          default: apigene.ai
        api_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Api Name
          description: API name for APIGENE type servers
        global_spec:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Global Spec
          description: Whether this is a global spec for APIGENE type servers
      type: object
      required:
        - id
        - name
        - config
        - enabled
        - server_type
        - created_at
        - updated_at
        - created_by
      title: MCPServer
      description: Response model for MCP server
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    MCPServerConfig:
      properties:
        url:
          type: string
          title: Url
          description: MCP server URL
        headers:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Headers
          description: Additional headers for MCP server requests
      type: object
      required:
        - url
      title: MCPServerConfig
      description: MCP Server configuration
    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:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT Authorization header using the Bearer scheme. Example:
        'Authorization: Bearer {token}'

````