MCPServerConfig

org.llm4s.mcp.MCPServerConfig
See theMCPServerConfig companion object
case class MCPServerConfig(name: String, transport: MCPTransport, timeout: FiniteDuration, trustAnnotations: Boolean)

Configuration for MCP (Model Context Protocol) servers. Defines how to connect to and communicate with an MCP server.

Value parameters

name

Unique identifier for this server configuration

timeout

Maximum time one request to this server may take, reply included. Over Streamable HTTP it bounds the whole exchange: the wait for the response headers and the reading of the body, including a reply sent as an SSE stream, which a server opens at once and may keep open while a tool runs. A call still unanswered at the deadline fails as timed out and its connection is closed.

transport

Transport mechanism (stdio, SSE, or Streamable HTTP) for communication

trustAnnotations

Whether the tool annotations this server sends (readOnlyHint, destructiveHint, idempotentHint, openWorldHint) may be used to relax how its tools are treated. false by default: the MCP specification says a client must consider annotations untrusted unless they come from a trusted server, and a server that marks delete_everything as read-only must not be able to run it without approval (ApprovalMiddleware.unlessReadOnly skips approval for read-only tools). While it is false, MCPClient.getToolHints and MCPToolRegistry.toolHints report no hints for this server's tools, so the specification's conservative defaults (ToolHints.default: not read-only, destructive, not idempotent, open-world) apply. Set it to true only for a server you operate or have reviewed.

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product