Lockstep for Claude Code
Lockstep briefs Claude Code on every binding decision through MCP, so the agent starts already knowing the constraints instead of rediscovering them one broken PR at a time.
What Lockstep captures from Claude Code
- binding decisions delivered via get_product_context
- constraints an agent must respect across repos
- drift flagged before the change ships
How the loop runs
Lockstep captures the decision from Claude Code, routes it to its owner for one-click confirmation that makes it binding, then briefs every engineer and every AI coding agent before they touch the code, and flags any pull request that drifts from it. See the full pipeline on how it works.
How to set up Lockstep for Claude Code
- Install the CLI with npm install -g lockstep-cli (or use npx lockstep-cli without a global install).
- Run lockstep login to authenticate with GitHub.
- Run lockstep onboard inside your repo. It previews the proposed Claude configuration changes, links the repo, scans it into lockstep.yaml, and lets you review up to five decision proposals.
- Open Claude Code and approve the project MCP server when prompted.
- Run lockstep status to see configuration, connection, and agent verification.
Install the MCP server
Lockstep's MCP server ships in the lockstep-cli npm package and runs over stdio as lockstep mcp. The recommended path is lockstep onboard, which wires up both the hooks and the MCP server.
Recommended: install and onboard
npm install -g lockstep-cli
lockstep login
lockstep onboardManual: add the MCP server with the Claude Code CLI
claude mcp add --env LOCKSTEP_VENDOR=claude-code --transport stdio lockstep -- npx -y lockstep-cli mcpOr commit it to your repo as .mcp.json
{
"mcpServers": {
"lockstep": {
"command": "npx",
"args": ["-y", "lockstep-cli", "mcp"],
"env": { "LOCKSTEP_VENDOR": "claude-code" }
}
}
}The manual routes give Claude Code the MCP tools. Session-start briefings come from the hooks that lockstep onboard installs.
Listed on the MCP registry as io.github.lockstep-team-agent/lockstep. Package on npm, source on GitHub.
Example: a decision captured from Claude Code
Illustrative example
In the session
You and Claude agree: "Use POST /session; POST /login is retired."
Drafted decision
Claude logs it with propose_decision: clients use POST /session, and POST /login is retired. It lands in the review queue.
Approved record
Once confirmed, tomorrow's fresh session receives it in its session-start briefing and writes the client against POST /session, without another explanation.
Access & trust
MCP server exposing get_product_context; read-only.
What Lockstep reads
- The decision record of the project your repo is linked to, through MCP tools such as get_product_context (read-only)
What Lockstep never does
- Storing your source code: decision packs stay local and Git-ignored
- Running hosted code checks unless you opt in (lockstep checks on); raw diff hunks are processed transiently, not stored
Full details on the security page.
Frequently asked questions
- How does Claude Code start a session already briefed?
- Lockstep hooks Claude Code's session start and delivers the binding decisions governing the code it's about to touch, ranked and truncated to what matters. Mid-session, the agent can call get_product_context whenever it needs more.
- What's the difference between this and a CLAUDE.md or AGENTS.md file?
- A static file is written once, goes stale, and is the same for every task. Lockstep's briefing is generated per session from the live, binding decision record, scoped to the surfaces being worked on, and backed by a PR check when something slips through.
- Are decisions the agent makes captured too?
- Yes. Claude Code is the one agent with automatic capture today. Choices it makes mid-session are recorded through the same MCP connection and land in the review queue for a human to confirm.
Related reading
Other integrations