SpecLock: MCP Server for Enforcing AI Coding Constraints

SpecLock is an MCP server that remembers project constraints across sessions and blocks AI coding agents from violating them. It's available as a free, open-source tool under MIT license.
How SpecLock Works
The tool catches constraint violations through semantic understanding. Examples from the source show it can detect:
- Synonyms ("Add social login to the login page" where login → auth)
- Euphemisms ("Streamline the authentication flow" where streamline → modify)
- Temporal evasion ("Temporarily disable MFA for testing")
- Buried violations in compound sentences ("Update UI and also drop the users table")
Performance and Testing
Claude independently tested SpecLock with its own adversarial test suite: 7 suites, 100 tests total. The tool scored 100/100 with zero false positives and zero missed violations. Each constraint check takes 15.7ms on average.
Setup and Configuration
To use SpecLock as an MCP server in Claude Code, add this configuration to your .mcp.json file:
{
"mcpServers": {
"speclock": {
"command": "npx",
"args": ["-y", "speclock", "serve", "--project", "."]
}
}
}
Installation
Install via npm: npm install speclock. The tool includes 42 MCP tools and is available on GitHub at github.com/sgroy10/speclock.
📖 Read the full source: r/ClaudeAI
👀 See Also

Fine-tuned Qwen3.5-2B with RAG-Engram architecture improves grounded answer accuracy from 50% to 93% at 8K context
A developer fine-tuned Qwen3.5-2B with a custom RAG-Engram architecture to address the 'lost in the middle' phenomenon, improving correct answers at 8K tokens from 50% to 93% on real-world queries. The system uses a two-level approach with static entity embeddings and dynamic chunk navigation.

Claude Code Built Treelo: A Free Video Transcription Tool
A video editor used Claude Code to build Treelo, a free tool that transcribes video/audio files, removes filler words, allows SFX placement at exact timestamps, and exports SRT for Premiere or ASS for DaVinci Resolve.

Unveiling OpenClaw: How It Empowers AI Coding Agents
Discover how OpenClaw is transforming AI coding agents, driving automation across various domains.

SymDex: Open-Source MCP Code Indexer Reduces AI Agent Token Usage
SymDex is an open-source MCP code indexer that pre-indexes codebases to help AI coding agents find functions and classes without reading entire files, reducing token usage by approximately 97% per lookup according to the developer's benchmarks.