---
name: "MCP tool for shell command execution"
---

# Story 347: MCP tool for shell command execution

## User Story

As a non-Claude agent connected via MCP, I want a shell command tool so that I can run cargo build, npm test, and other commands in my worktree.

## Acceptance Criteria

- [ ] run_command tool — executes a bash command and returns stdout/stderr/exit_code
- [ ] Command runs in the agent's worktree directory
- [ ] Supports timeout parameter (default 120s, max 600s)
- [ ] Sandboxed to worktree — cannot cd outside or access host paths
- [ ] Returns streaming output for long-running commands
- [ ] Dangerous commands blocked (rm -rf /, etc.)

## Out of Scope

- TBD
