MindSync MCP
The MindSync MCP server is a local-first Model Context Protocol server that enables multiple AI coding agents to share memory, track focus, detect conflicts, and optionally sync durable facts to a remote host over SSH.
get_sync_context: Load local session state and compiled truth summaries for an agent, optionally pulling fresh data from a remote host first. Always returns local data even if remote is unreachable.update_focus: Register or update what an agent is working on (project, branch, focus, file paths) and receive warnings if another active agent has overlapping focus or is editing the same files/tokens.queue_durable_fact: Write a structured fact (entity, attribute, text, confidence) to the remote host, or store it in a local offline queue if the remote is unavailable.sync_offline_facts: Flush locally queued offline facts to the remote host, optionally triggering remote consolidation and pulling the latest compiled truth back to local cache.pull_truth: Explicitly pull compiled-truth markdown summaries from the remote host into the local cache via SCP.health: Inspect server state, including local data paths, offline queue depth, and whether the remote host is reachable.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MindSync MCPUpdate my focus to myapp/main focusing on auth module"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MindSync MCP
Local-first Model Context Protocol server for multi-agent memory sync and focus conflict detection.
Use it when several coding agents (Claude Code, Codex, Cursor, Gemini CLI, Grok, custom agents, …) share one developer machine and need:
A shared session/focus registry (who is editing what)
Conflict warnings when focuses overlap
Optional durable fact sync to your remote host over SSH (offline queue when remote is down)
No cloud account. No hard-coded hosts or home directories.
Features
Tool | Purpose |
| Load local state + compiled truth (optional remote pull) |
| Per-agent focus/project/branch (+ optional paths); conflict warnings |
| Write fact remotely, or queue offline if unreachable / unconfigured |
| Flush offline queue; consolidate + pull truth |
| Windows-safe SCP pull of compiled-truth markdown |
| Paths, queue depth, remote reachability |
Design principles:
Offline-first — local tools always work; remote is opt-in and best-effort.
Locked local state — exclusive lockfiles around state/queue writes.
Safe remote writes — identifier allowlists + base64 text transport over SSH.
No false-positive conflicts — same project alone is not a conflict; token/path overlap is.
Generic by default — zero personal paths in code; configure via env.
Related MCP server: junto-memory
Install
git clone https://github.com/adityarya24/mindsync-mcp.git
cd mindsync-mcp
python -m pip install -e ".[dev]"Quick start (local only)
No env vars required. State lives under ~/.mindsync.
MCP client config
After pip install -e .:
{
"mcpServers": {
"mindsync": {
"command": "mindsync"
}
}
}Or run the module path explicitly:
{
"mcpServers": {
"mindsync": {
"command": "python",
"args": ["-m", "mindsync.server"]
}
}
}(Windows: use your venv’s python.exe if agents don’t see the same PATH.)
Optional remote sync
Remote features stay disabled until both are set:
export MINDSYNC_SSH_HOST=my-server # SSH config Host or user@host
export MINDSYNC_REMOTE_ROOT=/opt/mindsync # directory on that hostSee .env.example for the full list and examples/remote/ for sample server-side scripts (mindsync_fact.py, mindsync_consolidate.py).
Env var | Default | Meaning |
|
| Local data root |
| (empty) | SSH host; empty disables remote |
| (empty) | Remote project root; empty disables remote |
|
| Optional file sourced on remote before commands |
|
| Relative to remote root |
|
| Relative to remote root |
|
| Markdown summaries directory |
|
| SSH connect timeout (seconds) |
|
| Ignore older focus entries |
|
| Cache TTL for online probe |
|
| Local lock wait (seconds) |
SSH must be key-based / BatchMode-friendly (no interactive password prompts).
Local data layout
Under MINDSYNC_HOME (default ~/.mindsync):
local-state.json— active project + per-agent focus maplocal-audit.jsonl— append-only action logoffline_queue.jsonl— durable facts waiting for remotecompiled-truth/*.md— pulled remote summaries.locks/— exclusive lockfiles
Agent usage pattern
Start:
get_sync_context(agent_name)(setrefresh_remote=truewhen remote is configured).Work:
update_focus(agent_name, project, branch, focus, paths=[...]).Milestone:
queue_durable_fact(agent_name, entity, attribute, text).Reconnect:
sync_offline_facts(agent_name).
Layout
mindsync-mcp/
├── mindsync/
│ ├── server.py # FastMCP tools
│ ├── storage.py # JSON/JSONL + locks
│ ├── bridge.py # optional SSH/SCP
│ ├── conflict.py # focus overlap
│ └── config.py # env-based settings
├── examples/remote/ # sample remote hooks
├── tests/
├── .env.example
└── pyproject.tomlDevelop / test
python -m pip install -e ".[dev]"
python -m pytest -q
python scripts/smoke_test.pyGitHub Actions runs the same suite on every push/PR to master
(Python 3.10 + 3.12, Ubuntu + Windows).
Security notes
Treat tool arguments as untrusted: entity/attribute/agent must match a strict allowlist.
Fact text is base64-transported to the remote host (no raw shell interpolation of free text).
This server runs with your user privileges and can SSH only when you configure a host — wire it into trusted local agent clients only.
Do not commit real
.envfiles or server secrets.
License
MIT
Maintenance
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/adityarya24/mindsync-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server