speclock

MCP.Pizza Chef: sgroy10

SpecLock helps you keep AI coding tools like Claude Code, Cursor, and Windsurf from making changes you don't want. It reads your project rules files and stops AI from editing protected parts of your code or running forbidden commands. You can start with warnings and later enable strict blocking. It works locally without accounts and integrates with popular AI coding assistants to keep your project safe and consistent.

Coding
Other

Use This MCP server To

Block AI from changing protected code sections Warn me before AI edits violate project rules Enforce coding constraints during commits Check if a planned AI action breaks project rules Add new constraints to protect project areas View audit logs of blocked AI actions Integrate rule enforcement with Claude Code and Cursor

README

SpecLock

Rules files tell AI what not to change.
SpecLock enforces them.

Stop Claude Code, Cursor, Codex, Windsurf, and other AI coding tools from crossing project constraints you already wrote in CLAUDE.md, AGENTS.md, and .cursorrules.

npm version npm downloads CI MIT License MCP 51 tools

Install · See a block · Claude Code plugin · Website · Saves Wall

Why another rules tool? Rules files are context. They can be forgotten, diluted, or overridden during a long coding session. SpecLock turns those rules into checks that run before edits, shell commands, and commits.

See the difference

CLAUDE.md:  Never modify the authentication system.

You:        Add social login to the login page.

Without SpecLock
Claude:     I'll update the auth flow and add an OAuth provider...

With SpecLock (strict mode)
SpecLock:   BLOCKED — conflicts with "Never modify the authentication system"
            Match: login → auth → authentication
            The action was denied before the files changed.

SpecLock uses semantic conflict detection rather than simple keyword matching. It catches indirect actions such as “clean up old patient data,” “streamline checkout,” or “temporarily disable MFA” when they violate an active constraint.

speclock FAQ

Can I use SpecLock to prevent AI from changing protected code sections?
Yes — SpecLock blocks AI coding tools like Claude Code and Cursor from modifying parts of your project you marked as off-limits.
Can SpecLock work with my existing AI coding tools like Claude Code or Cursor?
Yes — it integrates with popular clients such as Claude Code, Cursor, Windsurf, and Cline to enforce your project rules.
Do I need an account or API key to use SpecLock?
No — SpecLock runs locally and does not require any account or API key.
How hard is it to set up SpecLock?
It requires developer-level setup, including running commands and integrating with your coding environment.
Can SpecLock warn me before making changes that violate rules?
Yes — it has an advisory mode that warns you before blocking any changes.
Does SpecLock only block direct edits or also indirect changes?
It detects indirect conflicts too, like euphemisms or related changes that break your rules.
Can SpecLock enforce rules during commits?
Yes — it adds a second guard at commit time to prevent rule violations.
Is SpecLock compatible with multiple AI models?
Yes — it works with Claude, Codex, Gemini, and others through MCP integration.