Open Source MCP Server

AI Agents
Finally
Remember.

A shared nervous system for AI agents. Every agent starts with full knowledge of what every other agent has done. Failures are remembered. Decisions are shared. Nothing is lost.

Install Now See the Problem
$ npm install -g common-context-mcp
0
MCP Tools
0
Dependencies
0
% Offline
0
JSON File
The Problem

AI Agents Have Amnesia.

Every session starts from zero. Agents can't learn from each other, can't remember failures, and repeat the same mistakes. Switching agents means losing all context.

🧠

Session Amnesia

Agent A discovers the API uses JWT. Agent B starts fresh and tries OAuth. Same work, twice. Knowledge is lost between sessions.

→ Fixed: load_context() injects all prior knowledge
🔄

Repeated Failures

Agent tries Redis for sessions. Fails. Next agent tries Redis again. Fails again. Third agent tries Redis. Fails again.

→ Fixed: save_failure() + search_context() prevents repeats
🧩

Lost Context

Agent hits token limit mid-work. Everything learned is gone. Next agent starts blind. No checkpoint, no resume.

→ Fixed: Frequent checkpointing + interrupted session detection
⚡

Agent Conflicts

Two agents edit the same file simultaneously. Merge conflicts. Wasted time. No coordination mechanism exists.

→ Fixed: claim_area() + list_claims() prevents conflicts
📉

No Audit Trail

What was decided? Why? By whom? When? No record exists. Decisions are made in chat and forgotten.

→ Fixed: Every action recorded with timestamp + agent ID
🔀

Contradictory Decisions

Agent A decides "Use JWT". Agent B decides "Use sessions". No shared decision log. Chaos.

→ Fixed: broadcast() + save_context() for all decisions
The Solution

One JSON File. Shared Nervous System.

Every agent reads from and writes to a single append-only JSON file. What one agent learns, every agent inherits. What one agent fails at, no agent repeats.

01

Install

npm install -g common-context-mcp. Post-install auto-configures all your AI agents. Zero manual setup.

02

Load Context

Agent starts → calls load_context() → gets ALL prior knowledge injected into working memory.

03

Work & Save

Agent works. Saves context after every step. Records failures immediately. Claims areas to prevent conflicts.

04

Handoff

Agent saves summary. Next agent loads everything. Seamless continuation. No context lost.

$ npm install -g common-context-mcp
Configured: Cursor, OpenCode, Windsurf
Created: ~/.shared-context.json
Done. Restart agents to activate.

[Agent] load_context()
Sessions: 3 | Failures: 2 | Contexts: 8
⚠️ INTERRUPTED: "Rate limiting" → checkpoint: "middleware done"
Context loaded. Full knowledge available.

[Agent] search_context("redis")
Found: [failure] Redis sessions: Too complex
Agent: "I'll use PostgreSQL instead."

[Agent] save_summary(title="Auth module", ...)
Session saved. You may now respond.
13 Tools

The Complete Toolkit.

Every tool is visible to the user. Every call is recorded. Nothing is hidden.

load_context
Load ALL shared context at session start. Mandatory first call.
save_context
Save a fact/decision/config. Auto-checkpoints progress.
save_summary
Save session summary. Mandatory before final response.
save_failure
Record failed approach immediately. Prevents repeats.
search_context
Full-text search across all entries.
claim_area
Claim a file/area to prevent conflicts.
release_area
Release a claimed area.
list_claims
See what other agents are working on.
broadcast
Send decision to all agents instantly.
handoff
Transfer work with full context.
get_patterns
See what works and what fails.
get_audit_trail
Full history of all decisions.
resume_session
Resume from interrupted session.
Comparison

Why Not Just Use Existing Tools?

266+ memory MCPs exist. Here's why ours is different.

Capability Mem0 / OpenMemory sessionmem rawmem common-context-mcp
Shared across agents✓✗✓✓
Append-only (no deletion)✗✗✓✓
No deletion tool exists✗✗✓✓
Session summaries✗✓✗✓
Failure tracking✗✗✗✓
Agent coordination✗✗✗✓
Conflict prevention✗✗✗✓
Zero dependencies✗✗✓✓
Single file storage✗✗ (SQLite)✓✓
100% offline✗ (cloud)✓✓✓
No API keys✗✓✓✓
Auto-install✗✓ (npm)✗✓
Load as temp✗✓✗✓
Audit trail✗✗✓✓
Interrupted session recovery✗✗✗✓
Visible MCP calls✗✗✗✓
Strict protocol enforcement✗✗✗✓
Install

One Command. Zero Config.

Install globally. Post-install auto-detects all your AI agents and configures them. No manual setup.

$ npm install -g common-context-mcp
Configured: Cursor, OpenCode, Windsurf, Claude Desktop
Created: ~/.shared-context.json
Done. Restart agents to activate.

# That's it. No API keys. No Docker. No database.
# Every agent now auto-connects and shares context.
$ npm install -g common-context-mcp
📦
Node.js 18+
Only requirement
🔒
Zero Config
Auto-detects agents
📄
One JSON File
~/.shared-context.json
FAQ

Got Questions?

How does the agent know to call load_context() first? +

The MCP server returns instructions in its initialize response. These instructions are automatically injected into the agent's system prompt by every MCP client. The agent is told: "FIRST ACTION: Call load_context() before ANY other work. MANDATORY."

What happens if the agent hits a session limit mid-work? +

Every save_context() call is a checkpoint. If the session is cut off, the last checkpoint is preserved in the JSON file. The next agent's load_context() detects the interrupted session and shows the checkpoint. The next agent can resume from where the previous left off.

Can data be deleted? +

No. There is no delete tool. The file is append-only. Context entries can be updated (overwritten), but sessions, failures, and broadcasts are never removed. This is a deliberate design choice to prevent knowledge loss.

Is it safe for multiple agents to use simultaneously? +

Yes. Writes use atomic file operations (write to temp, then rename). The claim_area tool prevents conflicts by letting agents claim files/areas before working on them. list_claims shows what other agents are working on.

Where is the data stored? +

In a single JSON file at ~/.shared-context.json. It's human-readable, git-friendly, and can be backed up with a simple copy command. No database, no cloud, no external service.

Does it work offline? +

100% offline. No network calls, no cloud services, no API keys. The MCP server runs locally via stdio transport. Your data never leaves your machine.

Which AI agents are supported? +

Any MCP-compatible agent: Claude Desktop, Claude Code, Cursor, OpenCode, Windsurf, Cline, Continue, and more. The post-install script auto-detects and configures all installed agents.

Stop Repeating.
Start Remembering.

Every AI agent you use should start smarter than the last. One command. Zero config. Shared context forever.

Install Now View on GitHub