Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LockOps

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.

Library

uv add lockops        # or: pip install lockops

The core library has no third-party dependencies (pure sqlite3).

MCP server

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 mcp package is an optional dependency. Installing plain lockops (without [mcp]) will not provide a runnable server — always use [mcp] for the MCP server.

Register it with your agent host

lockops-install                 # all detected hosts
lockops-install --list          # see which hosts were detected
lockops-install --provider claude --provider cursor
lockops-install uninstall       # remove

Supported 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" } } }

Configuration

  • LOCKOPS_HOME — store directory (default ~/.lockops).
  • LOCKOPS_PRINCIPAL, LOCKOPS_OWNER_ID, LOCKOPS_CWD, LOCKOPS_PROVIDER_ID — identify the lock owner in multi-agent setups.

Tests

uv run --extra mcp --with pytest pytest

About

Crash-safe cross-process lease locks backed by SQLite

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages