org.llm4s.mcp
Members list
Type members
Classlikes
Client information sent during MCP protocol initialization. Identifies the client application to the server.
Client information sent during MCP protocol initialization. Identifies the client application to the server.
Value parameters
- name
-
Name of the client application
- version
-
Version of the client application
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
ClientInfo.type
Initialization request sent by client to establish MCP connection. First message in the MCP protocol handshake.
Initialization request sent by client to establish MCP connection. First message in the MCP protocol handshake.
Value parameters
- capabilities
-
Client capabilities being advertised
- clientInfo
-
Information about the client application
- protocolVersion
-
Version of MCP protocol to use
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
InitializeRequest.type
Initialization response returned by server during MCP handshake. Completes the protocol negotiation process.
Initialization response returned by server during MCP handshake. Completes the protocol negotiation process.
Value parameters
- capabilities
-
Server capabilities being advertised
- protocolVersion
-
Version of MCP protocol server will use
- serverInfo
-
Information about the server application
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
InitializeResponse.type
JSON-RPC 2.0 error structure used in failed responses.
JSON-RPC 2.0 error structure used in failed responses.
Value parameters
- code
-
Numeric error code
- data
-
Optional additional error data
- message
-
Human-readable error description
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
JsonRpcError.type
JSON-RPC 2.0 notification structure for MCP protocol communication. Notifications are requests without an ID - the client doesn't expect a response. Used for fire-and-forget messages like the "initialized" notification.
JSON-RPC 2.0 notification structure for MCP protocol communication. Notifications are requests without an ID - the client doesn't expect a response. Used for fire-and-forget messages like the "initialized" notification.
Value parameters
- jsonrpc
-
Protocol version, always "2.0"
- method
-
The method name to invoke on the server
- params
-
Optional parameters for the method
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
JsonRpcNotification.type
JSON-RPC 2.0 request structure for MCP protocol communication. Used to send requests to MCP servers.
JSON-RPC 2.0 request structure for MCP protocol communication. Used to send requests to MCP servers.
Value parameters
- id
-
Unique identifier for this request
- jsonrpc
-
Protocol version, always "2.0"
- method
-
The method name to invoke on the server
- params
-
Optional parameters for the method
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
JsonRpcRequest.type
JSON-RPC 2.0 response structure returned by MCP servers. Contains either a result or error, never both.
JSON-RPC 2.0 response structure returned by MCP servers. Contains either a result or error, never both.
Value parameters
- error
-
Optional error information when failed
- id
-
Identifier matching the original request
- jsonrpc
-
Protocol version, always "2.0"
- result
-
Optional result data when successful
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
JsonRpcResponse.type
Capabilities structure defining what features are supported. Used by both client and server during initialization handshake.
Capabilities structure defining what features are supported. Used by both client and server during initialization handshake.
Value parameters
- logging
-
Logging capabilities
- prompts
-
Prompt management capabilities
- resources
-
Resource access capabilities
- roots
-
Root directory access capabilities
- sampling
-
Sampling capabilities
- tools
-
Tool execution capabilities
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
MCPCapabilities.type
MCP clients handle the communication with MCP servers to:
MCP clients handle the communication with MCP servers to:
- Establish protocol handshake and negotiate capabilities
- Retrieve available tools from remote servers
- Execute tools remotely and return results
- Manage connection lifecycle
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
class MCPClientImpl
Implementation of MCP client that connects to and communicates with MCP servers. Handles JSON-RPC communication, tool discovery, and execution delegation. Supports both 2025-06-18 (Streamable HTTP) and 2024-11-05 (HTTP+SSE) transports.
Implementation of MCP client that connects to and communicates with MCP servers. Handles JSON-RPC communication, tool discovery, and execution delegation. Supports both 2025-06-18 (Streamable HTTP) and 2024-11-05 (HTTP+SSE) transports.
Attributes
- Companion
- object
- Supertypes
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
MCPClientImpl.type
Enhanced content item within a tool response (PR #371 - Structured Tool Output). Supports text, resource links, and structured annotations.
Enhanced content item within a tool response (PR #371 - Structured Tool Output). Supports text, resource links, and structured annotations.
Value parameters
- `type`
-
Content type: "text", "resource", "image", etc.
- annotations
-
Optional structured metadata
- resource
-
Resource reference (for resource type)
- text
-
The actual content text (for text type)
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
MCPContent.type
Standard JSON-RPC and MCP-specific error codes.
Standard JSON-RPC and MCP-specific error codes.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
MCPErrorCodes.type
Configuration for MCP (Model Context Protocol) servers. Defines how to connect to and communicate with an MCP server.
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 to wait for server responses
- transport
-
Transport mechanism (stdio, SSE, or Streamable HTTP) for communication
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
MCPServerConfig.type
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Tool definition structure as provided by MCP servers. Describes a tool that can be executed remotely.
Tool definition structure as provided by MCP servers. Describes a tool that can be executed remotely.
Value parameters
- description
-
Human-readable tool description
- inputSchema
-
JSON Schema defining expected parameters
- name
-
Unique tool identifier
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- object
- Supertypes
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
MCPToolRegistry.type
Base trait for MCP transport mechanism configurations.
Base trait for MCP transport mechanism configurations.
Defines how to connect to an MCP server. Each transport type specifies the connection parameters and protocol to use.
Attributes
- See also
-
StdioTransport for subprocess communication
SSETransport for legacy HTTP/SSE transport
StreamableHTTPTransport for modern HTTP transport
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
Attributes
- Companion
- trait
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
MCPTransport.type
Base trait for transport implementations.
Base trait for transport implementations.
Provides the interface for sending JSON-RPC requests and notifications to an MCP server and managing the connection lifecycle.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
Reference to an MCP resource (PR #603 - Resource links in tool results).
Reference to an MCP resource (PR #603 - Resource links in tool results).
Value parameters
- `type`
-
Optional MIME type or resource type
- uri
-
URI of the referenced resource
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
ResourceReference.type
Server-Sent Events transport configuration using HTTP (MCP 2024-11-05 spec).
Server-Sent Events transport configuration using HTTP (MCP 2024-11-05 spec).
Connects to server via HTTP with SSE for streaming responses. This is the legacy transport protocol for backwards compatibility.
Value parameters
- name
-
Unique identifier for this transport instance
- url
-
HTTP URL of the SSE endpoint
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait MCPTransportclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
Server information returned during MCP protocol initialization. Identifies the server application to the client.
Server information returned during MCP protocol initialization. Identifies the server application to the client.
Value parameters
- name
-
Name of the server application
- version
-
Version of the server application
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
ServerInfo.type
Stdio transport configuration using subprocess communication.
Stdio transport configuration using subprocess communication.
Launches the MCP server as a subprocess and communicates via stdin/stdout. Suitable for local MCP servers and development environments.
Value parameters
- command
-
Command line to launch the server process (e.g.,
Seq("npx", "@playwright/mcp@latest")) - name
-
Unique identifier for this transport instance
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait MCPTransportclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
Streamable HTTP transport configuration (MCP 2025-03-26 spec).
Streamable HTTP transport configuration (MCP 2025-03-26 spec).
Connects to server via HTTP with support for streaming responses. This is the modern transport protocol supporting single-endpoint design.
Value parameters
- name
-
Unique identifier for this transport instance
- url
-
HTTP URL of the MCP endpoint
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait MCPTransportclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
Request structure for executing a tool via tools/call.
Request structure for executing a tool via tools/call.
Value parameters
- arguments
-
Optional arguments to pass to the tool
- name
-
Name of the tool to execute
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
ToolsCallRequest.type
Response from tool execution containing the results.
Response from tool execution containing the results.
Value parameters
- content
-
Array of content items returned by the tool
- isError
-
Optional flag indicating if this represents an error
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
ToolsCallResponse.type
Response from tools/list request containing available tools.
Response from tools/list request containing available tools.
Value parameters
- tools
-
Sequence of tool definitions available on the server
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
ToolsListResponse.type