{
  "openapi": "3.0.1",
  "info": {
    "title": "Live Remote MCP Server Profiler",
    "description": "Profile live remote MCP servers over Streamable HTTP/SSE for BPE token budget & monthly API cost, schema lint anti-patterns, tool-poisoning & hidden Unicode security risks, and RFC 9728 OAuth/A2A compliance.",
    "version": "0.1",
    "x-build-id": "9Iyxbij3lxEFxQeo0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/runglab~mcp-server-profiler/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-runglab-mcp-server-profiler",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/runglab~mcp-server-profiler/runs": {
      "post": {
        "operationId": "runs-sync-runglab-mcp-server-profiler",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/runglab~mcp-server-profiler/run-sync": {
      "post": {
        "operationId": "run-sync-runglab-mcp-server-profiler",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "serverUrls": {
            "title": "Remote MCP Server URLs",
            "type": "array",
            "description": "List of live remote MCP server URLs (Streamable HTTP or SSE endpoints) to profile. Leave as default for an instant zero-config benchmark against live public MCP servers.",
            "default": [
              "https://mcp.deepwiki.com/mcp",
              "https://learn.microsoft.com/api/mcp",
              "https://docs.mcp.cloudflare.com/mcp"
            ],
            "items": {
              "type": "string"
            }
          },
          "registryQuery": {
            "title": "MCP Registry Search Query (Optional)",
            "type": "string",
            "description": "Optional keyword query against https://registry.modelcontextprotocol.io/v0/servers to automatically discover and batch-audit live remote MCP endpoints (e.g., 'cloudflare', 'github', 'docs', 'search'). When set alongside empty serverUrls, audits discovered registry servers.",
            "default": ""
          },
          "maxServers": {
            "title": "Max Servers to Audit",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum total number of unique remote MCP servers to profile in this run (caps combined serverUrls and registryQuery results).",
            "default": 10
          },
          "authHeaders": {
            "title": "Custom Authentication Headers (Optional)",
            "type": "object",
            "description": "Optional HTTP headers sent to target MCP endpoints (e.g., {\"Authorization\": \"Bearer <token>\"} or {\"X-API-Key\": \"...\"}). Never stored in output results.",
            "default": {}
          },
          "modelPricing": {
            "title": "LLM Token Pricing Model",
            "enum": [
              "all",
              "claude-sonnet",
              "gpt-4o",
              "gemini-2.5-pro"
            ],
            "type": "string",
            "description": "Which LLM pricing profile(s) to compute monthly 'MCP Token Tax' estimates for.",
            "default": "all"
          },
          "callsPerDay": {
            "title": "Estimated Agent Turns / Day",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Estimated number of LLM turns per day where this MCP server's tool schemas are injected into the prompt context (used to model monthly USD token tax).",
            "default": 50
          },
          "compactMode": {
            "title": "Compact Output Mode (MCP / Agent Friendly)",
            "type": "boolean",
            "description": "When enabled, returns a streamlined JSON report omitting verbose per-tool breakdowns and low-severity lint details — ideal for AI agents calling this Actor via MCP.",
            "default": false
          },
          "timeoutSeconds": {
            "title": "Per-Request HTTP Timeout (Seconds)",
            "minimum": 3,
            "maximum": 60,
            "type": "integer",
            "description": "Timeout in seconds for each HTTP request made to remote MCP and discovery endpoints.",
            "default": 15
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}