MCP Architecture
Each workflow creates its own set of MCP server instances to ensure isolation and prevent race conditions.Server Lifecycle
src/ai/claude-executor.ts:59-114
Server Types:
- In-Process:
shannon-helper(native TypeScript server) - Stdio Subprocess: Playwright MCP servers (
playwright-agent1throughplaywright-agent5)
Shannon-Helper MCP Server
The shannon-helper server provides deliverable management and TOTP generation tools.Server Creation
mcp-server/src/index.ts:23-39
Factory Pattern Benefits:
- Each workflow gets its own server instance
targetDircaptured in closure prevents race conditions- No global state shared between parallel workflows
save_deliverable Tool
The primary tool for saving agent deliverables with automatic validation.Tool Schema
mcp-server/src/tools/save-deliverable.ts:30-34 and mcp-server/src/types/deliverables.ts
Implementation
mcp-server/src/tools/save-deliverable.ts:98-140
Path Traversal Protection
mcp-server/src/tools/save-deliverable.ts:42-90
Queue Validation
generate_totp Tool
Generates time-based one-time passwords for MFA/2FA authentication.Playwright MCP Servers
Shannon uses 5 isolated Playwright MCP server instances for browser automation during parallel agent execution.Agent-to-MCP Mapping
src/session-manager.ts:154-181
Isolation Benefits:
- Each vuln/exploit pair shares the same Playwright instance
- Browser state (cookies, localStorage) persists between vuln→exploit
- Parallel agents don’t interfere with each other’s browser sessions
- User data directories isolated per agent:
/tmp/playwright-agent1, etc.
Playwright MCP Configuration
src/ai/claude-executor.ts:76-108
Configuration Options:
--isolated: Fresh browser context per agent execution--user-data-dir: Persistent storage for cookies/localStorage--executable-path: Docker uses system Chromium, local uses downloaded browser--browser chromium: Explicit browser selection for DockerPLAYWRIGHT_HEADLESS=true: Runs without GUIPLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1: Docker has pre-installed browser
Browser Isolation Strategy
- Vuln and exploit agents for the same type share a Playwright instance
- Browser state persists between vuln→exploit (logged-in sessions, etc.)
- Separate processes prevent interference between different vulnerability types
- User data directories ensure cookie/storage isolation
