Skip to content

v2.7.1 - OpenCode MCP Config Fix

Choose a tag to compare

@marcusquinn marcusquinn released this 04 Dec 02:16
· 25185 commits to main since this release

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.md
  • configs/mcp-templates/outscraper.json
  • configs/outscraper-config.json.txt