Summary
memnet-mcp does not expose a structured graph API. Each tool builds CLI argv, runs run_memnet, and returns a JSON string whose stdout is still raw wire lines. Agents and domain MCPs re-parse that text.
Evidence
src/memnet_mcp/server.py: tools call _run([...]) then resp.to_json().
src/memnet_mcp/client.py: run_memnet(argv) bridges to memnet serve TCP or inline CLI.
- Documented pattern:
application-notes/llm-build-on-memnet.md ("Wrap CLI in typed tools; return JSON envelope").
- novel-mcp then parses warm with ad-hoc splitters (see related parser issues).
Impact
Latency and token cost: serialize to TCP to wire text to JSON string to agent parse. No typed fields for LLM tool schemas. Errors live in errors[] and stderr wire, easy to mishandle.
Suggested direction
Optional structured MCP responses (records as objects / TOON) while keeping wire for CLI and snapshots; or in-process store handles for same-process domain MCPs.
Summary
memnet-mcpdoes not expose a structured graph API. Each tool builds CLI argv, runsrun_memnet, and returns a JSON string whosestdoutis still raw wire lines. Agents and domain MCPs re-parse that text.Evidence
src/memnet_mcp/server.py: tools call_run([...])thenresp.to_json().src/memnet_mcp/client.py:run_memnet(argv)bridges tomemnet serveTCP or inline CLI.application-notes/llm-build-on-memnet.md("Wrap CLI in typed tools; return JSON envelope").Impact
Latency and token cost: serialize to TCP to wire text to JSON string to agent parse. No typed fields for LLM tool schemas. Errors live in
errors[]and stderr wire, easy to mishandle.Suggested direction
Optional structured MCP responses (records as objects / TOON) while keeping wire for CLI and snapshots; or in-process store handles for same-process domain MCPs.