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 AI
One orchestrator. Your coding agents. Shared context.
MindSync AI is a local-first MCP orchestration layer for coding agents. It turns the CLI already working with you into the lead orchestrator: MindSync discovers available workers, routes tasks by capability, supervises execution, and keeps every session aligned through shared focus, events, and durable memory.
Use Codex, Claude, Antigravity/Gemini, Grok, Cursor, and Aider as one coordinated system—without introducing another hosted control plane. MindSync works locally by default, requires no MindSync account, and makes remote synchronization entirely optional.
Why MindSync?
Running several capable agents is easy. Keeping them coordinated is the hard part. Without a shared layer, agents duplicate work, overwrite files, lose decisions between sessions, and force the user to manually choose a worker for every task.
MindSync provides:
Automatic orchestration — the human-facing CLI decides when delegation is useful.
Capability-based routing — workers are ranked by task fit, availability, and priority.
Conflict prevention — active file and project focus is visible before work begins.
Shared local memory — session state, events, and queued facts survive restarts.
Safe process control — tracked jobs, timeouts, cancellation, and process-tree cleanup.
Optional durable sync — important facts can be shared through your own SSH host.
Explainable decisions — every automatic route includes the reason and candidate scores.
Related MCP server: memory-mcp
How it works
You
│
▼
Human-facing CLI (orchestrator)
│ MCP
▼
MindSync AI
├── capability router ──────► Codex / Claude / AGY / Gemini / Grok / Cursor / Aider
├── focus + conflict map
├── event bus + job records
└── local durable state ────► optional SSH/VPS truth storeThe orchestrator remains responsible for planning, authorization, integration, and the final answer. Delegated workers receive bounded tasks and cannot recursively delegate through MindSync.
Quick start
Install MindSync:
pip install mindsync-aiRun one-time onboarding:
mindsync setup --mode auto
mindsync doctorRestart the configured CLI sessions. From then on, the CLI can use MindSync automatically; the user does not need to name a worker for every task.
setup is idempotent. Existing MCP registrations are preserved unless --force is
explicitly supplied, and a non-mutating preview is available:
mindsync setup --dry-runRequires Python 3.10 or newer.
Install from source
git clone https://github.com/adityarya24/mindsync-ai.git
cd mindsync-ai
python -m pip install -e ".[dev]"Supported clients and workers
MindSync distinguishes an MCP host from a worker backend. A CLI may support one or both roles.
CLI | MCP host setup | Worker preset | Notes |
OpenAI Codex | Native | Built in | General coding, debugging, testing, and DevOps |
Anthropic Claude | Native | Built in | Architecture, reasoning, review, and large-context work |
Google Gemini CLI | Native | Built in | Alternate backend in the Gemini/Antigravity family |
Antigravity ( | Via Gemini CLI host | Built in | Preferred worker backend in the Gemini/Antigravity family |
Grok CLI | Native | Built in | Research, reasoning, review, and security-oriented work |
Cursor Agent | JSON setup | Built in | Coding and repository work |
Aider | — | Built in | Focused code editing worker |
Antigravity and Gemini CLI are two execution backends in one logical
gemini-antigravity family—not two separate logical agents. When either backend is
the human-facing orchestrator, MindSync excludes both from automatic worker selection
to prevent self-delegation.
Detected clients without a supported registration surface are reported but never modified through guessed or undocumented configuration.
Automatic orchestration
Static roles remain supported, but they are optional. Omitting agent from
delegate_task is equivalent to agent="auto".
delegate_task(
prompt="Audit authentication and report concrete vulnerabilities",
required_capabilities=["security", "review"]
)The router:
infers capabilities when none are supplied;
filters out missing CLIs and explicit exclusions;
excludes the human-facing agent family;
ranks eligible workers using capability weights and routing priority;
stores and returns the complete routing explanation.
Use route_task to preview a decision and list_agents to inspect the live worker
inventory.
Orchestration modes
Policy is stored in ~/.mindsync/orchestration.json.
Mode | Behaviour |
| Delegates useful work automatically and briefly announces it |
| Returns the recommended worker without launching a job |
| Disables automatic delegation; explicitly selected agents and roles still work |
Manage policy from the CLI:
mindsync config
mindsync config orchestration.mode suggest
mindsync config orchestration.announce false
mindsync config orchestration.maxParallel 4The default parallel limit is three automatically routed pending or running jobs. MindSync never retries a failed write-capable task on another worker automatically, preventing duplicate edits.
Custom workers
Add custom adapters to ~/.claude/agent-dispatch/agents.json:
{
"agents": [
{
"name": "my-worker",
"family": "my-provider-family",
"bin": "my-cli",
"input": "stdin",
"capabilities": ["general", "coding", "testing"],
"capabilityWeights": {"coding": 100, "testing": 90},
"routingPriority": 75
}
]
}Authentication remains the responsibility of each worker CLI.
Shared context and coordination
MindSync combines three coordination layers:
Layer | Responsibility |
Core | Local-first focus registry, conflict detection, durable facts, optional SSH sync |
Event bus | Typed |
Dispatch | Worker discovery, routing, execution, job review, cancellation, and cleanup |
A typical session uses:
get_sync_context(agent_name)to load current state and compiled truth.update_focus(...)before editing to detect overlapping work.delegate_task(...)for bounded work that benefits from another agent.queue_durable_fact(...)for high-confidence decisions worth retaining.sync_offline_facts(...)when an optional remote store comes back online.
MCP tools
MindSync exposes 20 tools.
Memory and focus
Tool | Purpose |
| Load local state and optionally refreshed remote truth |
| Claim project/file focus and receive overlap warnings |
| Write remotely or queue locally when offline |
| Flush queued facts and refresh compiled truth |
| Safely pull compiled-truth Markdown |
| Inspect paths, queue depth, policy, and remote reachability |
Event bus
Tool | Purpose |
| Publish a typed event |
| Read events after a sequence number |
| Subscribe an agent to selected event types |
Dispatch and orchestration
Tool | Purpose |
| Run an explicit or automatically selected worker |
| Preview automatic worker selection |
| Inspect availability, capabilities, families, and defaults |
| Read active delegation policy |
| Discover models exposed by worker CLIs |
| Inspect configured static roles |
| Reconcile and report job state |
| Hold the orchestration turn open until a background job finishes, then return its review |
| Read captured worker output |
| Read checks and Git-diff review results |
| Cancel a job and terminate its process tree |
Background completion ping
After delegate_task(..., background=True) returns a job ID, call
job_wait(job_id) immediately. The MCP call remains pending while the worker runs
and returns a completion ping with the mechanical review when the job reaches
done, failed, or cancelled. This keeps the orchestrator's turn alive and removes
the need for the user to ask for repeated status checks. If a job exceeds the wait
timeout, call job_wait again to continue watching it.
MCP servers cannot reopen a chat turn after the client has closed it, so the
orchestrator must start job_wait before ending its response.
Dispatch CLI
mindsync-dispatch agents
mindsync-dispatch models <agent>
mindsync-dispatch roles
mindsync-dispatch run auto "implement and test the fix" \
--capability coding --capability testing
mindsync-dispatch run codex "summarize README" \
--worktree --effort high --check "pytest -q"
mindsync-dispatch status
mindsync-dispatch review <job-id>
mindsync-dispatch result <job-id>
mindsync-dispatch cancel <job-id>Jobs live under ~/.claude/agent-dispatch/jobs/; override this with
AGENT_DISPATCH_HOME.
--worktree provides advisory isolation. Agents still run with the permissions of
the current user, so task wording and working-directory boundaries must agree.
Manual MCP configuration
If native setup is unavailable, register the server manually:
{
"mcpServers": {
"mindsync": {
"command": "python",
"args": ["-m", "mindsync.server"]
}
}
}On Windows, use the full path to the appropriate python.exe when client processes
do not share the same PATH.
Optional remote synchronization
Core coordination works without a network connection. To share durable facts through an always-on host, configure:
export MINDSYNC_SSH_HOST=my-server
export MINDSYNC_REMOTE_ROOT=/opt/mindsyncSSH must support non-interactive key authentication. See .env.example
and examples/remote/.
For a VPS + laptop setup:
deploy the scripts from
examples/remote/on the VPS;point the laptop at that host with the two variables above;
for sync-only use, leave remote variables empty on the VPS itself; remote dispatch submitters set only
MINDSYNC_REMOTE_ROOTso they write into that local durable store.
Remote Dispatch Queue & Worker
MindSync enables a remote orchestrator (e.g., running on a VPS) to submit work into a queue on the remote store, which a worker running on the local machine claims and executes within its own interactive session.
Submitting a job (remote side)
On the VPS, point only MINDSYNC_REMOTE_ROOT at the existing local durable-store root; no SSH
host is needed because the queue is local there.
export MINDSYNC_REMOTE_ROOT=/opt/mindsync
mindsync submit --repo /path/to/repo --prompt "implement feature" --agent codex
mindsync status <job-id>Remote jobs default to the safe worker execution mode. To run a configured
human-facing CLI as an orchestrator, opt in explicitly and name the agent (or
role) in the payload:
mindsync submit --repo /path/to/repo --prompt "plan and implement feature" \
--execution-mode orchestrator --agent <configured-orchestrator-agent>Or use a configured role instead: --execution-mode orchestrator --role <configured-role>.
Orchestrator submissions without an explicit --agent or --role are rejected.
An orchestrator job is accepted only when the local worker owner also enables
the boundary with MINDSYNC_WORKER_ALLOW_ORCHESTRATOR=true (or the one-shot
mindsync worker --once --allow-orchestrator / loop --allow-orchestrator
flag). The remote repository allow-list, branch check, write sandbox, and
result lifecycle apply in both modes. The orchestrator process is allowed to
use MindSync delegation; every child dispatch remains a depth-1 worker with
MINDSYNC_WORKER=1 and cannot delegate recursively. Legacy payloads without
the mode/depth fields remain worker jobs.
Running the worker (local side)
The workermust run in the user's interactive desktop session (for example, a normal PowerShell window). Do not launch it through SSH or as a Windows service in session 0, because tool sandboxes such as Codex's runner pipe require that interactive session.
Configure worker environment:
$env:MINDSYNC_SSH_HOST = "mindsync-vps"
$env:MINDSYNC_REMOTE_ROOT = "/opt/mindsync"
$env:MINDSYNC_WORKER_ALLOWED_ROOTS = "C:\work\project1;C:\work\project2"
# Optional, privileged local opt-in for explicit orchestrator payloads:
$env:MINDSYNC_WORKER_ALLOW_ORCHESTRATOR = "true"Keep a non-default SSH port in the selected host's ~/.ssh/config entry (this setup uses port
2422); MindSync intentionally has no separate port setting.
Start the worker loop:
mindsync workerOr process at most one job and exit:
mindsync worker --onceConfiguration
Variable | Default | Purpose |
|
| Local data root |
| empty | SSH host; empty disables remote sync |
| empty | Remote MindSync root |
|
| Remote environment file |
|
| Remote fact writer |
|
| Remote consolidation command |
|
| Compiled truth directory |
|
| SSH connection timeout in seconds |
|
| Age after which focus is ignored |
|
| Remote probe cache lifetime |
|
| Local lock wait in seconds |
|
| Worker identifier string |
|
| Worker poll interval in seconds |
|
| Stale claim threshold in seconds |
| empty | Semicolon- or comma-separated allow-list of repository roots the worker may execute in |
|
| Local opt-in required before an explicit remote orchestrator job can run |
Local data
By default, state is stored under ~/.mindsync:
~/.mindsync/
├── local-state.json active project and per-agent focus
├── local-audit.jsonl append-only action audit
├── offline_queue.jsonl durable facts waiting for remote sync
├── events.jsonl event bus
├── events.jsonl.seq monotonic sequence checkpoint
├── subscriptions.json event subscriptions
├── orchestration.json automatic delegation policy
├── compiled-truth/ pulled durable summaries
└── .locks/ kernel-managed lock filesSafety model
The human-facing CLI owns authorization, integration, and the final answer.
Delegated workers cannot recursively delegate through MindSync.
Automatic routing never expands the permissions granted by the user.
Setup preserves existing registrations and supports a non-mutating dry run.
Cursor configuration is merged atomically and backed up before forced replacement.
Local state uses crash-safe OS locks and atomic file replacement.
Remote identifiers are allowlisted; text is encoded safely before SSH transfer.
Pulled truth is treated as untrusted and validated before replacing local files.
Job cancellation terminates the spawned process tree.
MindSync runs with the privileges of the current user. Connect only trusted local
agents. See SECURITY.md for the complete security policy.
Development
python -m pip install -e ".[dev]"
python -m ruff check .
python -m pytest -q
python scripts/smoke_test.pyCI covers Python 3.10, 3.12, and 3.13 on Ubuntu and Windows.
Project structure
mindsync-ai/
├── mindsync/
│ ├── server.py FastMCP tools
│ ├── onboarding.py CLI discovery and safe registration
│ ├── orchestration.py persistent delegation policy
│ ├── storage.py atomic JSON/JSONL storage and locks
│ ├── bridge.py optional SSH/SCP transport
│ ├── bus/ typed local event bus
│ └── dispatch/ adapters, router, runner, jobs, and CLI
├── examples/remote/ optional remote-store scripts
├── tests/
└── pyproject.tomlUpgrading from the old
mindsync-mcppackage name? The PyPI package and repository are nowmindsync-ai; the Python import and CLI remainmindsync.
License
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityBmaintenanceA shared memory and coordination server for multiple AI coding agents, built on the Model Context Protocol (MCP).5MIT
- Flicense-qualityBmaintenanceA persistent, conflict-aware memory MCP server for AI coding assistants (Cursor, Claude Code).
- Alicense-qualityDmaintenanceMCP server that captures and recalls coding session memory (failures, decisions, diffs) for AI agents, enabling cross-agent continuity and preventing repeated mistakes.110MIT
- Alicense-qualityAmaintenanceA local-first MCP server for AI coding agents that shares structured execution state, routes context deltas, and provides preflight nudges to prevent conflicts and stale decisions.MIT
Related MCP Connectors
User-owned memory for AI agents, Copilot, Claude, IDEs, CLIs, and chat apps over remote MCP.
Private-by-default, local-first memory/context/task orchestrator for MCP apps and agents.
StremAI MCP: shared memory for AI coding agents. Connected agents can recall. OAuth + local stdio.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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-ai'
If you have feedback or need assistance with the MCP directory API, please join our Discord server