readResource(
serverName: string,
uri: string,
options: CustomHTTPTransportOptions
): Promise<MCPResourceContent[]>| Name | Type | Description |
|---|---|---|
serverName* | string | The name of the server to read the resource from |
uri* | string | The URI of the resource to read |
options | CustomHTTPTransportOptions | Optional connection options for reading the resource, e.g. custom auth provider or headers. |
const content = await client.readResource("server1", "file://path/to/resource");Read a resource from a specific server.