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

# Validate MCP Server

> Validate MCP server connection and retrieve the list of tools and prompts

Tests whether an MCP server connection is available and returns the list of tools and prompts provided by the server. Used for connection validation before adding MCP tools on the frontend.

<ParamField header="Authorization" type="string" required>
  Bearer JWT Token
</ParamField>

<ParamField body="name" type="string" required>
  MCP server name (unique identifier)
</ParamField>

<ParamField body="base_url" type="string" required>
  MCP server URL
</ParamField>

<ParamField body="transport_type" type="string" default="streamable_http">
  Transport type (`streamable_http` | `sse` | `stdio`)
</ParamField>

<ParamField body="api_key" type="string">
  API key (optional, automatically added as `Authorization: Bearer` header)
</ParamField>

<ParamField body="headers" type="object">
  Custom HTTP headers (optional)
</ParamField>

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

<ResponseField name="status" type="string">
  Connection status: `connected`
</ResponseField>

<ResponseField name="tools" type="array">
  List of tools

  <Expandable title="tool">
    <ResponseField name="name" type="string">
      Tool name
    </ResponseField>

    <ResponseField name="description" type="string">
      Tool description
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="tool_count" type="number">
  Number of tools
</ResponseField>

<ResponseField name="prompts" type="array">
  List of prompts

  <Expandable title="prompt">
    <ResponseField name="name" type="string">
      Prompt name
    </ResponseField>

    <ResponseField name="description" type="string">
      Prompt description
    </ResponseField>

    <ResponseField name="arguments" type="array">
      Prompt argument list
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="prompt_count" type="number">
  Number of prompts
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url https://zeus-api.agentspro.cn/api/tools/mcp/validate \
    --header 'Authorization: Bearer <token>' \
    --header 'Content-Type: application/json' \
    --data '{
      "name": "tavily",
      "base_url": "https://mcp.tavily.com/mcp",
      "transport_type": "streamable_http",
      "api_key": "tvly-..."
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "status": "connected",
    "tools": [
      { "name": "tavily_search", "description": "Search the web using Tavily" },
      { "name": "tavily_extract", "description": "Extract content from a URL" }
    ],
    "tool_count": 2,
    "prompts": [],
    "prompt_count": 0
  }
  ```

  ```json 408 theme={null}
  {
    "detail": "Connection timeout: Unable to connect to https://mcp.example.com"
  }
  ```
</ResponseExample>
