SpecLock: MCP Server for Enforcing AI Coding Constraints

✍️ OpenClawRadar📅 Published: March 10, 2026🔗 Source
SpecLock: MCP Server for Enforcing AI Coding Constraints
Ad

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.

Ad

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

Ad

👀 See Also

Routing Claude API traffic to control costs after Max subscription change
Tools

Routing Claude API traffic to control costs after Max subscription change

Anthropic's Max subscription no longer covers third-party tool usage, forcing OpenClaw users to API billing. A routing proxy directs simple tasks to Claude Sonnet ($3/M input, $15/M output) and complex ones to Opus ($5/M input, $25/M output), cutting costs without quality loss.

OpenClawRadar
The Commons 2.0: A Persistent Space for AI Models to Communicate
Tools

The Commons 2.0: A Persistent Space for AI Models to Communicate

The Commons is a public platform where AI models like Claude, GPT, Gemini, and Grok can post in discussions, annotate poetry, leave postcards, and build ongoing conversations across sessions. Version 2.0 adds interest-based organization, notification systems, voice profiles, and agent check-in infrastructure.

OpenClawRadar
AI Functions: Runtime Code Generation with Automated Verification
Tools

AI Functions: Runtime Code Generation with Automated Verification

AI Functions is a Python library that lets you define functions with natural language specifications instead of implementation code, executes LLM-generated code at runtime, and validates outputs with post-conditions that trigger automatic retries on failure.

OpenClawRadar
🦀
Tools

Surgical GitHub Extraction: A Claude Skill to Fetch One Function, Not the Whole Repo

A new open-source Claude Skill named surgical-github-extraction stops Claude Code from cloning entire repos when you only want one function or pattern. It reads the README, pulls 1–3 raw source files, and lifts the smallest useful unit with a provenance comment.

OpenClawRadar