> ## 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.

# Delete Mcp Server

> Remove an MCP server configuration from an agent.

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:
    Success confirmation

Raises:
    HTTPException: If server not found or access denied



## OpenAPI

````yaml delete /api/v1/mcp/agents/{agent_id}/servers/{server_id}
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}:
    delete:
      tags:
        - mcp-servers
      summary: Delete Mcp Server
      description: |-
        Remove an MCP server configuration from an agent.

        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:
            Success confirmation

        Raises:
            HTTPException: If server not found or access denied
      operationId: >-
        delete_mcp_server_api_v1_mcp_agents__agent_id__servers__server_id__delete
      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/MCPServerDeleteResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    MCPServerDeleteResponse:
      properties:
        status:
          type: string
          title: Status
          description: The status of the operation
          default: success
        message:
          type: string
          title: Message
          description: A confirmation message
          default: MCP server deleted
      type: object
      title: MCPServerDeleteResponse
      description: Response model for a successful server deletion.
    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

````