# SpecLock - AI Constraint Engine

The SpecLock - AI Constraint Engine MCP server stores project constraints, reviews proposed changes, and blocks conflicts. It fits AI coding workflows that need explicit guardrails.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · 3564 installs
- Author: sgroy10
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://smithery.ai/server/sgroy10/speclock
- Updated: 2026-02-25
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/speclock-ai-constraint-engine

## What it does

SpecLock keeps a project goal, design decisions, pinned notes, deployment facts, and non-negotiable constraints in one context store. Its 42 MCP tools can return that context, track changes, test a proposed action against active locks, and detect drift. Enforcement can warn or block.

The server also audits staged files, runs semantic checks before commits, records justified lock overrides, and creates named git checkpoints. It includes typed constraints, policy rules, an HMAC audit chain, compliance exports for SOC 2, HIPAA, and CSV, plus an import-based dependency graph for JS, TS, and Python. Converting PRDs or READMEs into structured constraints uses Gemini Flash. Hard mode blocks actions above its threshold, so rules need to match the project before enforcement is enabled.

## Requirements
- Remote server: `https://speclock--sgroy10.run.tools`

## Install

### Claude Code (native platform)

**Platform CLI: remote server**
```bash
claude mcp add --transport http speclock https://speclock--sgroy10.run.tools
```

### Codex

**Platform CLI: remote server**
```bash
codex mcp add speclock-ai-constraint-engine --url https://speclock--sgroy10.run.tools
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "speclock-ai-constraint-engine": {
            "url": "https://speclock--sgroy10.run.tools"
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "speclock-ai-constraint-engine": {
            "type": "http",
            "url": "https://speclock--sgroy10.run.tools"
        }
    }
}
```

### Gemini CLI

**Platform CLI: remote server**
```bash
gemini mcp add -t http speclock-ai-constraint-engine https://speclock--sgroy10.run.tools
```

## When to use it
- store non-negotiable project constraints
- check a proposed change against active locks
- spot requirement drift in recent changes
- audit staged files before a commit
- calculate the impact of a dependency change

## Example prompts
- Initialize SpecLock in the current project with `speclock_init`, then set the project goal.
- Add a database schema constraint with `speclock_add_lock` and check a proposed change using `speclock_check_conflict`.
- Run a semantic review of the staged changes with `speclock_semantic_audit`, then generate the result with `speclock_report`.

## Similar
- [speclock](https://affpapa.org/en/nevibecode/mcp/speclock.md) — MCP server · ★ 26 repo stars
- [constraint-driven-development](https://affpapa.org/en/nevibecode/skills/constraint-driven-development.md) — skill · 49100 installs
- [spec-engine](https://affpapa.org/en/nevibecode/plugins/spec-engine.md) — plugin · ★ 7 repo stars
- [multiview-constraint-solver](https://affpapa.org/en/nevibecode/skills/multiview-constraint-solver.md) — skill · 1300 installs
- [constraint-based-creativity](https://affpapa.org/en/nevibecode/skills/constraint-based-creativity.md) — skill · 115 installs
- [constraint-modeler](https://affpapa.org/en/nevibecode/commands/buildwithclaude-community-constraint-modeler.md) — command · ★ 3785 repo stars

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
