crucible-mcp 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- crucible_mcp-0.1.0/PKG-INFO +158 -0
- crucible_mcp-0.1.0/README.md +141 -0
- crucible_mcp-0.1.0/pyproject.toml +51 -0
- crucible_mcp-0.1.0/setup.cfg +4 -0
- crucible_mcp-0.1.0/src/crucible/__init__.py +3 -0
- crucible_mcp-0.1.0/src/crucible/cli.py +523 -0
- crucible_mcp-0.1.0/src/crucible/domain/__init__.py +5 -0
- crucible_mcp-0.1.0/src/crucible/domain/detection.py +67 -0
- crucible_mcp-0.1.0/src/crucible/errors.py +50 -0
- crucible_mcp-0.1.0/src/crucible/knowledge/__init__.py +1 -0
- crucible_mcp-0.1.0/src/crucible/knowledge/loader.py +141 -0
- crucible_mcp-0.1.0/src/crucible/models.py +61 -0
- crucible_mcp-0.1.0/src/crucible/server.py +376 -0
- crucible_mcp-0.1.0/src/crucible/synthesis/__init__.py +1 -0
- crucible_mcp-0.1.0/src/crucible/tools/__init__.py +21 -0
- crucible_mcp-0.1.0/src/crucible/tools/delegation.py +326 -0
- crucible_mcp-0.1.0/src/crucible_mcp.egg-info/PKG-INFO +158 -0
- crucible_mcp-0.1.0/src/crucible_mcp.egg-info/SOURCES.txt +27 -0
- crucible_mcp-0.1.0/src/crucible_mcp.egg-info/dependency_links.txt +1 -0
- crucible_mcp-0.1.0/src/crucible_mcp.egg-info/entry_points.txt +3 -0
- crucible_mcp-0.1.0/src/crucible_mcp.egg-info/requires.txt +8 -0
- crucible_mcp-0.1.0/src/crucible_mcp.egg-info/top_level.txt +1 -0
- crucible_mcp-0.1.0/tests/test_cli.py +230 -0
- crucible_mcp-0.1.0/tests/test_detection.py +83 -0
- crucible_mcp-0.1.0/tests/test_integration.py +220 -0
- crucible_mcp-0.1.0/tests/test_knowledge.py +202 -0
- crucible_mcp-0.1.0/tests/test_server.py +60 -0
- crucible_mcp-0.1.0/tests/test_skills.py +197 -0
- crucible_mcp-0.1.0/tests/test_tools.py +77 -0
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: crucible-mcp
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Code review MCP server for Claude. Not affiliated with Atlassian.
|
|
5
|
+
Author: be.nvy
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Keywords: mcp,code-review,static-analysis,claude
|
|
8
|
+
Requires-Python: >=3.11
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
Requires-Dist: mcp>=1.0.0
|
|
11
|
+
Requires-Dist: pyyaml>=6.0
|
|
12
|
+
Provides-Extra: dev
|
|
13
|
+
Requires-Dist: pytest>=8.0; extra == "dev"
|
|
14
|
+
Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
|
|
15
|
+
Requires-Dist: mypy>=1.8; extra == "dev"
|
|
16
|
+
Requires-Dist: ruff>=0.3; extra == "dev"
|
|
17
|
+
|
|
18
|
+
# Crucible
|
|
19
|
+
|
|
20
|
+
Code review MCP server for Claude. Runs static analysis and loads review skills based on what kind of code you're looking at.
|
|
21
|
+
|
|
22
|
+
> **Note:** This project is not affiliated with Atlassian or their Crucible code review tool. Just an unfortunate naming collision.
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
26
|
+
│ Your Code ──→ Crucible ──→ Claude │
|
|
27
|
+
│ (analysis) (synthesis) │
|
|
28
|
+
│ │
|
|
29
|
+
│ .sol file ──→ slither, semgrep ──→ web3-engineer skill loaded │
|
|
30
|
+
│ .py file ──→ ruff, bandit ──→ backend-engineer skill loaded │
|
|
31
|
+
└─────────────────────────────────────────────────────────────────────────────┘
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
**MCP provides data. Skills provide perspective. Claude orchestrates.**
|
|
35
|
+
|
|
36
|
+
## Quick Start
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
# Install from PyPI
|
|
40
|
+
pip install crucible-mcp
|
|
41
|
+
|
|
42
|
+
# Or install from source
|
|
43
|
+
pip install -e ".[dev]"
|
|
44
|
+
|
|
45
|
+
# Install skills to ~/.claude/crucible/skills/
|
|
46
|
+
crucible skills install
|
|
47
|
+
|
|
48
|
+
# Install analysis tools for your stack
|
|
49
|
+
pip install semgrep ruff # Python
|
|
50
|
+
pip install slither-analyzer # Solidity
|
|
51
|
+
pip install bandit # Python security
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
> **Tools are separate by design.** Different workflows need different analyzers. Install what you need, skip what you don't. Crucible gracefully handles missing tools.
|
|
55
|
+
|
|
56
|
+
## MCP Setup
|
|
57
|
+
|
|
58
|
+
Works with any MCP client (Claude Code, Cursor, etc.). Add to your `.mcp.json`:
|
|
59
|
+
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"mcpServers": {
|
|
63
|
+
"crucible": {
|
|
64
|
+
"command": "crucible-mcp"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Then in Claude:
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
Review src/Vault.sol
|
|
74
|
+
|
|
75
|
+
→ Crucible: domains_detected: [solidity, smart_contract, web3]
|
|
76
|
+
→ Crucible: severity_summary: {critical: 1, high: 3}
|
|
77
|
+
→ Claude loads: web3-engineer, security-engineer skills
|
|
78
|
+
→ Claude synthesizes multi-perspective review
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## MCP Tools
|
|
82
|
+
|
|
83
|
+
| Tool | Purpose |
|
|
84
|
+
|------|---------|
|
|
85
|
+
| `quick_review(path)` | Run analysis, return findings + domains |
|
|
86
|
+
| `get_principles(topic)` | Load engineering knowledge |
|
|
87
|
+
| `delegate_*` | Direct tool access (semgrep, ruff, slither, bandit) |
|
|
88
|
+
| `check_tools()` | Show installed analysis tools |
|
|
89
|
+
|
|
90
|
+
## CLI
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
crucible skills list # List all skills
|
|
94
|
+
crucible skills show <skill> # Show which version is active
|
|
95
|
+
crucible skills init <skill> # Copy to .crucible/ for customization
|
|
96
|
+
|
|
97
|
+
crucible knowledge list # List all knowledge files
|
|
98
|
+
crucible knowledge init <file> # Copy for customization
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## How It Works
|
|
102
|
+
|
|
103
|
+
Crucible detects what kind of code you're reviewing, runs the right analysis tools, and returns findings with domain metadata. Claude uses this to load appropriate review skills.
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
.sol file → slither + semgrep → web3-engineer, gas-optimizer skills
|
|
107
|
+
.py file → ruff + bandit → backend-engineer, security-engineer skills
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
See [ARCHITECTURE.md](docs/ARCHITECTURE.md) for the full flow.
|
|
111
|
+
|
|
112
|
+
## Customization
|
|
113
|
+
|
|
114
|
+
Override skills and knowledge for your project or personal preferences:
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
# Customize a skill for your project
|
|
118
|
+
crucible skills init security-engineer
|
|
119
|
+
# Creates .crucible/skills/security-engineer/SKILL.md
|
|
120
|
+
|
|
121
|
+
# Add project-specific concerns, team conventions, etc.
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Resolution order (first found wins):
|
|
125
|
+
1. `.crucible/` — Project overrides
|
|
126
|
+
2. `~/.claude/crucible/` — User preferences
|
|
127
|
+
3. Bundled — Package defaults
|
|
128
|
+
|
|
129
|
+
See [CUSTOMIZATION.md](docs/CUSTOMIZATION.md) for the full guide.
|
|
130
|
+
|
|
131
|
+
## What's Included
|
|
132
|
+
|
|
133
|
+
**18 Review Skills** — Different review perspectives (security, performance, accessibility, web3, etc.)
|
|
134
|
+
|
|
135
|
+
See [SKILLS.md](docs/SKILLS.md) for the full list with triggers and focus areas.
|
|
136
|
+
|
|
137
|
+
**12 Knowledge Files** — Engineering principles for security, testing, APIs, databases, smart contracts, etc.
|
|
138
|
+
|
|
139
|
+
See [KNOWLEDGE.md](docs/KNOWLEDGE.md) for topics covered and skill linkages.
|
|
140
|
+
|
|
141
|
+
## Documentation
|
|
142
|
+
|
|
143
|
+
| Doc | What's In It |
|
|
144
|
+
|-----|--------------|
|
|
145
|
+
| [FEATURES.md](docs/FEATURES.md) | Complete feature reference |
|
|
146
|
+
| [ARCHITECTURE.md](docs/ARCHITECTURE.md) | How MCP, tools, skills, and knowledge fit together |
|
|
147
|
+
| [CUSTOMIZATION.md](docs/CUSTOMIZATION.md) | Override skills and knowledge for your project |
|
|
148
|
+
| [SKILLS.md](docs/SKILLS.md) | All 18 review personas with triggers and key questions |
|
|
149
|
+
| [KNOWLEDGE.md](docs/KNOWLEDGE.md) | All 12 knowledge files with topics covered |
|
|
150
|
+
| [CONTRIBUTING.md](docs/CONTRIBUTING.md) | Adding tools, skills, and knowledge |
|
|
151
|
+
|
|
152
|
+
## Development
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
pip install -e ".[dev]"
|
|
156
|
+
pytest # Run tests (263 tests)
|
|
157
|
+
ruff check src/ --fix # Lint
|
|
158
|
+
```
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# Crucible
|
|
2
|
+
|
|
3
|
+
Code review MCP server for Claude. Runs static analysis and loads review skills based on what kind of code you're looking at.
|
|
4
|
+
|
|
5
|
+
> **Note:** This project is not affiliated with Atlassian or their Crucible code review tool. Just an unfortunate naming collision.
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
9
|
+
│ Your Code ──→ Crucible ──→ Claude │
|
|
10
|
+
│ (analysis) (synthesis) │
|
|
11
|
+
│ │
|
|
12
|
+
│ .sol file ──→ slither, semgrep ──→ web3-engineer skill loaded │
|
|
13
|
+
│ .py file ──→ ruff, bandit ──→ backend-engineer skill loaded │
|
|
14
|
+
└─────────────────────────────────────────────────────────────────────────────┘
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
**MCP provides data. Skills provide perspective. Claude orchestrates.**
|
|
18
|
+
|
|
19
|
+
## Quick Start
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
# Install from PyPI
|
|
23
|
+
pip install crucible-mcp
|
|
24
|
+
|
|
25
|
+
# Or install from source
|
|
26
|
+
pip install -e ".[dev]"
|
|
27
|
+
|
|
28
|
+
# Install skills to ~/.claude/crucible/skills/
|
|
29
|
+
crucible skills install
|
|
30
|
+
|
|
31
|
+
# Install analysis tools for your stack
|
|
32
|
+
pip install semgrep ruff # Python
|
|
33
|
+
pip install slither-analyzer # Solidity
|
|
34
|
+
pip install bandit # Python security
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
> **Tools are separate by design.** Different workflows need different analyzers. Install what you need, skip what you don't. Crucible gracefully handles missing tools.
|
|
38
|
+
|
|
39
|
+
## MCP Setup
|
|
40
|
+
|
|
41
|
+
Works with any MCP client (Claude Code, Cursor, etc.). Add to your `.mcp.json`:
|
|
42
|
+
|
|
43
|
+
```json
|
|
44
|
+
{
|
|
45
|
+
"mcpServers": {
|
|
46
|
+
"crucible": {
|
|
47
|
+
"command": "crucible-mcp"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Then in Claude:
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
Review src/Vault.sol
|
|
57
|
+
|
|
58
|
+
→ Crucible: domains_detected: [solidity, smart_contract, web3]
|
|
59
|
+
→ Crucible: severity_summary: {critical: 1, high: 3}
|
|
60
|
+
→ Claude loads: web3-engineer, security-engineer skills
|
|
61
|
+
→ Claude synthesizes multi-perspective review
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## MCP Tools
|
|
65
|
+
|
|
66
|
+
| Tool | Purpose |
|
|
67
|
+
|------|---------|
|
|
68
|
+
| `quick_review(path)` | Run analysis, return findings + domains |
|
|
69
|
+
| `get_principles(topic)` | Load engineering knowledge |
|
|
70
|
+
| `delegate_*` | Direct tool access (semgrep, ruff, slither, bandit) |
|
|
71
|
+
| `check_tools()` | Show installed analysis tools |
|
|
72
|
+
|
|
73
|
+
## CLI
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
crucible skills list # List all skills
|
|
77
|
+
crucible skills show <skill> # Show which version is active
|
|
78
|
+
crucible skills init <skill> # Copy to .crucible/ for customization
|
|
79
|
+
|
|
80
|
+
crucible knowledge list # List all knowledge files
|
|
81
|
+
crucible knowledge init <file> # Copy for customization
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## How It Works
|
|
85
|
+
|
|
86
|
+
Crucible detects what kind of code you're reviewing, runs the right analysis tools, and returns findings with domain metadata. Claude uses this to load appropriate review skills.
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
.sol file → slither + semgrep → web3-engineer, gas-optimizer skills
|
|
90
|
+
.py file → ruff + bandit → backend-engineer, security-engineer skills
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
See [ARCHITECTURE.md](docs/ARCHITECTURE.md) for the full flow.
|
|
94
|
+
|
|
95
|
+
## Customization
|
|
96
|
+
|
|
97
|
+
Override skills and knowledge for your project or personal preferences:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
# Customize a skill for your project
|
|
101
|
+
crucible skills init security-engineer
|
|
102
|
+
# Creates .crucible/skills/security-engineer/SKILL.md
|
|
103
|
+
|
|
104
|
+
# Add project-specific concerns, team conventions, etc.
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Resolution order (first found wins):
|
|
108
|
+
1. `.crucible/` — Project overrides
|
|
109
|
+
2. `~/.claude/crucible/` — User preferences
|
|
110
|
+
3. Bundled — Package defaults
|
|
111
|
+
|
|
112
|
+
See [CUSTOMIZATION.md](docs/CUSTOMIZATION.md) for the full guide.
|
|
113
|
+
|
|
114
|
+
## What's Included
|
|
115
|
+
|
|
116
|
+
**18 Review Skills** — Different review perspectives (security, performance, accessibility, web3, etc.)
|
|
117
|
+
|
|
118
|
+
See [SKILLS.md](docs/SKILLS.md) for the full list with triggers and focus areas.
|
|
119
|
+
|
|
120
|
+
**12 Knowledge Files** — Engineering principles for security, testing, APIs, databases, smart contracts, etc.
|
|
121
|
+
|
|
122
|
+
See [KNOWLEDGE.md](docs/KNOWLEDGE.md) for topics covered and skill linkages.
|
|
123
|
+
|
|
124
|
+
## Documentation
|
|
125
|
+
|
|
126
|
+
| Doc | What's In It |
|
|
127
|
+
|-----|--------------|
|
|
128
|
+
| [FEATURES.md](docs/FEATURES.md) | Complete feature reference |
|
|
129
|
+
| [ARCHITECTURE.md](docs/ARCHITECTURE.md) | How MCP, tools, skills, and knowledge fit together |
|
|
130
|
+
| [CUSTOMIZATION.md](docs/CUSTOMIZATION.md) | Override skills and knowledge for your project |
|
|
131
|
+
| [SKILLS.md](docs/SKILLS.md) | All 18 review personas with triggers and key questions |
|
|
132
|
+
| [KNOWLEDGE.md](docs/KNOWLEDGE.md) | All 12 knowledge files with topics covered |
|
|
133
|
+
| [CONTRIBUTING.md](docs/CONTRIBUTING.md) | Adding tools, skills, and knowledge |
|
|
134
|
+
|
|
135
|
+
## Development
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
pip install -e ".[dev]"
|
|
139
|
+
pytest # Run tests (263 tests)
|
|
140
|
+
ruff check src/ --fix # Lint
|
|
141
|
+
```
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "crucible-mcp"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "Code review MCP server for Claude. Not affiliated with Atlassian."
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.11"
|
|
7
|
+
license = "MIT"
|
|
8
|
+
authors = [{ name = "be.nvy" }]
|
|
9
|
+
keywords = ["mcp", "code-review", "static-analysis", "claude"]
|
|
10
|
+
|
|
11
|
+
dependencies = [
|
|
12
|
+
"mcp>=1.0.0",
|
|
13
|
+
"pyyaml>=6.0",
|
|
14
|
+
]
|
|
15
|
+
|
|
16
|
+
[project.optional-dependencies]
|
|
17
|
+
dev = [
|
|
18
|
+
"pytest>=8.0",
|
|
19
|
+
"pytest-asyncio>=0.23",
|
|
20
|
+
"mypy>=1.8",
|
|
21
|
+
"ruff>=0.3",
|
|
22
|
+
]
|
|
23
|
+
|
|
24
|
+
[project.scripts]
|
|
25
|
+
crucible = "crucible.cli:main"
|
|
26
|
+
crucible-mcp = "crucible.server:main"
|
|
27
|
+
|
|
28
|
+
[build-system]
|
|
29
|
+
requires = ["setuptools>=61.0"]
|
|
30
|
+
build-backend = "setuptools.build_meta"
|
|
31
|
+
|
|
32
|
+
[tool.setuptools.packages.find]
|
|
33
|
+
where = ["src"]
|
|
34
|
+
|
|
35
|
+
[tool.ruff]
|
|
36
|
+
line-length = 100
|
|
37
|
+
target-version = "py311"
|
|
38
|
+
|
|
39
|
+
[tool.ruff.lint]
|
|
40
|
+
select = ["E", "F", "I", "N", "W", "UP", "B", "C4", "SIM"]
|
|
41
|
+
ignore = ["E501"]
|
|
42
|
+
|
|
43
|
+
[tool.mypy]
|
|
44
|
+
python_version = "3.11"
|
|
45
|
+
strict = true
|
|
46
|
+
warn_return_any = true
|
|
47
|
+
warn_unused_ignores = true
|
|
48
|
+
|
|
49
|
+
[tool.pytest.ini_options]
|
|
50
|
+
asyncio_mode = "auto"
|
|
51
|
+
testpaths = ["tests"]
|