Skip to content

feat: add MCP server mode#12

Open
runeb wants to merge 1 commit intomainfrom
feat/mcp-server
Open

feat: add MCP server mode#12
runeb wants to merge 1 commit intomainfrom
feat/mcp-server

Conversation

@runeb
Copy link

@runeb runeb commented Feb 11, 2026

Summary

  • Adds --mcp flag that starts nuum as an MCP server over stdio, exposing three tools: list_agents, create_agent, send_message
  • Each instance gets its own SQLite database in .nuum/agents/<name>.db with full persistent memory
  • Cross-process file locking via atomic mkdir with PID-based stale detection prevents concurrent access to the same agent DB
  • Serialization lock on Mcp.initialize() fixes a TOCTOU race where concurrent callers could both trigger initialization

Test plan

  • bun run typecheck — clean
  • bun test — 245 tests pass
  • bun run build — builds successfully
  • Manual: all three MCP tools tested via Claude Code (list_agents, create_agent, send_message)
  • Manual: create_if_missing auto-creates agent on first message
  • Manual: no stale .lock dirs left after operations

Add --mcp flag that starts nuum as an MCP server over stdio,
allowing other tools (Claude Code, Codex, etc.) to interact with
persistent nuum instances via three tools: list_agents, create_agent,
and send_message.

Each instance gets its own SQLite database in .nuum/agents/<name>.db
with full persistent memory (temporal, present state, LTM).

Includes cross-process file locking via atomic mkdir with PID-based
stale detection, and a serialization lock on Mcp.initialize() to
prevent concurrent init races.
@runeb runeb requested a review from simen February 11, 2026 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant