MCPServerConfig

org.llm4s.mcp.MCPServerConfig
See theMCPServerConfig companion class

Attributes

Companion
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type

Members list

Type members

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def sse(name: String, url: String, timeout: Duration): MCPServerConfig

Creates configuration for SSE-based MCP server (legacy 2024-11-05 spec). Connects to server via HTTP Server-Sent Events. The client will still try the latest transport first, then fallback to this if needed.

Creates configuration for SSE-based MCP server (legacy 2024-11-05 spec). Connects to server via HTTP Server-Sent Events. The client will still try the latest transport first, then fallback to this if needed.

Value parameters

name

Unique identifier for this server

timeout

Maximum response timeout

url

HTTP URL of the SSE endpoint

Attributes

Returns

MCPServerConfig configured for SSE transport with automatic upgrade attempt

def stdio(name: String, command: Seq[String], timeout: Duration): MCPServerConfig

Creates configuration for stdio-based MCP server. Launches server as subprocess and communicates via stdin/stdout.

Creates configuration for stdio-based MCP server. Launches server as subprocess and communicates via stdin/stdout.

Value parameters

command

Command line to launch the server process

name

Unique identifier for this server This name will be used in transport logging for easy identification

timeout

Maximum response timeout

Attributes

Returns

MCPServerConfig configured for stdio transport

def streamableHTTP(name: String, url: String, timeout: Duration): MCPServerConfig

Creates configuration for Streamable HTTP-based MCP server (2025-03-26 spec). Connects to server via HTTP with support for SSE streaming. The client will automatically try this transport first, then fallback to SSE if not supported.

Creates configuration for Streamable HTTP-based MCP server (2025-03-26 spec). Connects to server via HTTP with support for SSE streaming. The client will automatically try this transport first, then fallback to SSE if not supported.

Value parameters

name

Unique identifier for this server

timeout

Maximum response timeout

url

HTTP URL of the MCP endpoint (single endpoint for both POST and GET)

Attributes

Returns

MCPServerConfig configured for Streamable HTTP transport with automatic fallback