Stop AI from breaking code you told it not to touch. Enforces .cursorrules, CLAUDE.md, and AGENTS.md — not just suggests. Zero-config: npx speclock
Stop AI from breaking code you told it not to touch. Enforces .cursorrules, CLAUDE.md, and AGENTS.md — not just suggests. Zero-config: npx speclock protect reads your existing AI rule files, extracts constraints, installs pre-commit hooks. That is what the speclock mcp server brings to an AI assistant: the same capability, reachable through the Model Context Protocol rather than a separate app or dashboard.
The server publishes 14 tools. What each one is for:
speclock_init — Initialize SpecLock in projectspeclock_get_context — Full context pack (the key tool)speclock_set_goal — Set project goalspeclock_add_lock — Add constraint + auto-guard filesspeclock_remove_lock — Soft-delete a lockspeclock_add_decision — Record architectural decisionspeclock_add_note — Add pinned notespeclock_set_deploy_facts — Record deploy configspeclock_check_conflict — Semantic conflict check against all locksspeclock_set_enforcement — Switch advisory/hard modespeclock_override_lock — Override with reason (audit logged)speclock_override_history — View override audit trailConfiguration is passed through the environment: SPECLOCK_ENCRYPTION_KEY. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.
speclock on npm is all you need. Most clients run it directly, so configuration is a few lines and a restart.
This sits in the developer tooling group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. Speclock's toolset — speclock_init, speclock_get_context, speclock_set_goal and 11 more — is a fair guide to whether it matches your workflow. It is maintained by sgroy10; worth a glance at recent repository activity before you build anything load-bearing on it.
We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.
| Tool | What it does |
|---|---|
| speclock_init | Initialize SpecLock in project |
| speclock_get_context | Full context pack (the key tool) |
| speclock_set_goal | Set project goal |
| speclock_add_lock | Add constraint + auto-guard files |
| speclock_remove_lock | Soft-delete a lock |
| speclock_add_decision | Record architectural decision |
| speclock_add_note | Add pinned note |
| speclock_set_deploy_facts | Record deploy config |
| speclock_check_conflict | Semantic conflict check against all locks |
| speclock_set_enforcement | Switch advisory/hard mode |
| speclock_override_lock | Override with reason (audit logged) |
| speclock_override_history | View override audit trail |
| speclock_semantic_audit | Analyze git diff against locks |
| speclock_detect_drift | Scan for constraint violations |
{
"mcpServers": {
"speclock": {
"command": "npx",
"args": ["-y", "speclock"],
"env": {
"SPECLOCK_ENCRYPTION_KEY": "your-value"
}
}
}
}Add to claude_desktop_config.json, then restart Claude Desktop.
| Variable | Description | Required |
|---|---|---|
| SPECLOCK_ENCRYPTION_KEY | Credential the server authenticates with. | Yes |
Kill hallucinated APIs — version-accurate, up-to-date library documentation injected straight into context.
Microsoft's official browser automation server — drive a real browser through the accessibility tree, no screenshots needed.
GitHub's official server — repos, issues, pull requests, Actions and code security, straight from your assistant.
Issue tracking at the speed of conversation — Linear's official hosted server with OAuth and zero install.
Local repository surgery — status, diffs, commits, branches and history for any repo on disk.
Timezone sanity for AI — current time anywhere and correct conversions, without the model doing date math.