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

MCP Lets Claude Analyze Google Search Console Data Automatically
A new free MCP connects Claude directly to Google Search Console, enabling natural language queries on search performance data like queries, pages, clicks, and CTR without manual CSV exports.

Native macOS MCP Server for Full OS Control
A native macOS server provides 24 tools for pixel-accurate clicks, key combos, drag-and-drop, app management, multi-display support, and clipboard access. It's open source and works with Claude Code, Cursor, or any MCP client.

Reverse-Engineered Airtable Internal API Exposed via MCP: 60+ Tools for Claude Code
A developer reverse-engineered Airtable's internal API and built an MCP server with 60+ tools, letting Claude Code and 15+ IDEs control database views, computed fields, and extensions. Already used by 2000+ users, it's free and open source.

Local AI VS Code extension blocks insecure code generation during saves
A developer built a VS Code extension that runs llama3.1:8b-instruct-q4 locally to intercept saves, map source-to-sink execution flows, and block AI-generated insecure code like CWE-117 Log Injection vulnerabilities.