Consume external MCP servers as tools — McpToolAdapter
Cyberine can consume any external MCP server's tools as orchestrator Tools (the consume-side mirror of npm run mcp, which exposes Cyberine itself). Configure servers by env; nothing connects when...
Cyberine can consume any external MCP server's tools as orchestrator Tools (the consume-side mirror of
npm run mcp, which exposes Cyberine itself). Configure servers by env; nothing connects when unset.
# Inline JSON — a bare spec array, or a .mcp.json-style { "mcpServers": {...} } object:
export CYBERINE_MCP_SERVERS='[{"name":"ctq","url":"http://localhost:38200/mcp","type":"http"}]'
# or point at a .mcp.json-style file:
export CYBERINE_MCP_CONFIG=./.mcp.jsonTools are namespaced mcp__<server>__<tool>; stdio (command/args) and HTTP transports are both
supported (src/adapters/McpToolAdapter.ts). The list is empty (no-op) when neither env is set. A
caller opts in by awaiting registerMcpTools() before buildDefaultAdapters() so the wrapped tools
reach the loop workers.
Inside cyberine chat, run /mcp (T538) to see every configured server's connection state, tool
count, transport, and auth status. The default view reads only mount-time-loaded state (no new
connect calls), so it is instant; a session with no CYBERINE_MCP_SERVERS/CYBERINE_MCP_CONFIG
set reports "no external MCP servers configured". /mcp retry <name> re-attempts a connection for
one server and merges its tools into the live session on success; /mcp details <name> prints the
full error text for a server whose last connect attempt failed (the default view truncates errors
to 160 chars). See the slash-command reference above for the full row/error format.
Expose Cyberine as an MCP server — npm run mcp
npm run mcp starts Cyberine as an MCP server (stdio transport) so any MCP host (Claude Code, Cursor, Claude Desktop) can drive it. The server declares a short instructions string (a few lines: what
Oversized tool results — spill-to-disk + retrieval (spill_retrieve)
Every tool call an agent adapter makes (LoopAgentAdapter, AnthropicAgentAdapter, BedrockAdapter, VertexAdapter — including MCP tools consumed via McpToolAdapter, which previously had no cap at...