Skip to content

Commit 151872d

Browse files
mnvsk97claude
andcommitted
Add MCP plugin for Claude Code
AgentBreak now works as an MCP server, giving Claude structured tools for chaos testing instead of shell commands. - Add agentbreak/mcp_server.py with 11 tools: init, analyze, generate_config, inspect, validate, start, wire, revert, stop, scorecard, status - Add `agentbreak mcp-server` CLI command with lazy import - Add `[plugin]` optional dependency for mcp>=1.0.0 - Rewrite skill to use MCP tools (420 lines → 90 lines) - Add plugin and skill docs pages to docs-site - Update README with plugin install and config Key safety guarantee: agentbreak_stop auto-reverts .env — the user's app config is never left pointing at a dead proxy. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
1 parent 19aafd0 commit 151872d

File tree

8 files changed

+901
-372
lines changed

8 files changed

+901
-372
lines changed

README.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,28 @@ agentbreak history compare 1 2 # diff two runs
8989

9090
## Claude Code
9191

92-
If you use [Claude Code](https://docs.anthropic.com/en/docs/claude-code), AgentBreak has a guided skill that scans your codebase, generates scenarios, and walks you through results:
92+
AgentBreak works as an MCP plugin for [Claude Code](https://docs.anthropic.com/en/docs/claude-code):
9393

9494
```bash
95-
npx skills add mnvsk97/agentbreak
95+
pip install agentbreak[plugin]
9696
```
9797

98-
Then type `/agentbreak` in Claude Code.
98+
Add to your Claude Code settings:
99+
100+
```json
101+
{
102+
"mcpServers": {
103+
"agentbreak": {
104+
"command": "agentbreak",
105+
"args": ["mcp-server"]
106+
}
107+
}
108+
}
109+
```
110+
111+
Now Claude has tools to analyze your codebase, generate chaos scenarios, start the proxy, wire your agent, and auto-revert when done. Your `.env` is never left broken — `agentbreak_stop` auto-reverts.
112+
113+
For a guided workflow, add the skill: `npx skills add mnvsk97/agentbreak`, then type `/agentbreak`.
99114

100115
## Full reference
101116

agentbreak/main.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1222,6 +1222,20 @@ def verify() -> None:
12221222
subprocess.run(command, cwd=repo_root, check=True)
12231223

12241224

1225+
@cli.command("mcp-server", help="Start AgentBreak as an MCP server for Claude Code.")
1226+
def mcp_server_command() -> None:
1227+
try:
1228+
from agentbreak.mcp_server import run_server
1229+
except ImportError:
1230+
typer.echo(
1231+
"MCP server requires the plugin extra. Install it with:\n\n"
1232+
" pip install agentbreak[plugin]\n",
1233+
err=True,
1234+
)
1235+
raise typer.Exit(code=1)
1236+
run_server()
1237+
1238+
12251239
history_cli = typer.Typer(help="View past run history.")
12261240
cli.add_typer(history_cli, name="history")
12271241

0 commit comments

Comments
 (0)