Skip to contents

Connect to an MCP server via Server-Sent Events (SSE).

Details

Manages connection to a remote MCP server via SSE transport.

Super class

aisdk::McpClient -> McpSseClient

Public fields

endpoint

The POST endpoint for sending messages (received from SSE init)

auth_headers

Authentication headers

Methods

Inherited methods


Method new()

Create a new MCP SSE Client

Usage

McpSseClient$new(url, headers = list())

Arguments

url

The SSE endpoint URL

headers

named list of headers (e.g. for auth)

Returns

A new McpSseClient object


Method clone()

The objects of this class are cloneable with this method.

Usage

McpSseClient$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.