
Speclock
If you've ever told an AI "don't touch the auth system" only to watch it refactor your auth logic three sessions later, this is the fix. SpecLock enforces constraints from CLAUDE.md and .cursorrules files as hard rules, not suggestions. It exposes 51 MCP tools that semantically analyze proposed changes and block violations before they happen. The engine catches euphemisms like "clean up old data" when you've locked deletion, and understands "streamline checkout" conflicts with "never touch payment flow". Ships with a pre-commit hook, auto-installer for Claude Code, Cursor, Windsurf, and a doctor command to verify everything is wired correctly. Default mode warns loudly without blocking, but strict mode stops the AI cold.
- GitHub stars
- 25
- tools
- 44
- transport
- STDIO
- last updated
- Apr 9, 2026
Tools
44 toolsPublic tool metadata for what this MCP can expose to an agent.
speclock_initInitialize SpecLock in the current project directory.
Initialize SpecLock in the current project directory.
No parameter schema in public metadata yet.
speclock_get_contextTHE KEY TOOL. Returns the full structured context pack.1 params
THE KEY TOOL. Returns the full structured context pack.
formatstringmarkdown · jsondefault: markdownspeclock_set_goalSet or update the project goal.1 params
Set or update the project goal.
textstringspeclock_add_lockAdd a non-negotiable constraint (SpecLock).3 params
Add a non-negotiable constraint (SpecLock).
sourcestringuser · agentdefault: agenttagsarraytextstringspeclock_remove_lockRemove (deactivate) a SpecLock by its ID.1 params
Remove (deactivate) a SpecLock by its ID.
lockIdstringspeclock_add_decisionRecord an architectural or design decision.3 params
Record an architectural or design decision.
sourcestringuser · agentdefault: agenttagsarraytextstringspeclock_add_noteAdd a pinned note for reference.2 params
Add a pinned note for reference.
pinnedbooleantextstringspeclock_set_deploy_factsRecord deployment configuration facts.5 params
Record deployment configuration facts.
autoDeploybooleanbranchstringnotesstringproviderstringurlstringspeclock_log_changeManually log a significant change.2 params
Manually log a significant change.
filesarraysummarystringspeclock_get_changesGet recent file changes tracked by SpecLock.1 params
Get recent file changes tracked by SpecLock.
limitintegerspeclock_get_eventsGet the event log, optionally filtered by type.3 params
Get the event log, optionally filtered by type.
limitintegersincestringtypestringspeclock_check_conflictCheck if a proposed action conflicts with any active SpecLock. In hard mode, blocks above threshold.1 params
Check if a proposed action conflicts with any active SpecLock. In hard mode, blocks above threshold.
proposedActionstringspeclock_session_briefingStart a new session and get a full briefing.1 params
Start a new session and get a full briefing.
toolNamestringclaude-code · cursor · codex · windsurf · cline · unknowndefault: unknownspeclock_session_summaryEnd the current session and record what was accomplished.1 params
End the current session and record what was accomplished.
summarystringspeclock_checkpointCreate a named git tag checkpoint for easy rollback.1 params
Create a named git tag checkpoint for easy rollback.
namestringspeclock_repo_statusGet current git repository status.
Get current git repository status.
No parameter schema in public metadata yet.
speclock_suggest_locksAI-powered lock suggestions based on project patterns.
AI-powered lock suggestions based on project patterns.
No parameter schema in public metadata yet.
speclock_detect_driftScan recent changes for constraint violations.
Scan recent changes for constraint violations.
No parameter schema in public metadata yet.
speclock_healthHealth check with completeness score and multi-agent timeline.
Health check with completeness score and multi-agent timeline.
No parameter schema in public metadata yet.
speclock_apply_templateApply a pre-built constraint template (nextjs, react, express, supabase, stripe, security-hardened).1 params
Apply a pre-built constraint template (nextjs, react, express, supabase, stripe, security-hardened).
namestringspeclock_reportViolation report — how many times SpecLock blocked changes.
Violation report — how many times SpecLock blocked changes.
No parameter schema in public metadata yet.
speclock_auditAudit staged files against active locks.
Audit staged files against active locks.
No parameter schema in public metadata yet.
speclock_verify_auditVerify the integrity of the HMAC audit chain.
Verify the integrity of the HMAC audit chain.
No parameter schema in public metadata yet.
speclock_export_complianceGenerate compliance reports (SOC 2, HIPAA, CSV).1 params
Generate compliance reports (SOC 2, HIPAA, CSV).
formatstringsoc2 · hipaa · csvspeclock_set_enforcementSet enforcement mode: advisory (warn) or hard (block).2 params
Set enforcement mode: advisory (warn) or hard (block).
blockThresholdintegermodestringadvisory · hardspeclock_override_lockOverride a lock with justification. Logged to audit trail.3 params
Override a lock with justification. Logged to audit trail.
actionstringlockIdstringreasonstringspeclock_semantic_auditSemantic pre-commit: analyzes code changes vs locks.
Semantic pre-commit: analyzes code changes vs locks.
No parameter schema in public metadata yet.
speclock_override_historyShow lock override history.1 params
Show lock override history.
lockIdstringspeclock_policy_evaluateEvaluate policy-as-code rules against proposed actions.2 params
Evaluate policy-as-code rules against proposed actions.
actionTypestringfilesarrayspeclock_policy_managePolicy CRUD: list, add, remove policy rules.1 params
Policy CRUD: list, add, remove policy rules.
actionstringlist · add · removespeclock_telemetryOpt-in usage analytics summary.1 params
Opt-in usage analytics summary.
actionstringstatus · enable · disable · reportspeclock_guard_fileAdd SPECLOCK-GUARD header to lock specific files.2 params
Add SPECLOCK-GUARD header to lock specific files.
filestringlockIdstringspeclock_auto_guardAuto-guard files related to lock keywords.
Auto-guard files related to lock keywords.
No parameter schema in public metadata yet.
speclock_add_typed_lockAdd typed constraint (numerical/range/state/temporal).6 params
Add typed constraint (numerical/range/state/temporal).
constraintTypestringnumerical · range · state · temporaldescriptionstringmetricstringoperatorstringunitstringvaluevaluespeclock_check_typedCheck proposed values against typed constraints.2 params
Check proposed values against typed constraints.
metricstringvaluevaluespeclock_list_typed_locksList all typed constraints with current thresholds.
List all typed constraints with current thresholds.
No parameter schema in public metadata yet.
speclock_update_thresholdUpdate typed lock thresholds dynamically.3 params
Update typed lock thresholds dynamically.
lockIdstringoperatorstringvaluevaluespeclock_compile_specCompile natural language (PRDs, READMEs) into structured constraints via Gemini Flash.2 params
Compile natural language (PRDs, READMEs) into structured constraints via Gemini Flash.
autoApplybooleantextstringspeclock_build_graphBuild/refresh code dependency graph from imports (JS/TS/Python).
Build/refresh code dependency graph from imports (JS/TS/Python).
No parameter schema in public metadata yet.
speclock_blast_radiusCalculate blast radius — transitive dependents, impact %, depth.1 params
Calculate blast radius — transitive dependents, impact %, depth.
filestringspeclock_map_locksMap active locks to actual code files via the dependency graph.
Map active locks to actual code files via the dependency graph.
No parameter schema in public metadata yet.
speclock_review_patchALLOW/WARN/BLOCK verdict — combines semantic conflict + lock-file mapping + blast radius.2 params
ALLOW/WARN/BLOCK verdict — combines semantic conflict + lock-file mapping + blast radius.
descriptionstringfilesarrayspeclock_review_patch_diffDiff-native review — parses actual diffs for interface breaks, protected symbols, dependency drift, schema changes.2 params
Diff-native review — parses actual diffs for interface breaks, protected symbols, dependency drift, schema changes.
descriptionstringdiffstringspeclock_parse_diffParse unified diff into structured changes — imports, exports, symbols, routes, schema detection.1 params
Parse unified diff into structured changes — imports, exports, symbols, routes, schema detection.
diffstringSponsors
Readme
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.
Details
- Repository
- github.com/sgroy10/speclock
- Package
speclock- Transport
- STDIO
- Registry
- MCP registry, active