mcp-use TypeScript API
    Preparing search index...

    Class ConnectMCPServerTool

    Activates a configured MCP server and exposes its capabilities.

    Hierarchy

    • MCPServerTool<typeof ConnectMCPServerSchema>
      • ConnectMCPServerTool
    Index
    description: string = "Connect to a specific MCP (Model Context Protocol) server to use its tools. Use this tool to connect to a specific server and use its tools."

    Tool description exposed to the model.

    name: string = "connect_to_mcp_server"

    Tool name exposed to the model.

    schema: ZodObject<{ serverName: ZodString }, $strip> = ConnectMCPServerSchema

    Input schema containing the server name.

    • get manager(): IServerManager

      Returns IServerManager

      The server manager operated by this tool.

    • Activates a configured server and loads its capabilities if needed.

      Parameters

      • __namedParameters: { serverName: string }
        • serverName: string

          Name of a configured MCP server.

      Returns Promise<string>

      A human-readable success or error message.