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).
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 text.
- 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.