Shared Memory
About
Provides shared memory for agentic teams to improve token efficiency and coordination.
Details
- Author
- haasonsaas
- Categories
- Productivity, AI
Jump to
Setup
Install Shared Memory in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/haasonsaas/shared-memory-mcp
Follow the installation instructions in the repository README, then restart your MCP client.
Solving coordination tax in agentic teams- where Opus + 4 Sonnets burns 15x tokens but only gets 1.9x performance.
- Node.js 18+
- npm or yarn
- Claude Desktop (for MCP integration)
Current agentic team patterns have terrible token efficiency:
- Traditional: 1 request × 4K tokens = 4K tokens
- Agentic Team: 1 coordinator + 4 workers × 12K tokens each = 48K+ tokens
- Efficiency: 1.9x performance / 15x cost =12% efficiency
This MCP server provides shared memory for agentic teams to achieve6x token efficiencywhile maintaining coordination benefits.
- Store shared context once, reference by key
- 10:1 compression ratio with intelligent summarization
- Workers get 100-token summaries instead of full context
- Append-only discovery system
- Workers share findings in real-time
- Delta updates prevent retransmission
- Claim-based work distribution
- Dependency tracking and resolution
- Reactive task handoff between workers
- Context compression and lazy loading
- Delta updates since last version
- Expansion on demand for specific sections
# Clone the repository git clone https://github.com/haasonsaas/shared-memory-mcp.git cd shared-memory-mcp # Install dependencies npm install # Build the server npm run build
# Run in development mode npm run dev # Or run the built server npm start # Test the agentic workflow npm test # or npm run test-workflow
// 1. Create agentic session (coordinator) const session = await mcp.callTool('create_agentic_session', { coordinator_id: 'opus-coordinator-1', worker_ids: ['sonnet-1', 'sonnet-2', 'sonnet-3', 'sonnet-4'], task_description: 'Analyze large codebase for performance issues', codebase_files: [...], // Full context stored once requirements: [...], constraints: [...] }); // 2. Workers get compressed context (not full retransmission) const context = await mcp.callTool('get_worker_context', { session_id: session.session_id, worker_id: 'sonnet-1' }); // Returns summary + reference, not full context // 3. Publish work units for coordination await mcp.callTool('publish_work_units', { session_id: session.session_id, work_units: [ { unit_id: 'analyze-auth', type: 'security', priority: 'high' }, { unit_id: 'optimize-db', type: 'performance', dependencies: ['analyze-auth'] } ] }); // 4. Workers claim and execute await mcp.callTool('claim_work_unit', { session_id: session.session_id, unit_id: 'analyze-auth', worker_id: 'sonnet-1', estimated_duration_minutes: 15 }); // 5. Share discoveries incrementally await mcp.callTool('add_discovery', { session_id: session.session_id, worker_id: 'sonnet-1', discovery_type: 'vulnerability_found', data: { vulnerability: 'SQL injection in auth module' }, affects_workers: ['sonnet-2'] // Notify relevant workers }); // 6. Get only new updates (delta, not full context) const delta = await mcp.callTool('get_context_delta', { session_id: session.session_id, worker_id: 'sonnet-2', since_version: 5 // Only get changes since version 5 });
┌─────────────────┐ ┌─────────────────┐ │ Opus Coordinator│ │ Shared Memory │ │ │────│ MCP Server │ │ - Task Planning │ │ │ │ - Work Units │ │ - Context Store │ │ - Coordination │ │ - Discovery Log │ └─────────────────┘ │ - Work Queue │ │ - Dependencies │ ┌─────────────────┐ └─────────────────┘ │ Sonnet Workers │ │ │ │───────────┘ │ - Specialized │ │ - Parallel │ ┌─────────────────┐ │ - Coordinated │ │ Token Efficiency│ └─────────────────┘ │ │ │ 48K → 8K tokens │ │ 6x improvement │ │ 1200% better ROI│ └─────────────────┘
// Instead of sending full context (12K tokens): { full_context: { / massive object / } } // Send compressed reference (100 tokens): { summary: "Task: Analyze TypeScript codebase...", reference_key: "ctx_123", expansion_hints: ["codebase_files", "requirements"] }
// Instead of retransmitting everything: get_full_context() // 12K tokens each time // Send only changes: get_context_delta(since_version: 5) // 200 tokens
// Workers request details only when needed: expand_context_section("codebase_files") // 2K tokens request_detail("file_content", "auth.ts") // 500 tokens
- create_agentic_session- Initialize coordinator + workers
- get_session_info- Get session details
- update_session_status- Update session state
- get_worker_context- Get compressed context for worker
- expand_context_section- Get detailed section data
- get_context_delta- Get incremental updates
- publish_work_units- Publish available work
- claim_work_unit- Claim work for execution
- update_work_status- Update work progress
- add_discovery- Share findings with team
- get_discoveries_since- Get recent discoveries
- declare_outputs- Declare future outputs
- await_dependency- Wait for dependency
- publish_output- Publish output for others
cp claude-desktop-config.example.json claude-desktop-config.json
Editclaude-desktop-config.jsonand update the path to your installation:
{ "mcpServers": { "shared-memory": { "command": "node", "args": ["/absolute/path/to/shared-memory-mcp/dist/server.js"] } } }
Add this configuration to your Claude Desktop config file:
- macOS:~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:%APPDATA%\Claude\claude_desktop_config.json
- Linux:~/.config/Claude/claude_desktop_config.json
Note: Theclaude-desktop-config.jsonfile is gitignored as it contains machine-specific paths.
Provides AI assistants with advanced task management and memory capabilities using local JSON file storage.
Portable, cloud-hosted AI memory you own - structured memories, tasks, goals, and notes that work across Claude, ChatGPT, Gemini, and any MCP client.
Connect your Limitless Pendant data to Claude and other LLMs using the Limitless API.
Local-first cross-agent memory MCP. 6-layer structured brain (goal/context/emotion/impl/caveat/learning) with token-saving file diff cache (86% measured savings on re-reads)
Your AI assistants don't know who you are. mcp-me fixes that: a local MCP server that gives any AI a full picture of who you are
A project management and session memory tool for AI agents to track projects, tasks, and context during chat sessions.
Give your AI the ability to remember key facts and everything you've ever discussed
Synchronizes memory templates across different Claude interfaces.
Centralized note store across AI clients: Claude, ChatGPT, Cursor, Codex, Windsurf. Save in one client, access in another instantly. Across devices — phone, desktop, everywhere. Cross-session context: 'catch me up' surfaces plans and findings from any prior session. AES-256-GCM encryption at rest, per-user key isolation. Soft delete with 30-day recovery window. Pin notes to exempt from cleanup and prioritize. Tag notes for categorization and filtering ('tag: auth'). Your mctx account is your identity — instant access from any AI tool.
An AI capability enhancement system providing professional roles, memory management, and knowledge systems for applications like Claude and Cursor.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.

