Package-level declarations
Types
Link copied to clipboard
interface McpProtocol
JSON-RPC 2.0 request handler for the MCP surface (initialize, tools/list, tools/call, ping). Transports feed raw request strings in and write the returned response string back. The default implementation is McpProtocolImpl.
Link copied to clipboard
class McpProtocolImpl(registry: ToolRegistry, serverName: String = "droid-mcp", serverVersion: String = DROID_MCP_VERSION, readOnly: Boolean = false, auditSink: AuditSink? = null, resources: ResourceRegistry = ResourceRegistry(), prompts: PromptRegistry = PromptRegistry(), notifiesListChanged: Boolean = false) : McpProtocol
The default McpProtocol implementation: a JSON-RPC 2.0 handler over a ToolRegistry. Services initialize, tools/list, tools/call, resources/list, resources/templates/list, resources/read, prompts/list, prompts/get, completion/complete and ping. Messages without an id are notifications: they are accepted silently and never answered (the transport replies 202). notifications/cancelled cancels the caller's own in-flight tools/call with that requestId; the cancelled request then gets no response.