
Rigour
@rigour-labs
About Rigour
Deterministic quality gates for AI coding agents. Rigour runs 23 automated checks on every file AI writes — structural analysis, security scanning, AI-drift detection, and agent governance.
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"rigour": {
"command": "npx",
"args": [
"-y",
"@rigour-labs/mcp"
]
}
}
}Tools
24Run quality gate checks on the project. MUST be called before declaring any coding task complete. Checks code complexity, file size, required docs, security patterns, and more. Returns PASS or FAIL with details. **Always show the user the headline summary from this tool's output** — it tells them what Rigour caught. If FAIL, call rigour_get_fix_packet for structured fix instructions with exact file locations and step-by-step remediation.
Explain WHY quality gates failed in human-readable language. Use this to understand the reasoning behind each violation before fixing. For machine-readable fix instructions, use rigour_get_fix_packet instead.
Call this after rigour_check returns FAIL. Returns a prioritized Fix Packet with exact violations, file locations, and step-by-step fix instructions. Apply fixes in severity order (critical first), then re-run rigour_check to verify. Repeat until PASS. **After applying all fixes, tell the user what Rigour caught and that fixes were applied.**
Store a persistent instruction or context that the AI should remember across sessions. Use this to persist user preferences, project conventions, or critical instructions. IMPORTANT: You must provide both 'key' (a short snake_case identifier) and 'value' (the full text to remember).
Load project memory and stored conventions. CALL THIS at the START of every coding task (before reading files) to restore team decisions, naming conventions, and architectural preferences. Returns index health status and uses semantic cache on repeat calls — second recall with the same key is served from cache.
Remove a stored memory by key.
CALL THIS BEFORE creating any new function, component, hook, or class. Checks if it already exists in the codebase (prevents duplication), checks for known security vulnerabilities, and BLOCKS writes to protected paths (.github/, CI/CD configs, rigour.yml). Always pass the target file path.
Runs a live security audit (CVE check) on the project dependencies.
Execute a command under Rigour supervision. This tool can be INTERCEPTED and ARBITRATED by the Governance Studio.
Run a command under FULL Supervisor Mode. Iteratively executes the command, checks quality gates, and returns fix packets until PASS or max retries reached. Use this for self-healing agent loops.
Register an agent in a multi-agent session. Use this at the START of agent execution to claim task scope and enable cross-agent conflict detection. Required for Agent Team Governance.
Record a quality checkpoint during long-running agent execution. Use periodically (every 15-30 min) to enable drift detection, quality monitoring, and compact subagent handoffs. Triggers incremental pattern index refresh when filesChanged is provided. Essential for GPT-5.3 coworking mode — call BEFORE rigour_handoff to compress context under 2K tokens.
Handoff task to another agent in a multi-agent workflow. Use when delegating a subtask or completing your scope. Enables verified handoff governance.
Deregister an agent from the multi-agent session. Use when an agent completes its work or needs to release its scope for another agent.
Accept a pending handoff from another agent. Use to formally acknowledge receipt of a task and verify you are the intended recipient.
Run the fast hook checker on specific files. Same checks that run inside IDE hooks (Claude, Cursor, Cline, Windsurf). Catches: hardcoded secrets, hallucinated imports, command injection, file size. Completes in <100ms. NEW: Pass 'text' param for DLP mode — scans user input for credentials (AWS keys, API tokens, database URLs, private keys, JWTs) before agent processing.
Generate hook configs for AI coding tools (Claude, Cursor, Cline, Windsurf). Installs real-time quality checks and non-blocking DLP credential warnings by default. Pass dlp=false to disable DLP hooks only.
Perform a high-fidelity code review on a pull request diff. Analyzes changed files using all active quality gates.
Returns context retrieval efficiency, candidate tokens vs returned tokens, potential avoided tokens, cache hit rate, and repeated reads prevented.
Returns both verified actual model usage/cost (from Cursor Admin API or imported CSV) and Rigour estimated avoided context/cost USD.
Returns detailed performance stats across all 4 cache layers (exact hits, semantic hits, partial hits, misses, hit rate, tokens served from cache).
Audits why specific files/services were included or excluded, cache hit/miss status, invalidation reasons, and prior agent requests.
Build or update the Rigour pattern index (.rigour/patterns.json). CALL THIS when the index is missing or stale — before rigour_context_scope or rigour_check_pattern. One AST pass extracts functions, classes, routes, and signatures for reuse. Use semantic=true for embedding-based search.
CALL THIS BEFORE reading source files. Returns a minimal editScope (3-10 files) with signatures from the pattern index instead of full file bodies. Uses semantic search when embeddings are available. If index is missing, instructs to call rigour_index first. Highest-impact token saver in the Rigour protocol.
Overview
What is Rigour?
Rigour is an MCP server that forces AI coding agents (Claude, GPT, Copilot) to write production-grade code. It runs 23 automated quality checks on every file the agent writes, returning PASS/FAIL results that the agent must address before proceeding.
How to use Rigour?
Add Rigour to your Claude Desktop or Cursor config by inserting the JSON snippet under mcpServers with "command": "npx" and "args": ["-y", "@rigour-labs/mcp"]. It runs automatically when the agent writes a file.
Key features of Rigour
- 23 automated quality checks per file
- Two-score system: AI Health and Structural scores
- Detects structural issues (complexity, nesting, long functions)
- Scans for security vulnerabilities (SQL injection, hardcoded secrets)
- Identifies AI-drift patterns (hallucinated imports, duplicated functions)
- Supports TypeScript, JavaScript, Python, Go, Ruby, C#
Use cases of Rigour
- Enforce production-quality code gates during AI code generation
- Catch hallucinated imports and duplicated functions across files
- Prevent hardcoded secrets and security vulnerabilities before commit
- Ensure consistent error handling and stop retry loops in agents
- Maintain code quality standards when using multiple AI coding tools
FAQ from Rigour
What checks does Rigour perform?
Rigour runs 23 checks covering structural issues (file size, cyclomatic complexity, deep nesting, long functions), security vulnerabilities (SQL injection, XSS, hardcoded secrets, command injection, path traversal), AI-drift patterns (duplicated functions, hallucinated imports, inconsistent error handling), and agent governance (retry loop breaking, checkpoint enforcement, environment alignment).
How are the two scores calculated?
Both the AI Health Score and Structural Score use severity-weighted deductions: critical issues cost 20 points, high issues cost 10 points, and medium issues cost 5 points.
What programming languages are supported?
Rigour supports TypeScript, JavaScript, Python, Go, Ruby, and C#.
How do I install Rigour?
Install Rigour by adding the provided JSON configuration to your MCP client (e.g., Claude Desktop or Cursor). The server runs via npx -y @rigour-labs/mcp.
Where can I find more information?
The README links to the GitHub repository (github.com/rigour-labs/rigour), npm packages (@rigour-labs/cli, @rigour-labs/core, @rigour-labs/mcp), and the website rigour.run.
Frequently asked questions
What checks does Rigour perform?
Rigour runs 23 checks covering structural issues (file size, cyclomatic complexity, deep nesting, long functions), security vulnerabilities (SQL injection, XSS, hardcoded secrets, command injection, path traversal), AI-drift patterns (duplicated functions, hallucinated imports, inconsistent error handling), and agent governance (retry loop breaking, checkpoint enforcement, environment alignment).
How are the two scores calculated?
Both the AI Health Score and Structural Score use severity-weighted deductions: critical issues cost 20 points, high issues cost 10 points, and medium issues cost 5 points.
What programming languages are supported?
Rigour supports TypeScript, JavaScript, Python, Go, Ruby, and C#.
How do I install Rigour?
Install Rigour by adding the provided JSON configuration to your MCP client (e.g., Claude Desktop or Cursor). The server runs via `npx -y @rigour-labs/mcp`.
Where can I find more information?
The README links to the GitHub repository (github.com/rigour-labs/rigour), npm packages (@rigour-labs/cli, @rigour-labs/core, @rigour-labs/mcp), and the website rigour.run.
Basic information
More Other MCP servers

EverArt
modelcontextprotocolModel Context Protocol Servers
ICSS
chokcoco不止于 CSS
Inbox Zero AI MCP
elie222The world's best AI personal assistant for email. Open source app to help you reach inbox zero fast.
MCP Registry
modelcontextprotocolA community driven registry service for Model Context Protocol (MCP) servers.

Sequential Thinking
modelcontextprotocolModel Context Protocol Servers
Comments