HttpTransport

constructor(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)

Parameters

registry

Tools to serve.

port

Plaintext port; overridden by TlsConfig.httpsPort when tls is set.

bearerToken

Fixed primary token; a random one is generated when null and requireAuth is true.

requireAuth

Require a Bearer token on every request. When false the server is open.

readOnly

Serve only read-only tools.

context

Android context for mDNS registration; mDNS is skipped when null.

serverVersion

Version reported in initialize and the mDNS TXT record.

auditSink

Optional per-call audit hook.

tls

TLS material; when set the server binds HTTPS and exposes tlsFingerprint.