{
  "openapi": "3.1.0",
  "info": {
    "title": "Rapid Test MCP HTTP transport",
    "version": "0.3.0",
    "description": "Stateless MCP Streamable HTTP with JSON responses. This describes the HTTP transport, not individual tools as REST endpoints. Initialize using an MCP client, then call tools/list for current tool names, input schemas and required scopes."
  },
  "servers": [{"url": "https://mcp.rapidtest.uz"}],
  "externalDocs": {"url": "https://rapidtest.uz/developers/#mcp"},
  "paths": {
    "/.well-known/oauth-protected-resource/mcp": {
      "get": {
        "operationId": "getMcpResourceMetadata",
        "summary": "Discover the authorization server and supported scopes",
        "responses": {"200": {"description": "OAuth protected resource metadata", "content": {"application/json": {"schema": {"type": "object", "required": ["resource", "authorization_servers", "scopes_supported"], "properties": {"resource": {"type": "string", "format": "uri"}, "authorization_servers": {"type": "array", "items": {"type": "string", "format": "uri"}}, "scopes_supported": {"type": "array", "items": {"type": "string"}}}}}}}}
      }
    },
    "/mcp": {
      "post": {
        "operationId": "sendMcpMessage",
        "summary": "Send an MCP JSON-RPC request or notification",
        "description": "Use an MCP SDK to negotiate the protocol version and perform initialization. Send Accept: application/json, text/event-stream. Business errors may be returned in an MCP tool result with isError=true. Author operations require an active plan, verified phone and the tool-specific OAuth scopes. Maximum request body is 7 MiB.",
        "security": [{"McpBearer": []}],
        "parameters": [{"in": "header", "name": "MCP-Protocol-Version", "schema": {"type": "string"}, "description": "Negotiated protocol version on requests after initialization"}],
        "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "required": ["jsonrpc", "method"], "properties": {"jsonrpc": {"const": "2.0"}, "id": {"type": ["string", "integer"]}, "method": {"type": "string"}, "params": {"type": "object"}}}}}},
        "responses": {
          "200": {"description": "JSON-RPC result or error", "content": {"application/json": {"schema": {"type": "object", "required": ["jsonrpc", "id"], "properties": {"jsonrpc": {"const": "2.0"}, "id": {"type": ["string", "integer", "null"]}, "result": {}, "error": {"type": "object"}}}}}},
          "202": {"description": "Notification accepted; no response body"},
          "400": {"description": "Invalid request or protocol version"},
          "401": {"description": "Missing, expired or invalid access token", "headers": {"WWW-Authenticate": {"schema": {"type": "string"}, "description": "Bearer challenge including resource_metadata URL"}}},
          "403": {"description": "Origin rejected"},
          "406": {"description": "Required Accept media types missing"},
          "413": {"description": "Request exceeds 7 MiB"}
        }
      }
    }
  },
  "components": {"securitySchemes": {"McpBearer": {"type": "http", "scheme": "bearer", "description": "OAuth access token issued by https://rapidtest.uz for resource https://mcp.rapidtest.uz/mcp. Discover the authorization server via resource metadata. Use S256 PKCE and explicit user consent. A Telegram bot token is not accepted."}}}
}
