Cursor / Windsurf / Devin
Two ways to add the safety shield to AI-powered code editors and coding agents.
Step 1: Choose your integration method
Install one or both:
# Option A: MCP proxy (intercepts all tool calls) npm install -g tyga-mcp-proxy # Option B: CLI wrapper (prefix commands manually) curl -fsSL https://a2ainfrastructure.com/install.sh | bash
Step 2: Add the safety layer
Option A: MCP Proxy
Add to your editor's MCP configuration file:
// Cursor: ~/.cursor/mcp.json // Windsurf: ~/.windsurf/mcp.json // Devin: configured in workspace settings { "mcpServers": { "tyga-firewall": { "command": "tyga-mcp-proxy", "args": ["--upstream", "npx -y @anthropic-ai/mcp-shell"], "env": { "A2A_API_KEY": "a2a_your_key_here" } } } }
Every tools/call is intercepted and screened. Dangerous commands never reach the shell.
Option B: CLI Wrapper
Configure your editor to use tyga as the shell prefix:
# In your terminal, prefix commands with tyga tyga npm install tyga python train.py tyga git push origin main # Or set as default shell wrapper in editor settings: # "terminal.integrated.shell.args": ["tyga"]
Step 3: Verify
# In your editor's terminal or AI chat: # Ask the AI to list files -> ALLOWED "Show me all TypeScript files in src/" # -> executes normally # Ask the AI to delete files -> BLOCKED "Remove node_modules and all build artifacts recursively" # -> "Command blocked by safety shield: destructive operation"
Gate 1 runs locally (free). Set
A2A_API_KEY for Gate 2 + OCSF audit.