# SpecForge

Converts team rules into deterministic compiler checks for AI coding agents, preventing skipped invariants and broken references.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed · ★ 27
- Author: leaderiop
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/leaderiop/SpecForge
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/mcp/specforge

## What it does

Agents often overlook instructions buried in Markdown documents or PRDs. SpecForge replaces loose text files with structured `.spec` definitions. The coding assistant drafts models, behaviors, and invariants, which the engine evaluates just like a code compiler.

Verification runs without any neural network, ensuring identical output on every execution. The CLI flags broken links, missing guarantees, and orphan events using distinct diagnostic codes like E003 or W007. Every diagnostic points directly to the offending line with an actionable suggestion.

After defining expectations, the workflow links test execution to stated contracts through `specforge collect`. You inspect proven criteria instead of auditing thousands of generated lines.

## Install

### Claude Code (native platform)

**Install**
- The MCP registry has no launch command for it: see the repository README

## When to use it
- validate references and events across `.spec` definitions
- catch contract omissions and typos before code generation
- map automated unit tests directly to architectural rules
- block agent progress when mandatory invariant fields are missing

## Example prompts
- Draft the payment logic in `spec/refund.spec` and run `specforge check`
- Resolve error E003 reported in `spec/hello.spec` based on the validator tip
- Collect contract verification results from unit tests with `specforge collect`

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
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
