Local MCP Memory Server is a MongoDB-backed coordination layer for MCP clients that need more than isolated memory. It gives agents and humans a shared system for persistent context, project descriptors, tasks, issues, activity tracking, soft locks, and collaboration-safe state updates.
Official Docs: https://coderooz.github.io/Local-MCP-Memory-Server/
This project upgrades the usual "agent executes, user waits" flow into a safer collaboration model where agents can work in parallel with users and other agents without losing project context or silently trampling each other's changes.
The stack is:
- MCP stdio transport in
mcp-server.js - Express API in
server.js - MongoDB persistence for memory, versions, activity, locks, tasks, issues, messages, metrics, and project intelligence
- Project descriptor system for baseline project identity and rules
- Persistent memory with ranking, lifecycle states, and version history
- Live activity stream for agent and user-visible project tracking
- Soft resource locks for files, modules, tasks, and other shared resources
- Task orchestration with priority scoring, scheduling, and capability-aware auto-assignment
- Issue and notes tracking linked to memory and tasks
- Agent registry with heartbeat-based status tracking
- Project map for reusable codebase structure knowledge
- Context graph retrieval that links memory, tasks, issues, actions, versions, and related agents
- Metrics for task completion, memory usage, and collaboration signals
The server now supports safe parallel collaboration:
- agents can publish live activity entries
- agents can acquire soft locks before shared work
- updates can include expected versions or timestamps for overlap detection
- conflicting updates are surfaced as warnings instead of being hidden
- task ownership and active locks help reduce accidental overlap
This is designed to warn and coordinate, not hard-block humans.
- Install dependencies:
npm install- Create
.env:
MONGO_URI=mongodb://localhost:27017/mcp_memory
PORT=4000
MCP_AGENT=codex
MCP_PROJECT=local-mcp-server
MCP_SCOPE=project
MCP_SERVER_URL=http://localhost:4000- Run the API:
npm run start:api- Run the MCP server:
npm start- For editor integrations, prefer:
node /absolute/path/to/mcp-shim.jsTypical system-mode flow:
- Read the project descriptor
- Search memory
- Fetch tasks and messages
- Check recent activity and active locks
- Claim or update work
- Make the change
- Store reusable memory, log actions, and release locks
Key MCP tools now include:
set_project_descriptor,get_project_descriptorstore_context,search_context,update_context,get_connected_contextcreate_task,fetch_tasks,assign_task,update_taskcreate_issue,resolve_issue,fetch_issuesrecord_activity,fetch_activityacquire_resource_lock,release_resource_lock,fetch_resource_locksregister_agent,heartbeat_agent,list_agentscreate_project_map,fetch_project_mapfetch_metrics,log_action,get_logs
The docs/ folder contains the GitHub Pages site and now covers:
- system purpose and architecture
- project descriptors and project identity
- activity tracking and soft-lock collaboration
- API and MCP tool reference
- human + agent collaboration guidelines
Enable GitHub Pages on the repository and use /docs as the source to publish it.
Run:
npm testMIT