Crash-safe, cross-process lease locks backed by SQLite. Ships as a
dependency-free Python library (lockops) plus an optional MCP server
(lockops-mcp) so agents can acquire/renew/release locks over MCP.
uv add lockops # or: pip install lockopsThe core library has no third-party dependencies (pure sqlite3).
Install with the mcp extra — this is what puts a working lockops-mcp
command on your PATH, cross-platform:
uv tool install "lockops[mcp]" # recommended
# or: pipx install "lockops[mcp]"
# or from git: uv tool install "git+https://github.com/ofekron/lockops[mcp]"The
mcppackage is an optional dependency. Installing plainlockops(without[mcp]) will not provide a runnable server — always use[mcp]for the MCP server.
lockops-install # all detected hosts
lockops-install --list # see which hosts were detected
lockops-install --provider claude --provider cursor
lockops-install uninstall # removeSupported hosts: claude, codex, gemini (via each CLI's mcp add),
and claude-desktop, cursor, windsurf (via their JSON config), plus
--config-file <path> for any other MCP host. It registers the resolved
lockops-mcp command and preflight-checks that mcp is importable, so the
server a harness agent creates works as-is.
Manual registration — the entry is just:
{ "mcpServers": { "lockops": { "command": "lockops-mcp" } } }LOCKOPS_HOME— store directory (default~/.lockops).LOCKOPS_PRINCIPAL,LOCKOPS_OWNER_ID,LOCKOPS_CWD,LOCKOPS_PROVIDER_ID— identify the lock owner in multi-agent setups.
uv run --extra mcp --with pytest pytest