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

# Update MCP server

> Update an MCP server's URL, auth config, or other settings.



## OpenAPI

````yaml api-reference/agents/openapi.json PATCH /v1/agents/{agentId}/branches/{branchId}/mcp-servers/{serverId}
openapi: 3.1.0
info:
  title: PolyAI Agents API
  version: 1.0.11
  description: Manage PolyAI agents, telephony, deployments, and real-time configs.
servers:
  - url: https://api.us.poly.ai
    description: US region
  - url: https://api.eu.poly.ai
    description: EU region
  - url: https://api.uk.poly.ai
    description: UK region
  - url: https://api.studio.poly.ai
    description: Studio region
security:
  - polyApiKey: []
paths:
  /v1/agents/{agentId}/branches/{branchId}/mcp-servers/{serverId}:
    parameters:
      - name: agentId
        in: path
        required: true
        schema:
          type: string
      - name: branchId
        in: path
        required: true
        schema:
          type: string
      - name: serverId
        in: path
        required: true
        schema:
          type: string
    patch:
      tags:
        - MCP Servers
      summary: Update MCP server
      description: Update an MCP server's URL, auth config, or other settings.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateMcpServerBody'
      responses:
        '200':
          description: Updated MCP server
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/McpServerResponse'
        '404':
          description: MCP server not found
components:
  schemas:
    UpdateMcpServerBody:
      type: object
      title: UpdateMcpServerBody
      description: Partial update to an existing MCP server connection.
      properties:
        url:
          type: string
          format: uri
        auth:
          $ref: '#/components/schemas/McpServerAuth'
        timeout:
          type: number
          exclusiveMinimum: 0
          maximum: 30
      additionalProperties: false
    McpServerResponse:
      type: object
      title: McpServerResponse
      description: >-
        An MCP server connection configured on a branch, including its live
        discovery and connection state.
      properties:
        id:
          type: string
        providerId:
          type: string
        url:
          type: string
        auth:
          $ref: '#/components/schemas/McpServerAuth'
        timeout:
          type: number
        enabledFunctions:
          type: array
          items:
            type: string
        lastDiscoveredAt:
          type: string
        lastDiscoveredToolCount:
          type: number
        connected:
          type: boolean
      required:
        - id
        - providerId
        - url
        - connected
      additionalProperties: false
    McpServerAuth:
      type: object
      title: McpServerAuth
      description: >-
        How the MCP server authenticates: a header, a query parameter, or OAuth
        client credentials, each resolved from a secret at connect time.
      properties:
        header:
          type: string
        queryParam:
          type: string
        oauth:
          type: object
          properties:
            clientId:
              type: string
            clientSecretName:
              type: string
            tokenUrl:
              type: string
            audience:
              type: string
            scope:
              type: string
          required:
            - clientId
            - tokenUrl
          additionalProperties: false
        secretName:
          type: string
      additionalProperties: false
  securitySchemes:
    polyApiKey:
      type: apiKey
      in: header
      name: X-API-KEY

````