Expand description
Remote-MCP inference backend — reach an external provider (Claude / Google / X, or another Webizen node) over the Model Context Protocol to run a completion on the person’s behalf.
Local inference is PREFERRED; this is the opt-in, costly path (Timothy’s directive: local-first, external-via-MCP when wanted/needed; future provider credentials slot in behind the same seam). Native-only — it does network / process I/O and is never part of the wasm bundle.
It issues an MCP tools/call to a configured inference tool (default llm_infer) and extracts the
text from the MCP content result. Three transports, mirroring how the rest of the platform speaks
MCP: TCP (newline-delimited JSON-RPC, exactly what the Webizen desktop MCP server on :4245
serves), Stdio (spawn an MCP server command), and HTTP (JSON-RPC POST).
Structs§
- Remote
Infer Outcome - Outcome of one remote inference call: the text plus the lowering receipt describing how the request reached the tool’s schema.
Constants§
- DEFAULT_
INFER_ TOOL - Default MCP tool name to call for inference (the Webizen MCP surface exposes
llm_infer).
Functions§
- remote_
mcp_ infer - Run one inference over the configured MCP transport and return the completion plus the role-lowering receipt.
- remote_
mcp_ probe - Test an MCP endpoint without asking it to generate text. It sends the
standard
tools/listrequest and only reports that a response was received. - remote_
mcp_ tool_ supports_ system_ role - Discover whether the named inference tool’s declared
inputSchemaaccepts a dedicatedsystemargument, via atools/listround-trip.None= capability unknown (endpoint error or tool absent); callers fall back to flattened arguments.