Agent MCP Server

Vendor-neutral MESI + optimistic-concurrency coordinator for multi-agent state — a stale write is denied or returned as a typed conflict, never

Local serverstdioPython

What is the Agent MCP server?

Vendor-neutral MESI + optimistic-concurrency coordinator for multi-agent state — a stale write is denied or returned as a typed conflict, never silently applied; safety invariants model-checked in TLA+. That is what the agent mcp server brings to an AI assistant: the same capability, reachable through the Model Context Protocol rather than a separate app or dashboard.

The short version

Two agents share an artifact — a plan.md, a store key, a memory.json. One reads it and works; meanwhile a peer commits a newer version; the first writes back anyway. Last write wins, the peer's work is silently gone, nothing errors, and every downstream decision builds on the wrong version. agent-coherence turns that silent clobber into a loud, typed refusal: MESI-style ownership and invalidation over shared artifacts, optimistic commit-CAS for concurrent writers, and a read-generation fence for crash-reclaimed ones — a stale write is denied or returned as a retryable conflict, never silently applied. Same

The tools it exposes

The server publishes 6 tools. What each one is for:

  • Workload — Agents
  • swg_read — Tracked read — registers the agent's view of the file
  • swg_write — Guarded write — a stale view or a foreign edit gets a typed stale_view deny with recover: reacquire, never a silent overwrite
  • swg_reacquire — Recovery — fresh identity + mandatory fresh read after a deny
  • swg_write_cas — Single-shot version-checked write for concurrent same-key contention
  • swg_status — Three-state coordination health: on / off / unknown

Getting it running

Setup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client. The configuration blocks on this page cover the common clients.

What it needs from you

Configuration is passed through the environment: SWG_ROOT. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

How it compares

Among the developer tooling options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Agent's toolset — Workload, swg_read, swg_write and 3 more — is a fair guide to whether it matches your workflow. It is maintained by agent-coherence contributors; worth a glance at recent repository activity before you build anything load-bearing on it.

This entry was verified against Agent's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.

Things to watch

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
WorkloadAgents
swg_readTracked read — registers the agent's view of the file
swg_writeGuarded write — a stale view or a foreign edit gets a typed stale_view deny with recover: reacquire, never a silent overwrite
swg_reacquireRecovery — fresh identity + mandatory fresh read after a deny
swg_write_casSingle-shot version-checked write for concurrent same-key contention
swg_statusThree-state coordination health: on / off / unknown

How to install the Agent MCP server

```json
{
  "mcpServers": {
    "stale-write-guard-fs": {
      "command": "stale-write-guard-fs",
      "env": { "SWG_ROOT": "/path/to/shared/workspace" }
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
SWG_ROOTConfiguration value read at startup.Optional

Example prompts to try

  • Use Agent to Workload.
  • Use Agent to swg read.
  • Use Agent to swg write.

Frequently asked questions

It connects Agent to MCP-compatible AI assistants such as Claude and Cursor, exposing 6 tools (Workload, swg_read, swg_write, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Agent directly.