MCPServerOptions

org.llm4s.mcp.MCPServerOptions
case class MCPServerOptions(port: Int, path: String, name: String, version: String, apiKey: Option[String], host: String)

Configuration options for the MCPServer.

Value parameters

apiKey

Optional API key for Bearer-token authentication. When set, every request must include Authorization: Bearer <key>. Configuring an API key removes the development-only security warning and allows binding to non-localhost interfaces via host.

host

Network interface to bind to (default "127.0.0.1"). Change to "0.0.0.0" (or a specific IP) only when apiKey is set; start() refuses to bind a non-loopback host without an apiKey.

name

Server name reported during MCP initialization.

path

Base path for MCP endpoints (e.g. "/mcp").

port

Port to bind to. Use 0 for a random available port.

version

Server version reported during MCP initialization.

Attributes

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