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

# Update an MCP server

> Updates an MCP server display name, URL, static headers, or synced tool access modes. Requires admin access to the organization.



## OpenAPI

````yaml https://charts.basedash.com/api/public/openapi patch /api/public/organizations/{orgId}/mcp-servers/{id}
openapi: 3.1.0
info:
  title: Basedash Public API
  version: 0.0.0
  description: >-
    API for programmatic access to Basedash features. Use API keys for
    authentication.
  contact:
    name: Basedash Support
    url: https://basedash.com
    email: support@basedash.com
servers:
  - url: https://charts.basedash.com
    description: Production
security: []
tags:
  - name: Organizations
    description: Manage organizations
  - name: Groups
    description: Manage organization groups and memberships
  - name: Data Sources
    description: Manage database connections and data sources
  - name: MCP servers
    description: Manage MCP server data sources
  - name: Insights
    description: Manage generated insights
  - name: Automations
    description: Manage automations and automation runs
  - name: Skills
    description: Manage organization skills
  - name: Definitions
    description: Manage reusable SQL definitions
  - name: Dashboards
    description: Manage dashboards and their tabs
  - name: Charts
    description: Manage charts and their SQL queries
  - name: Chats
    description: >-
      Chat with the Basedash AI agent about your data. Start a chat by sending a
      message, then continue the conversation with follow-up messages. The
      assistant responds asynchronously: pass the `wait` query parameter to
      receive the finished response in the same request, or poll the assistant
      message (or stream its events) after an HTTP 202. Chats created through
      the API are not shown in the Basedash app.
paths:
  /api/public/organizations/{orgId}/mcp-servers/{id}:
    patch:
      tags:
        - MCP servers
      summary: Update an MCP server
      description: >-
        Updates an MCP server display name, URL, static headers, or synced tool
        access modes. Requires admin access to the organization.
      parameters:
        - schema:
            type: string
            description: Organization ID
          required: true
          description: Organization ID
          name: orgId
          in: path
        - schema:
            type: string
            description: MCP server ID
          required: true
          description: MCP server ID
          name: id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                displayName:
                  type: string
                  minLength: 1
                  maxLength: 120
                  description: Display name for the MCP server
                serverUrl:
                  type: string
                  minLength: 1
                  maxLength: 2000
                  description: MCP server URL
                headers:
                  type: array
                  items:
                    type: object
                    properties:
                      key:
                        type: string
                      value:
                        type: string
                    required:
                      - key
                      - value
                  description: Static headers to use when connecting to the MCP server
                tools:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        description: Tool ID
                      accessMode:
                        type: string
                        enum:
                          - ALWAYS_ALLOW
                          - NEEDS_APPROVAL
                          - BLOCKED
                        description: Tool access mode
                    required:
                      - id
                      - accessMode
                  minItems: 1
                  description: Tool access modes to update for this MCP server
      responses:
        '200':
          description: MCP server updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        description: MCP server ID
                      displayName:
                        type: string
                        description: Display name for the MCP server
                      serverUrl:
                        type: string
                        description: MCP server URL
                      serverLabel:
                        type: string
                        description: >-
                          Stable server label used when exposing tools to AI
                          models
                      transportType:
                        type:
                          - string
                          - 'null'
                        enum:
                          - STREAMABLE_HTTP
                          - SSE
                          - null
                        description: Transport protocol used by the MCP server
                      setupState:
                        type: string
                        enum:
                          - INCOMPLETE
                          - CONNECTED
                          - BROKEN
                        description: MCP server setup state
                      lastSyncStatus:
                        $ref: '#/components/schemas/SyncStatus'
                      lastSyncAttemptAt:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        description: Last tool sync attempt timestamp
                      lastSuccessfulSyncAt:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        description: Last successful tool sync timestamp
                      hasCompletedFirstSync:
                        type: boolean
                        description: Whether the first tool sync has completed
                      syncErrorMessage:
                        type:
                          - string
                          - 'null'
                        description: Error message from the last failed sync
                      tools:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              description: Tool ID
                            name:
                              type: string
                              description: Tool name
                            description:
                              type:
                                - string
                                - 'null'
                              description: Tool description
                            readOnlyHint:
                              type:
                                - boolean
                                - 'null'
                              description: >-
                                Whether the tool advertises that it only reads
                                data
                            accessMode:
                              type: string
                              enum:
                                - ALWAYS_ALLOW
                                - NEEDS_APPROVAL
                                - BLOCKED
                              description: Tool access mode
                            foundInServer:
                              type: boolean
                              description: >-
                                Whether this tool was found during the latest
                                sync
                          required:
                            - id
                            - name
                            - description
                            - readOnlyHint
                            - accessMode
                            - foundInServer
                        description: Available MCP tools
                      createdAt:
                        type: string
                        format: date-time
                        description: Creation timestamp
                      updatedAt:
                        type: string
                        format: date-time
                        description: Last update timestamp
                    required:
                      - id
                      - displayName
                      - serverUrl
                      - serverLabel
                      - transportType
                      - setupState
                      - lastSyncStatus
                      - lastSyncAttemptAt
                      - lastSuccessfulSyncAt
                      - hasCompletedFirstSync
                      - syncErrorMessage
                      - tools
                      - createdAt
                      - updatedAt
                required:
                  - data
        '400':
          description: Bad request - Invalid JSON body or validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found - MCP server not found or no admin access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded - Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    SyncStatus:
      anyOf:
        - type: string
          enum:
            - PENDING
        - type: string
          enum:
            - SUCCESS
        - type: string
          enum:
            - FAILED
        - type: string
          enum:
            - NEVER_SYNCED
      description: Status of the last schema sync
    ErrorResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/ApiError'
      required:
        - error
    RateLimitErrorResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/RateLimitError'
      required:
        - error
    ApiError:
      type: object
      properties:
        title:
          type: string
          description: Error type identifier
        detail:
          type: string
          description: Human-readable error description
      required:
        - title
        - detail
    RateLimitError:
      allOf:
        - $ref: '#/components/schemas/ApiError'
        - type: object
          properties:
            title:
              type: string
              enum:
                - RateLimitExceeded
            retryAfterMs:
              type: number
              description: Milliseconds until the rate limit window resets
          required:
            - retryAfterMs
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key authentication using Bearer token format: `Bearer
        <basedash_api_key>`

````