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

# 查询 MCP 服务器列表

> 分页查询调用者在账户与团队范围内可见的 MCP 服务器。

## 限制说明

| 项目   | 说明                                     |
| ---- | -------------------------------------- |
| 速率限制 | 每个 `app_key` **1,000 次/分钟**；**50 次/秒** |
| 权限要求 | 无 —— 持有有效的 `app_key` 即可调用              |

## 使用说明

* 列表不含实时工具列表；如需探测工具请单独查询某个服务器。


## OpenAPI

````yaml /api-reference/safari.openapi.zh.json post /safari/mcp/server/list
openapi: 3.1.0
info:
  title: Flashduty 开放 API
  description: >-
    Flashduty AI SRE 平台的公开 HTTP API —— 技能、MCP 服务器（连接器）、A2A 智能体与会话。所有接口均使用
    Flashduty 控制台签发的 `app_key` 查询参数进行认证。
  version: 1.0.0
servers:
  - url: https://api.flashcat.cloud
    description: Flashduty Open API
security:
  - AppKeyAuth: []
tags:
  - name: AI SRE/技能
  - name: AI SRE/MCP 服务器
  - name: AI SRE/A2A 智能体
  - name: AI SRE/会话
  - name: AI SRE/自动化
paths:
  /safari/mcp/server/list:
    post:
      tags:
        - AI SRE/MCP 服务器
      summary: 查询 MCP 服务器列表
      description: 分页查询调用者在账户与团队范围内可见的 MCP 服务器。
      operationId: mcp-read-server-list
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MCPServerListRequest'
            example:
              p: 1
              limit: 20
              include_account: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ResponseEnvelope'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/MCPServerListResponse'
              example:
                request_id: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
                data:
                  total: 1
                  servers:
                    - server_id: mcp_4kP9wQ2nLceRtY7uVb3xA1
                      account_id: 10023
                      team_id: 0
                      can_edit: true
                      server_name: prometheus
                      description: Query Prometheus metrics and alerts.
                      transport: streamable-http
                      url: https://mcp.example.com/prometheus
                      status: enabled
                      connect_timeout: 10
                      call_timeout: 60
                      tool_count: 2
                      tools:
                        - name: query
                          description: Run a PromQL instant query.
                        - name: query_range
                          description: Run a PromQL range query.
                      auth_mode: shared
                      created_by: 80011
                      created_at: 1716960000000
                      updated_at: 1717046400000
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/ServerError'
      security:
        - AppKeyAuth: []
