Labsco
MCP SERVER

Shared Memory

by haasonsaas

Store a coordinator's context once and give workers a compressed reference plus deltas, so a multi-agent team stops resending the same 12K tokens.

Codebase Context Packing & Compression
Summary
Three mechanisms, all aimed at the same waste.

Deduplication (store once, reference by key), deltas (send only what changed since a version), and lazy loading (expand a section only when a worker asks) are separate ideas that attack one problem — workers re-receiving context they already have. The dependency tools are the quieter half: declaring an output before it exists lets a worker wait on it instead of polling or duplicating the work.

What it is

An MCP server that gives an agentic team a shared memory instead of a copy of the context per worker. Context is stored once and referenced by key, workers claim units of work, discoveries are appended and shared, and updates are sent as deltas from the version a worker last saw.

What you get
  • A session created for a coordinator and its workers, with session state readable and updatable — `create_agentic_session`, `get_session_info`, `update_session_status`
  • Compressed context for a worker — a summary plus a reference key and expansion hints instead of the full object — `get_worker_context`, with `expand_context_section` to pull a section on demand
  • Only the changes since a version a worker already has — `get_context_delta` with `since_version`
  • Work units published, claimed with an estimated duration, and progressed — `publish_work_units`, `claim_work_unit`, `update_work_status`
  • Findings shared as they happen, addressed at the workers they affect — `add_discovery`, `get_discoveries_since`
  • Dependency resolution between workers — `declare_outputs`, `await_dependency`, `publish_output`
Requirements

No account and no key — it runs locally. Node.js 18+ and npm or yarn. Clone the repository, `npm install`, `npm run build`, then point Claude Desktop at `dist/server.js` with `node`; the repository ships `claude-desktop-config.example.json` to copy. The package is `shared-memory-mcp` 1.0.0, MIT licensed. `npm run test-workflow` exercises the full agentic flow.

Setup effort

One command — npm install