mcp-lock-manager
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., "@mcp-lock-manageracquire lock on src/components/Header.tsx"
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.
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.
Related MCP server: asynkor
Setup
1. Install & Build
git clone https://github.com/maxwellplanck/mcp-lock-manager.git
cd mcp-lock-manager
npm install
npm run build2. 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 |
|
| Yes | Project-relative file paths (use forward slashes) |
|
| No | Label for this session (e.g. |
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 |
|
| 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
Available Tools
4 toolslock_acquireA
Acquire exclusive file locks. Fails with conflict details if any path is held by another live session. Always call this before editing files.
| Name | Required | Description | Default |
|---|---|---|---|
| owner | No | Optional label for this session (e.g. 'Agent A') | |
| paths | Yes | Project-relative file paths to lock (use forward slashes) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations, so description carries full burden. It discloses exclusivity and conflict failure mode, but doesn't specify lock lifecycle (e.g., auto-release).
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with main purpose, no wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Adequately covers tool purpose and behavior for a simple lock tool; could mention lock persistence, but sibling tools imply it.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
100% schema coverage; description adds context about path conflicts and exclusivity, enhancing understanding beyond schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool acquires exclusive file locks, distinguishing it from siblings like lock_release and lock_list.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides explicit guidance: 'Always call this before editing files.' Implicitly indicates when to use, but doesn't contrast with alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
lock_cleanupA
Force-remove all stale locks (dead PIDs). Use when lock_list shows locks with alive: false.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must fully disclose behavioral traits. It says 'Force-remove,' indicating destructive action, but does not detail permissions, side effects, or behavior in edge cases (e.g., no stale locks). This is adequate for a simple tool but lacks depth.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise at two sentences, with the action and usage guidance front-loaded. Every word adds value with no redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-parameter tool with clear sibling tools, the description is complete. It covers purpose and when to use, though it could optionally mention return values. The lack of output schema is acceptable given the tool's simplicity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There are zero parameters, and schema coverage is 100%. The description does not need to add parameter information. The baseline for 0 params is 4, and nothing is missing.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool removes stale locks (dead PIDs), differentiating it from siblings like lock_acquire, lock_list, and lock_release. It uses a specific verb and resource, with no ambiguity.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit usage context: 'Use when lock_list shows locks with alive: false.' It implies the precondition but does not exclude other use cases or mention when not to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
lock_listA
List all current file locks with owner, PID, timestamp, and alive status.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Description mentions output fields (owner, PID, timestamp, alive status) but does not disclose behavioral details like permissions required, performance impacts, or whether it shows a snapshot. With no annotations, this is a minimal but acceptable disclosure for a simple read-only tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence that immediately states the action and output details. No wasted words, front-loaded with the verb and resource.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no parameters, no output schema, and a simple listing operation, the description fully covers what the tool does and what it returns. No missing information.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
No parameters exist, so schema coverage is automatically 100%. The description adds valuable information about what the tool outputs, which is beyond the empty schema. Baseline for 0 parameters is 4, and the description's detail on output fields elevates it to 5.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clear verb 'list' specifies the action precisely, and the resource is 'current file locks' with enumerated details (owner, PID, timestamp, alive status). Differentiates from siblings which are mutating actions (acquire, cleanup, release).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit usage guidance or alternatives provided. However, the name and description imply it is for viewing current locks, and sibling tools are all mutating, so the purpose is distinct. Missing explicit 'when to use' or 'when not to use' statements.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
lock_releaseA
Release file locks. If paths are omitted, releases ALL locks for this session.
| Name | Required | Description | Default |
|---|---|---|---|
| paths | No | Paths to release, or omit to release all locks for this session |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses that omitting paths releases all locks for the session, which is critical behavioral context. It does not detail potential failure modes or return values, but for a simple release operation, this is adequate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences: the first states the primary action, the second provides the key condition on parameter omission. No redundant words, perfectly front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simple structure (one optional parameter, no nested objects, no output schema), the description sufficiently covers the tool's behavior. Could mention error handling or return format, but not essential for this tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with a description for 'paths'. The description adds the semantic nuance that omitting the parameter releases all locks, which goes beyond the schema's field description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's action ('Release file locks') and distinguishes between releasing specific paths versus all locks for the session. This differentiates it from siblings like lock_acquire and lock_list.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains when to omit the 'paths' parameter (to release all locks for the session), providing clear context. However, it does not explicitly state when to use this tool versus alternatives, though the purpose is implied by the sibling names.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
4 tool updates
v1.0.0- First observed
lock_acquire - First observed
lock_cleanup - First observed
lock_list - First observed
lock_release
TDQS
Each tool has a distinct purpose: acquire, release, list, and cleanup locks. No two tools overlap in functionality.
All tools follow a consistent verb_noun pattern (e.g., lock_acquire, lock_list), making them highly predictable.
Four tools cover the essential operations of a lock manager without unnecessary additions or gaps.
The set provides full lifecycle management: acquire, release (including bulk), list, and cleanup of stale locks. No obvious missing operations.
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 Connectors
- AxisOAuthdev.useaxis
Coding agents from Claude Code, Cursor and Codex claim jobs and lock files on one shared board.
Host files from coding agents; stage on a branch and attach to GitHub PRs.
Securely search and manage workspace context files for AI agents and teams.
The team layer for AI coding agents: shared contracts, collision alerts, E2EE sessions.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenancePrevents AI coding agents from conflicting by coordinating file claims and resolving conflicts in real-time across multiple sessions.3361MIT
- AlicenseNot gradedqualityDmaintenanceCoordination layer for AI coding agents working on the same codebase. Adds file locks, shared project memory, and cross-machine file sync so Claude Code, Cursor, Windsurf, and other MCP agents stop overwriting each other.50Apache 2.0
- AlicenseAqualityDmaintenancePrevents AI agents from overwriting each other's work by providing file locking and coordination via MCP tools.41MIT
- AlicenseNot gradedqualityAmaintenanceCoordinates parallel AI coding agents by providing task ownership, scoped file locks, handoffs, and verification workflows.MIT
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/maxwellplanck/mcp-lock-manager'
If you have feedback or need assistance with the MCP directory API, please join our Discord server