components:
  schemas:
    MCPServerListRequest:
      type: object
      description: MCP 服务器列表的分页与团队过滤条件。
      properties:
        p:
          type: integer
          description: 页码，从 1 开始。
          default: 1
        limit:
          type: integer
          description: 每页数量。
          default: 20
        team_ids:
          type: array
          items:
            type: integer
            format: int64
          description: 按团队 ID 过滤；为空则使用调用者可见范围。
        include_account:
          type:
            - boolean
            - 'null'
          description: 是否包含账户级（team_id=0）记录，默认 true。
    ResponseEnvelope:
      type: object
      description: >-
        Standard response envelope used by every Flashduty public API. On
        success `data` contains the endpoint-specific payload and `error` is
        absent. On failure `error` is present and `data` is absent. `request_id`
        is always present and is also mirrored in the `Flashcat-Request-Id`
        response header.
      properties:
        request_id:
          type: string
          description: >-
            Unique ID for this request. Mirrored in the Flashcat-Request-Id
            header. Include it when reporting issues.
          example: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
        error:
          $ref: '#/components/schemas/DutyError'
        data:
          description: Endpoint-specific payload. See each operation's 200 response schema.
      required:
        - request_id
    MCPServerListResponse:
      type: object
      description: 分页的 MCP 服务器列表。
      properties:
        total:
          type: integer
          description: 匹配的服务器总数。
          format: int64
        servers:
          type: array
          items:
            $ref: '#/components/schemas/MCPServerItem'
          description: 当前页的 MCP 服务器。
      required:
        - total
        - servers
    DutyError:
      type: object
      description: >-
        Error payload inside the response envelope. Present only on non-2xx
        responses.
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode'
        message:
          type: string
          description: >-
            Human-readable error message, localized by the caller's
            Accept-Language. May contain field names, IDs, or other context from
            the failing request.
      required:
        - code
        - message
    MCPServerItem:
      type: object
      description: 账户下注册的 MCP 服务器（连接器）。
      properties:
        server_id:
          type: string
          description: MCP 服务器唯一 ID（前缀 `mcp_`）。
        account_id:
          type: integer
          description: 所属账户 ID。
          format: int64
        team_id:
          type: integer
          description: 团队范围：0 表示账户级；>0 表示所属团队。
          format: int64
        can_edit:
          type: boolean
          description: 调用者是否可编辑该服务器。
        server_name:
          type: string
          description: MCP 服务器名称，在账户内唯一。
        description:
          type: string
          description: 服务器描述。
        ai_description:
          type: string
          description: LLM 生成的描述，存在时优先于 `description`。
        transport:
          type: string
          description: 传输协议。
          enum:
            - stdio
            - sse
            - streamable-http
        command:
          type: string
          description: 可执行命令（仅 stdio 传输）。
        args:
          type: array
          items:
            type: string
          description: 命令参数（stdio 传输）。
        env:
          type: object
          additionalProperties:
            type: string
          description: 环境变量（stdio 传输）；密钥值已脱敏。
        url:
          type: string
          description: 服务器 URL（sse / streamable-http 传输）。
        headers:
          type: object
          additionalProperties:
            type: string
          description: HTTP 头（sse / streamable-http）；密钥值已脱敏。
        proxy_url:
          type: string
          description: 访问服务器使用的出站代理 URL。
        status:
          type: string
          description: 服务器状态。
          enum:
            - enabled
            - disabled
        connect_timeout:
          type: integer
          description: 连接超时，单位秒（0 表示默认 10 秒）。
        call_timeout:
          type: integer
          description: 工具调用超时，单位秒（0 表示默认 60 秒）。
        tools:
          type: array
          items:
            $ref: '#/components/schemas/MCPToolInfo'
          description: 实时工具列表；由 get/test 接口填充。
        tool_count:
          type: integer
          description: 实时工具列表的数量。
        list_error:
          type: string
          description: 实时获取工具列表失败时的错误信息。
        auth_mode:
          type: string
          description: 认证模式。
          enum:
            - shared
            - per_user_secret
            - per_user_oauth
        secret_schema:
          type: string
          description: JSON 编码的密钥 schema（per_user_secret 模式）。
        oauth_metadata:
          type: string
          description: JSON 编码的 OAuth 元数据（per_user_oauth 模式）。
        source_template_name:
          type: string
          description: 该连接器安装来源的市场模板名称；自建为空。
        created_by:
          type: integer
          description: 创建该服务器的成员 ID。
          format: int64
        created_at:
          type: integer
          format: int64
          description: 创建时间，Unix 毫秒时间戳。
        updated_at:
          type: integer
          format: int64
          description: 最近更新时间，Unix 毫秒时间戳。
      required:
        - server_id
        - account_id
        - team_id
        - can_edit
        - server_name
        - description
        - transport
        - status
        - connect_timeout
        - call_timeout
        - created_by
        - created_at
        - updated_at
    ErrorResponse:
      type: object
      description: Response envelope for errors. `error` is required; `data` is absent.
      properties:
        request_id:
          type: string
          example: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
        error:
          $ref: '#/components/schemas/DutyError'
      required:
        - request_id
        - error
    ErrorCode:
      type: string
      description: >-
        Flashduty error code enum. Every failed API response sets `error.code`
        to one of these values. The value is a stable wire string — not a
        localized message and not a numeric status. HTTP status is
        informational.
      enum:
        - OK
        - InvalidParameter
        - BadRequest
        - InvalidContentType
        - ResourceNotFound
        - NoLicense
        - ReferenceExist
        - Unauthorized
        - BalanceNotEnough
        - AccessDenied
        - RouteNotFound
        - MethodNotAllowed
        - UndonedOrderExist
        - RequestLocked
        - EntityTooLarge
        - RequestTooFrequently
        - RequestVerifyRequired
        - DangerousOperation
        - InternalError
        - ServiceUnavailable
    MCPToolInfo:
      type: object
      description: MCP 服务器暴露的单个工具的元数据。
      properties:
        name:
          type: string
          description: 工具名称。
        description:
          type: string
          description: 工具描述。
        input_schema:
          type: object
          additionalProperties: true
          description: 描述工具输入参数的 JSON Schema。
      required:
        - name
        - description
  responses:
    BadRequest:
      description: Invalid request — usually a missing or malformed parameter.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missingParameter:
              summary: Missing required parameter
              value:
                request_id: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
                error:
                  code: InvalidParameter
                  message: The specified parameter skill_id is not valid.
    Unauthorized:
      description: Missing or invalid app_key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missingAppKey:
              value:
                request_id: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
                error:
                  code: Unauthorized
                  message: You are unauthorized.
    TooManyRequests:
      description: Rate limit hit. Either the global API limit or a per-account limit.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            rateLimited:
              value:
                request_id: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
                error:
                  code: RequestTooFrequently
                  message: Request too frequently.
    ServerError:
      description: Unexpected server-side error. Include the request_id when reporting.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            internal:
              value:
                request_id: 01HK8XQE3Z7JM2NTFQ5YJ8P9R4
                error:
                  code: InternalError
                  message: >-
                    We encountered an internal error, and it has been reported.
                    Please try again later.
  securitySchemes:
    AppKeyAuth:
      type: apiKey
      in: query
      name: app_key
      description: >-
        App key issued from the Flashduty console. Required on every public API
        call. Keep it secret — it grants the same access as the owning account.

````