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

Doc Harness: A Claude Code Skill for Maintaining Project State Across Sessions
Tools

Doc Harness: A Claude Code Skill for Maintaining Project State Across Sessions

Doc Harness is a Claude Code skill that creates a lightweight documentation system with five structured files to help AI agents maintain project context across sessions. It addresses issues like context resets, forgotten rules, and the need to re-explain projects to new agents.

OpenClawRadar
onWatch: Open-source local API quota tracker with SQLite storage
Tools

onWatch: Open-source local API quota tracker with SQLite storage

onWatch is a local-first API quota tracker that stores all data in a local SQLite database with no cloud service, telemetry, or account creation. It's a single binary (~13MB) that runs as a background daemon using <50MB RAM and serves a dashboard on localhost.

OpenClawRadar
Portable Mind Format (PMF): Provider-Agnostic Agent Specification with 15 Open-Source Agents
Tools

Portable Mind Format (PMF): Provider-Agnostic Agent Specification with 15 Open-Source Agents

The Portable Mind Format (PMF) is a JSON-based specification for defining AI agent identities that can run across multiple models and providers, including Claude, GPT-4, Gemini, DeepSeek, and local models via Ollama. It includes 15 MIT-licensed production agents and converters for Claude Code, Cursor, GitHub Copilot, and Gemini CLI.

OpenClawRadar
CrabMeat v0.1.0: A Security-First Agent Gateway That Doesn't Trust the LLM with the Security Boundary
Tools

CrabMeat v0.1.0: A Security-First Agent Gateway That Doesn't Trust the LLM with the Security Boundary

CrabMeat v0.1.0 is a WebSocket gateway for agentic LLM workloads that enforces security at the architectural level: capability ID indirection, effect classes, IRONCLAD_CONTEXT pinned instructions, tamper-evident audit chain, streaming output leak filter, and no YOLO mode.

OpenClawRadar