Package-level declarations

Types

Link copied to clipboard
class HttpTransport(registry: ToolRegistry, port: Int = 8080, bearerToken: String? = null, requireAuth: Boolean = true, readOnly: Boolean = false, context: Context? = null, serverVersion: String = DROID_MCP_VERSION, auditSink: AuditSink? = null, tls: TlsConfig? = null, allowedOrigins: Set<String> = emptySet(), resources: ResourceRegistry = ResourceRegistry(), prompts: PromptRegistry = PromptRegistry())

Ktor/Netty MCP server for desktop clients, speaking the Streamable HTTP transport. Exposes the JSON-RPC surface at POST /mcp (plus GET /mcp for the server stream, DELETE /mcp to end a session, and a /health probe), enforces bearer auth via a TokenStore when requireAuth is set, optionally terminates TLS, and advertises itself over mDNS (_mcp._tcp). Prefer building one through DroidMcp.Builder.enableHttpServer rather than directly.

Link copied to clipboard
class InProcessTransport(registry: ToolRegistry, resources: ResourceRegistry = ResourceRegistry(), prompts: PromptRegistry = PromptRegistry())

Direct, in-process access to a ToolRegistry — no JSON-RPC, no network. Intended for on-device LLMs that call tools straight from the same process. Mirrors the surface an MCP client gets over HttpTransport (tools, resources, prompts) without the protocol envelope.

Link copied to clipboard
class TlsConfig(val keyStore: KeyStore, val keyAlias: String, val keyStorePassword: CharArray, val privateKeyPassword: CharArray, val httpsPort: Int = 8443)

TLS material for HttpTransport. Holds a keystore containing the server's private key + self-signed certificate under keyAlias, plus the HTTPS port to bind.

Link copied to clipboard
class TokenStore(seedPrimary: String? = null)

Bearer-token authority for HttpTransport.