Ray's Knowledge Base
Unlock

rgit runs one stdio MCP process per agent session, with no shared daemon

DecisionVerified 29 Sep 2026Holds project: rgit
Decision. The context, the choice, why, and the options that were turned down.

Context#

Agents in Claude Code, pi and omp reach rgit through MCP or an extension, often several sessions at once on one machine.

Decision#

rgit mcp is a stdio server, one process per agent session. There is no shared daemon. The HTTP transport in rgit serve is read-only and limited to the served repository. rgit agent install gives Claude Code a plugin rgit@rgit from a local marketplace and pi/omp an extension rgit.ts; MCP is added only with --mcp.

Why#

One idle rgit mcp (release build) uses about 24 MB and no CPU, so 10 sessions cost about 240 MB. A daemon would need per-session repository roots, lifecycle handling and a locked socket, and one crash would take git away from every session. Two sessions writing one repository are already protected by git's index.lock and ref locks. The user: "let's have one per session then".

Rejected options#

  • A shared per-user daemon: more moving parts and one point of failure for no shared state today. Revisit only when there is expensive state to share (a code index, pack caches); then rgit mcp becomes a thin proxy to a per-user daemon over a Unix socket.

Evidence#

crates/rgit-cli/src/mcp.rs (rmcp crate); commit 1b44794 added rgit agent install, status, uninstall and skill.

Also found by searching

  • ps shows ten rgit mcp processes, one per agent session, should there be a shared daemon?
  • how many rgit MCP server processes should run when several agent sessions use it at once?
  • does rgit use a shared daemon or one stdio MCP process per agent session, and why?
  • per-session stdio MCP server vs per-user daemon over Unix socket, memory cost, rgit agent install
  • does rgit mcp run as a daemon shared between Claude Code sessions?
  • how does rgit connect to agents in pi and omp, rgit agent install --mcp
  • is there a long-running server for rgit when several agent sessions are open?
  • rgit serve http transport read-only vs stdio mcp per session