Skip to main content

Code review MCP server for Claude. Not affiliated with Atlassian.

Project description

Crucible

Your team's standards, applied by Claude, every time.

Claude without context applies generic best practices. Crucible loads your patterns—so Claude reviews code the way your team would, not the way the internet would.

├── Enforcement:   Pattern + LLM assertions that block bad code
├── Personas:      Domain-specific thinking (how to approach problems)
├── Knowledge:     Coding patterns and principles (what to apply)
├── Cascade:       Project → User → Bundled (customizable at every level)
└── Context-aware: Loads relevant skills based on what you're working on

Why Crucible?

  • Enforcement — Not suggestions, constraints. Assertions block code that violates your patterns
  • Consistency — Same checklist every time, for every engineer, every session
  • Automation — Runs in CI, pre-commit hooks, and Claude Code hooks
  • Institutional knowledge — Your senior engineer's mental checklist, in the repo
  • Your context — Security fundamentals plus your auth patterns, your conventions
  • Cost efficiency — Filter with free tools first, LLM only on what needs judgment

Not affiliated with Atlassian's Crucible.

Quick Start

pip install crucible-mcp

# Initialize your project
crucible init --with-claudemd

# Install enforcement hooks
crucible hooks install              # Git pre-commit
crucible hooks claudecode init      # Claude Code hooks

That's it. Crucible will now:

  1. Run on every commit (pre-commit hook)
  2. Review files Claude edits (Claude Code hook)
  3. Block code that violates bundled assertions (security, error handling, smart contracts)

How Enforcement Works

Claude writes code
    ↓
PostToolUse hook triggers
    ↓
Crucible runs pattern assertions
    ↓
Finding detected → Exit 2 (block) + feedback to Claude
    ↓
Claude fixes the issue

30 bundled assertions covering:

  • Security: eval, exec, shell injection, pickle, hardcoded secrets, SQL injection
  • Error handling: bare except, silent catch, empty catch blocks
  • Smart contracts: reentrancy, CEI violations, access control, tx.origin auth

Customize with your own assertions in .crucible/assertions/:

# .crucible/assertions/my-rules.yaml
version: "1.0"
name: my-rules
assertions:
  - id: no-console-log
    type: pattern
    pattern: "console\\.log\\("
    message: "Remove console.log before committing"
    severity: warning
    priority: medium
    languages: [javascript, typescript]

MCP Tools

Add to Claude Code (.mcp.json):

{
  "mcpServers": {
    "crucible": {
      "command": "crucible-mcp"
    }
  }
}
Tool Purpose
get_assertions() Session start: Load enforced patterns into context
get_principles(topic) Session start: Load engineering knowledge by topic
load_knowledge(files) Session start: Load specific knowledge files
review(path) Full review: analysis + skills + knowledge + assertions
review(mode='staged') Review git changes with enforcement
delegate_* Direct tool access (semgrep, ruff, slither, bandit)
check_tools() Show installed analysis tools

Tip: Call get_assertions() at the start of a session so Claude knows what patterns to avoid before writing code.

CLI

# Review
crucible review                     # Review staged changes
crucible review --mode branch       # Review current branch vs main
crucible review src/file.py --no-git # Review without git

# Assertions
crucible assertions list            # List all assertion files
crucible assertions test file.py    # Test assertions against a file

# Hooks
crucible hooks install              # Install pre-commit hook
crucible hooks claudecode init      # Initialize Claude Code hooks

# Customize
crucible skills init <skill>        # Copy skill for customization
crucible knowledge init <file>      # Copy knowledge for customization

# CI
crucible ci generate                # Generate GitHub Actions workflow

Customization

Everything follows cascade resolution (first found wins):

  1. .crucible/ — Project overrides (checked into repo)
  2. ~/.claude/crucible/ — User preferences
  3. Bundled — Package defaults

Override a skill:

crucible skills init security-engineer
# Edit .crucible/skills/security-engineer/SKILL.md

Add project knowledge:

crucible knowledge init SECURITY
# Edit .crucible/knowledge/SECURITY.md

Add custom assertions:

mkdir -p .crucible/assertions
# Create .crucible/assertions/my-rules.yaml

See CUSTOMIZATION.md for the full guide.

What's Included

30 Bundled Assertions — Pattern rules for security, error handling, and smart contracts.

18 Personas — Domain-specific thinking: security, performance, accessibility, web3, backend, and more.

14 Knowledge Files — Coding patterns and principles for security, testing, APIs, databases, smart contracts, etc.

See SKILLS.md and KNOWLEDGE.md for details.

Documentation

Doc What's In It
QUICKSTART.md 5-minute setup guide
FEATURES.md Complete feature reference
ARCHITECTURE.md How MCP, tools, skills, and knowledge fit together
CUSTOMIZATION.md Override skills and knowledge for your project
SKILLS.md All 18 personas with triggers and focus areas
KNOWLEDGE.md All 14 knowledge files with topics covered
CONTRIBUTING.md Adding tools, skills, and knowledge

Development

pip install -e ".[dev]"
pytest                    # Run tests (580+ tests)
ruff check src/ --fix     # Lint

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

crucible_mcp-1.1.0.tar.gz (131.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

crucible_mcp-1.1.0-py3-none-any.whl (122.8 kB view details)

Uploaded Python 3

File details

Details for the file crucible_mcp-1.1.0.tar.gz.

File metadata

  • Download URL: crucible_mcp-1.1.0.tar.gz
  • Upload date:
  • Size: 131.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for crucible_mcp-1.1.0.tar.gz
Algorithm Hash digest
SHA256 31aa0aae5d3af16624fec9a36358aebcd8b216d8a2a5bf855c54f83c4f4c58f3
MD5 2a8c6d88eb404c1e8f049ac4938d00ee
BLAKE2b-256 14cbcad759d8edbefee51a881c7ef1ac27713ac259f4c0568ace99a9c148e037

See more details on using hashes here.

Provenance

The following attestation bundles were made for crucible_mcp-1.1.0.tar.gz:

Publisher: publish.yml on b17z/crucible

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file crucible_mcp-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: crucible_mcp-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 122.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for crucible_mcp-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e1319919193df5eb1eb1166159f1098401480ae6ea0fedd739b5f36a903566c6
MD5 c17fa55d8efc2f1504d6eaf6011a455c
BLAKE2b-256 e5ed96018188b8d4befe104e10793997bbf0aee6cc17cfd37687b81825b58f8b

See more details on using hashes here.

Provenance

The following attestation bundles were made for crucible_mcp-1.1.0-py3-none-any.whl:

Publisher: publish.yml on b17z/crucible

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page