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

# Detect Transport Types

> Analyzes an MCP server URL to determine supported transport protocols

## Request Body

<ParamField body="url" type="string" required>
  MCP server URL to analyze (must be a valid URI)
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  Whether the detection was successful
</ResponseField>

<ResponseField name="message" type="string">
  Status message or error details
</ResponseField>

<ResponseField name="supportedTypes" type="array">
  Array of supported transport types: `stdio`, `http`, and/or `sse`
</ResponseField>

<ResponseField name="recommended" type="string">
  Recommended transport type for this server
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.example.com/api/mcp/detect-transport \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "url": "https://mcp-server.example.com"
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.example.com/api/mcp/detect-transport', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      url: 'https://mcp-server.example.com'
    })
  });

  const data = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      'https://api.example.com/api/mcp/detect-transport',
      headers={
          'Authorization': 'Bearer YOUR_API_KEY',
          'Content-Type': 'application/json'
      },
      json={
          'url': 'https://mcp-server.example.com'
      }
  )

  data = response.json()
  ```
</RequestExample>

<ResponseExample>
  ```json Success Response theme={null}
  {
    "success": true,
    "message": "Transport types detected successfully",
    "supportedTypes": ["http", "sse"],
    "recommended": "http"
  }
  ```

  ```json Error Response theme={null}
  {
    "success": false,
    "message": "Unable to detect transport types"
  }
  ```
</ResponseExample>
