MCP.Transport.StreamableHTTP.PreStarted (MCP Elixir SDK v1.1.0)

Copy Markdown View Source

A transport adapter that wraps an already-started transport process.

Used by MCP.Transport.StreamableHTTP.Plug to pass an existing transport GenServer to MCP.Server.start_link/1. The MCP.Server calls start_link/1 during init, but we need to reuse an already running transport. This adapter simply re-registers the owner on the existing transport.

Options

  • :owner — the new owner pid (set by MCP.Server during init)
  • :pid — the existing transport process pid

Summary

Functions

Sends a message with options, delegating to the underlying transport.

Functions

send_message(pid, message, opts)

Sends a message with options, delegating to the underlying transport.