Skip to main content

Module mcp

Module mcp 

Source
Expand description

Codegen for @mcp/<server>.<tool>(...) calls.

There is no per-tool Wasm import. Every call lowers to the single submilli:mcp.call(server, tool, argsJson) -> unknown host fn: the server and tool names (recovered from the mangled name) and the args (serialized via the object’s toJson vtable slot) are pushed as three (ref $string)s, and the host returns guest objects directly. The typechecker wraps known-return MCP calls in a normal Cast, so this module never emits cast validation.