mcp-use TypeScript API
    Preparing search index...

    Interface ProxyConnection

    Structural connection contract accepted by the low-level proxy overload.

    interface ProxyConnection {
        info: { server: { name: string } };
        callTool(
            name: string,
            args?: Record<string, unknown>,
            options?: ProxyRequestOptions,
        ): Promise<InputRequiredResult | { [key: string]: unknown }>;
        getPrompt(
            name: string,
            args: Record<string, unknown>,
        ): Promise<{ [key: string]: unknown }>;
        listAllResources?(): Promise<{ resources: ProxyResource[] }>;
        listPrompts(): Promise<{ prompts: ProxyPrompt[] }>;
        listResources?(): Promise<{ resources: ProxyResource[] }>;
        listTools(): Promise<ProxyTool[]>;
        readResource(
            uri: string,
            options?: ProxyRequestOptions,
        ): Promise<{ [key: string]: unknown }>;
        supports?(capability: string): boolean;
    }
    Index
    info: { server: { name: string } }

    Negotiated metadata used to derive the automatic capability namespace.

    • Forward a tool call.

      Parameters

      Returns Promise<InputRequiredResult | { [key: string]: unknown }>

    • Render an upstream prompt.

      Parameters

      • name: string
      • args: Record<string, unknown>

      Returns Promise<{ [key: string]: unknown }>

    • List upstream resources, including pagination when supported.

      Returns Promise<{ resources: ProxyResource[] }>

    • List upstream prompts.

      Returns Promise<{ prompts: ProxyPrompt[] }>

    • List one page of upstream resources.

      Returns Promise<{ resources: ProxyResource[] }>

    • List upstream tools.

      Returns Promise<ProxyTool[]>

    • Read an upstream resource.

      Parameters

      Returns Promise<{ [key: string]: unknown }>

    • Whether the upstream advertised a named MCP capability.

      Parameters

      • capability: string

      Returns boolean