Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
6,000+ web scrapers for your AI agent, start free logo6,000+ web scrapers for your AI agent, start free

Apify gives your agent live web data: 6,000+ prebuilt scrapers and actors, MCP-ready. Sign up free with $5 in usage credits.

Try Apify free
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 48,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

Provides file-level exclusive locking across multiple Claude Code instances to prevent edit conflicts when multiple agents edit the same project simultaneously.

README.md

mcp-lock-manager

An MCP server that provides file-level exclusive locking across multiple Claude Code instances. Prevents conflicts when multiple agents edit files in the same project simultaneously.

How It Works

When multiple Claude Code sessions share a project, they can clobber each other's edits. This MCP server acts as a mutex — each session acquires a lock before editing a file and releases it when done. Locks are stored in a local .locks/ directory using atomic filesystem operations.

Stale locks from crashed sessions are automatically detected via PID liveness checks and cleaned up.

Setup

1. Install & Build

git clone https://github.com/maxwellplanck/mcp-lock-manager.git
cd mcp-lock-manager
npm install
npm run build

2. Configure Claude Code

Add to your .claude/settings.json (project or user-level):

{
  "mcpServers": {
    "lock-manager": {
      "command": "node",
      "args": ["/absolute/path/to/mcp-lock-manager/build/index.js", "--project-root", "/absolute/path/to/your/project"]
    }
  }
}

The --project-root flag tells the server which project directory to manage locks for. If omitted, it defaults to the current working directory.

You can also set the project root via environment variable:

{
  "mcpServers": {
    "lock-manager": {
      "command": "node",
      "args": ["/absolute/path/to/mcp-lock-manager/build/index.js"],
      "env": {
        "PROJECT_ROOT": "/absolute/path/to/your/project"
      }
    }
  }
}

Tools

lock_acquire

Acquire exclusive locks on one or more files before editing.

| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | paths | string[] | Yes | Project-relative file paths (use forward slashes) | | owner | string | No | Label for this session (e.g. "Agent A") |

Acquires all-or-nothing — if any file is already locked by another live session, the entire request fails with conflict details.

lock_release

Release file locks when done editing.

| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | paths | string[] | No | Paths to release. Omit to release all locks for this session. |

lock_list

List all active locks with owner, PID, alive status, and timestamp. Takes no parameters.

lock_cleanup

Force-remove all stale locks held by dead processes. Takes no parameters. Useful when lock_list shows locks with alive: false.

Adding to Your Workflow

For best results, add instructions to your project's CLAUDE.md telling Claude to use locks:

## File Locking

This project uses mcp-lock-manager for multi-session coordination.
Before editing any file, acquire a lock with `lock_acquire`. Release locks with `lock_release` when done.
If a lock conflict occurs, do not proceed — wait or ask the other session to release.

License

MIT

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Developer Tools servers.