AI Constraint Engine β enforces CLAUDE.md and .cursorrules as laws. 51 MCP tools.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
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.
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.
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.
Run this from the project you want to protect:
When the advisory output looks right, enable blocking:
No account is required. SpecLock runs locally by default, and advisory mode never blocks a change.
Inside Claude Code, run:
Then protect the current project once:
The plugin automatically starts SpecLock's MCP server and checks Claude Code Write, Edit, and Bash actions before execution. It includes all 51 MCP tools and works alongside your existing CLAUDE.md.
SpecLock is packaged for multiple agent ecosystems, but the enforcement level depends on what each host exposes:
| Platform | Install/discovery path | Protection level |
|---|---|---|
| Claude Code | Native marketplace plugin above | Native pre-action checks for Write, Edit, and Bash |
| Gemini CLI | Install this repository as a Gemini extension | MCP-assisted checks plus project context |
| Cursor | Agent Plugin / Cursor marketplace package | MCP-assisted checks plus rules |
| Codex | Repository Codex plugin in plugins/speclock | MCP-assisted checks plus $speclock-guardrails skill |
| GitHub Copilot CLI | Add this repository as a plugin marketplace | MCP-assisted checks plus bundled plugin context |
| Cline | MCP server; curated marketplace submission in progress | MCP-assisted checks |
| Windsurf | speclock mcp install windsurf | MCP-assisted checks plus rules |
| Any Git client or CI | speclock protect | Commit/CI enforcement independent of the coding agent |
MCP-assisted means the agent can call SpecLock before acting; it does not guarantee interception. Use speclock protect --strict and CI when a constraint must be enforced regardless of the client.
SpecLock has a different job from memory and skills: memory recalls context, skills provide procedures, and SpecLock verifies planned actions against explicit constraints. It reduces constraint drift; it cannot guarantee factual correctness or make a model hallucination-free.
Repository installs supported by current clients:
| Capability | What it does |
|---|---|
| Pre-action checks | Reviews Claude Code writes, edits, and shell commands before they run |
| Semantic constraints | Detects synonyms, euphemisms, compound requests, and indirect violations |
| Git enforcement | Adds a second guard at commit time |
| Advisory and strict modes | Start with warnings; opt in to hard blocking when ready |
| Audit trail | Records decisions in a tamper-evident HMAC chain |
| MCP integration | Exposes 51 tools to Claude Code, Cursor, Codex, Windsurf, and Cline |
| Shareable save receipts | Shows what SpecLock prevented with speclock wins |
Full reference: npx speclock@latest help
$speclock-guardrails skill and pinned MCP server.
Smithery Β·
Badge gallery Β·
Sandeep Roy
AI coding tools have memory now. Claude Code has CLAUDE.md. Cursor has .cursorrules. Mem0 exists.
But memory without enforcement is useless.
Your AI remembers you use PostgreSQL β then switches to MongoDB because it "seemed better." Your AI remembers your auth setup β then rewrites it while "fixing" a bug. You said "never touch the payment logic" 3 sessions ago β the AI doesn't care.
Remembering is not respecting. No existing tool stops the AI from breaking what you locked.
You set constraints. SpecLock enforces them β across sessions, across tools, across teams.
The semantic engine doesn't do keyword matching. It understands:
And it knows what's safe:
Creates SPECLOCK.md, injects rules into package.json, generates .speclock/context/latest.md. The AI reads these automatically.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/speclock)<a href="https://allmcps.com/mcp/speclock"><img src="https://allmcps.com/api/badge/speclock?style=directory" alt="Speclock on AllMCPs" /></a>