Claude Code Plugin
The SWEny plugin for Claude Code gives you slash commands, MCP tools, a startup hook, and an isolated agent — all from a single install. Instead of switching to your terminal, type /sweny:triage and Claude delegates the work to SWEny’s DAG executor.
Install
Section titled “Install”First add the SWEny marketplace, then install the plugin:
/plugin marketplace add swenyai/sweny/plugin install sweny@sweny-officialSkills
Section titled “Skills”| Skill | Description |
|---|---|
/sweny:triage |
Investigate production alerts, create issues, implement fixes |
/sweny:implement |
Pick up an issue and implement a fix |
/sweny:e2e-init |
Generate browser E2E test workflows |
/sweny:e2e-run |
Run E2E test workflows |
/sweny:workflow-create |
Generate a workflow from natural language |
/sweny:workflow-edit |
Edit a workflow with natural language |
/sweny:workflow-run |
Run any workflow from a YAML file |
/sweny:workflow-diagram |
Visualize a workflow as a Mermaid diagram |
/sweny:init |
Set up SWEny in the current project |
/sweny:check |
Verify provider credentials |
/sweny:setup |
Create labels in your issue tracker |
MCP tools
Section titled “MCP tools”The plugin also registers an MCP server that gives Claude tools for autonomous use: Claude can list, run, check and inspect workflows without you typing a slash command:
sweny_list_workflows— list available workflowssweny_run_workflow— execute triage or implement programmaticallysweny_validate: check a workflow file without running it (same checks assweny workflow validate)sweny_diagram: render a workflow as a Mermaid diagramsweny_runs: list recorded runs from.sweny/runs/sweny_runs_diff: compare two recorded runs (same JSON assweny runs diff --json)
The last four are read-only. They only read files inside the project the server was started in (traversal and symlinks that leave it are refused), and text read back from run history is stripped of control sequences.
- SessionStart — if a
.sweny.ymlexists, runssweny checkon startup to surface credential issues early
- sweny-workflow — long-running workflows (triage, implement, e2e-run, workflow-run) execute in a forked context using this agent, keeping your main conversation clean
Manual MCP setup
Section titled “Manual MCP setup”If you prefer to configure just the MCP server without the full plugin:
Why use SWEny as an MCP server?
Section titled “Why use SWEny as an MCP server?”Claude Code runs everything in a single conversation context. For complex tasks, that context gets bloated and unfocused. SWEny’s DAG executor solves this by splitting work into nodes — each node gets a focused context window with only the inputs it needs.
| Task type | Best approach |
|---|---|
| Simple, single-step tasks | Claude Code handles directly |
| Complex multi-step workflows | Claude delegates to SWEny via MCP |
SWEny handles the structured orchestration — conditional routing, scoped tool access, structured output schemas — that a single conversation can’t do reliably.
Claude Code
Section titled “Claude Code”Add to .claude/settings.json in your project:
{ "mcpServers": { "sweny": { "command": "npx", "args": ["-y", "@sweny-ai/mcp"] } }}Claude Desktop
Section titled “Claude Desktop”Add to your claude_desktop_config.json:
{ "mcpServers": { "sweny": { "command": "npx", "args": ["-y", "@sweny-ai/mcp"] } }}Prerequisites
Section titled “Prerequisites”- A
.sweny.ymlconfig file in the working directory (runsweny newto create one) - Credentials for your configured providers set via environment variables or
.env @sweny-ai/coreinstalled (provides theswenyCLI binary)
Available tools
Section titled “Available tools”sweny_list_workflows
Section titled “sweny_list_workflows”Lists built-in workflows (triage, implement, seed-content) and any custom workflows found in .sweny/workflows/*.yml.
| Parameter | Type | Required | Description |
|---|---|---|---|
cwd |
string | no | Working directory to search. Defaults to the server’s working directory. |
Example response:
[ { "id": "triage", "name": "Triage", "description": "Investigate alerts and create issues or PRs", "nodeCount": 8, "source": "builtin" }, { "id": "implement", "name": "Implement", "description": "Pick up an issue and implement a fix", "nodeCount": 5, "source": "builtin" }]sweny_run_workflow
Section titled “sweny_run_workflow”Executes a triage or implement workflow by spawning the sweny CLI. Returns structured JSON results when the workflow completes.
| Parameter | Type | Required | Description |
|---|---|---|---|
workflow |
"triage" or "implement" |
yes | Which workflow to run |
input |
string | for implement | Issue ID or URL (required for implement, ignored for triage) |
cwd |
string | no | Working directory containing .sweny.yml |
dryRun |
boolean | no | Skip side effects — investigate but don’t create issues/PRs |
How it works
Section titled “How it works”When Claude calls sweny_run_workflow, the MCP server:
- Spawns a separate
swenyCLI process — this avoids recursion (the MCP server runs inside Claude Code, but the workflow spawns its own Claude Code instance) - Passes
--json --stream— the CLI outputs NDJSON events as the DAG executes - Streams progress in real time — parses NDJSON events (
node:enter,node:progress,node:exit) and forwards them to Claude via MCP logging notifications - Returns the final result — the last JSON object from the stream, with success/failure status
The MCP server itself is stateless — each tool call is independent.
Relationship to MCP server auto-injection
Section titled “Relationship to MCP server auto-injection”SWEny has two MCP integration points — don’t confuse them:
| Concept | What it does | Docs |
|---|---|---|
| SWEny as MCP server (this page) | Exposes SWEny workflows as tools for Claude Code/Desktop | |
| MCP server auto-injection | SWEny injects external MCP servers (GitHub, Linear, etc.) into its own workflows | MCP Servers |
They complement each other: Claude Code calls SWEny via MCP, and SWEny’s workflows internally use other MCP servers to access external services.