v2.7.1 - OpenCode MCP Config Fix
Fixed
OpenCode MCP Config Validation Error - Fixed invalid env key in MCP configuration
Problem
OpenCode does not support the env key for MCP server configurations, causing validation errors:
Config file at /Users/marcusquinn/.config/opencode/opencode.json is invalid
↳ Unrecognized key: "env" mcp.outscraper
Solution
Changed from invalid format with env key to bash wrapper pattern for environment variable passing:
"outscraper": {
"type": "local",
"command": ["/bin/bash", "-c", "OUTSCRAPER_API_KEY=$OUTSCRAPER_API_KEY uvx outscraper-mcp-server"],
"enabled": true
}Files Changed
.agent/scripts/generate-opencode-agents.sh.agent/tools/data-extraction/outscraper.mdconfigs/mcp-templates/outscraper.jsonconfigs/outscraper-config.json.txt