5fe8f228c1
Add a read-only /ecosystem page that consumes the sibling services' JSON APIs (Nexus entities, Praxis attention, Hexis capabilities), fetched concurrently with honest per-panel error states. Siblings stay headless — mavweb is their human surface (arch §16). Wired via mavweb -nexus/-praxis/-hexis flags; mavweb joins the ecosystem compose network. Fix mobile horizontal overflow across all pages: .content is a flex child with default min-width:auto, so it refused to shrink below the tables' intrinsic width. min-width:0 lets wide tables pan inside .scroll instead of dragging the page sideways. Verified via CDP geometry check (scrollWidth === clientWidth at 430px). Also includes in-progress Ethos UI redesign, ecosystem deploy compose, and planning docs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2.3 KiB
2.3 KiB
Plan: MCP (Model Context Protocol) Integration
Goal: Maven acts as an MCP host — she can connect to external MCP servers (tools, data sources, file systems) via the Model Context Protocol, and expose those capabilities as tool verbs in her allowlist, or use them as context sources for routing/phrasing.
Done when:
internal/mcp/package implements an MCP client — connects to MCP servers over stdio or TCP, negotiates protocol version, discovers tools/resources- MCP-discovered tools are registered as proposed tools (
ProposeTool) in the store - User enables them on mavweb (existing
EnableToolflow) - MCP resource contents are available as context for the router's
LLMRouteror the phraser's prompts - Multiple MCP servers can be configured in
deploy/mavend.json - MCP connections are managed (reconnect on drop, timeout, graceful shutdown)
Scope:
- New
internal/mcp/package — protocol client (github.com/mark3labs/mcp-goor raw JSON-RPC over stdio/TCP) - New
cmd/mcphost/or built intocmd/mavend/— MCP server manager goroutine - Config extension:
mcp_serversarray inconfig.Config—{name, command, args, env, enabled} - IPC extension:
MethodListMCPTools,MethodListMCPResources,MethodCallMCPTool - Reuses
internal/tool/Executorandinternal/routerseams
Steps:
- Research MCP protocol spec and pick a Go client library (
github.com/mark3labs/mcp-goexists as of 2025, or implement raw JSON-RPC 2.0 over stdio/TCP) - Create
internal/mcp/client.go—Clientstruct handling stdio subprocess lifecycle: spawn, negotiate protocol version (initializehandshake),ListTools,CallTool - Create
internal/mcp/manager.go—Managerthat readsmcp_serversconfig, starts/stops per-server clients, exposes a consolidated tool list - Wire MCP-discovered tools into
ProposeTool(same flow ascmd/mavend/voice.go:proposeGap) - Add resource content fetching —
ReadResourcereturns text content that can be injected into LLM prompts - Add IPC methods
MethodListMCPTools,MethodListMCPResources,MethodCallMCPTooltointernal/ipc/api.go - Expose MCP tools in mavweb UI — new
/tools/mcppage - Add
mcp_serversblock toconfig.Configanddeploy/mavend.json - Test with a local MCP demo server (e.g.,
mcp-server-sqliteor a custom echo server)