Skip to main content
MCP server CX Codex

speclock — Claude Code MCP server: what it does, how to install

Enforces rules written in CLAUDE.md and .cursorrules as active constraints. It intercepts edits and shell calls before they break project boundaries.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add speclock -- npx -y speclock
Open on GitHub

What speclock does

The server turns written guidance from CLAUDE.md and .cursorrules into hard boundaries for coding agents. Instead of literal keyword matches, it spots semantic violations. If your project forbids editing authentication, a request to add social sign-in will be blocked before any file changes. The package exposes 51 MCP tools and checks commands ahead of time.

Everything runs locally through npx with no account setup. Decisions are logged to an HMAC audit chain. Git hooks provide an extra checkpoint right before code commits.

Advisory mode is the starting state. It issues warnings without interrupting work. Hard blocking requires the --strict flag.

What it helps with

  • block unintended edits to sensitive project components
  • catch policy violations based on meaning rather than literal keywords
  • intercept forbidden shell commands before the agent executes them
  • enforce repository guidelines at the Git commit stage

Example prompts for the agent

  • Check if modifying the session handler violates rules in CLAUDE.md
  • Run speclock protect --strict to enable hard enforcement on this repository
  • Inspect all active constraint locks for the current project

How to install speclock

Platform CLI

claude mcp add speclock -- npx -y speclock

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about speclock

How to install speclock in Claude Code?

Run claude mcp add speclock -- npx -y speclock. The agent will connect to the server and register its tools.

What does speclock do?

It evaluates proposed agent actions against guidelines in CLAUDE.md or .cursorrules. When an edit or shell command conflicts with a rule, the server stops execution.

How do advisory and strict modes differ?

Advisory mode only displays conflict warnings. You need the --strict flag to actively reject conflicting file edits and shell commands.

Similar MCP servers

All MCP servers for Agent setup: memory, context, orchestration →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor