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 viahost. - host
-
Network interface to bind to (default "127.0.0.1"). Change to "0.0.0.0" (or a specific IP) only when
apiKeyis set;start()refuses to bind a non-loopback host without anapiKey. - 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 Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
Members list
In this article