# Moth for OpenCode Requirement: Node.js with npm/npx available. OpenCode currently uses MCP config for this wrapper. Copy or merge `opencode.jsonc` into your project or user OpenCode config. No separate Moth core package is needed. This config runs the canonical npm package: ```bash npx -y @stfade/moth moth-mcp ``` Config: ```jsonc { "$schema": "https://opencode.ai/config.json", "mcp": { "moth": { "type": "local", "command": ["npx", "-y", "@stfade/moth", "moth-mcp"], "enabled": true } } } ``` Lifecycle rule: ```txt Use analyze_error before fixing. Call remember_fix_result only after a fix was attempted, a verification command was run, and the result is clearly passed or failed. Never call remember_fix_result for suggestions only. ```