Skip to content

Add support for Open Code #27

Closed
Closed

Description

@intellectronica

https://opencode.ai/

Activity

  1. 24601 commented on Jun 25, 2025

    @24601

    Oddly, the MCP schema for opencode is different from the standard (and in their JSON schema it seems like it's not the "familiar" JSON config format).

    For ex, a standard/familiar MCP server config:

    "browser-use": {
          "command": "uvx",
          "args": ["mcp-server-browser-use@latest"],
          "env": {
            "MCP_LLM_GOOGLE_API_KEY": "YOUR_KEY_HERE_IF_USING_GOOGLE",
            "MCP_LLM_PROVIDER": "google",
            "MCP_LLM_MODEL_NAME": "gemini-2.5-flash-preview-04-17",
            "MCP_BROWSER_HEADLESS": "true",
          }
        }
    

    in OpenCode would not validate against their schema (https://opencode.ai/config.json) and must be:

    "browser-use": {
          "command": ["uvx","mcp-server-browser-use@latest"],
          "environment": {
            "MCP_LLM_GOOGLE_API_KEY": "YOUR_KEY_HERE_IF_USING_GOOGLE",
            "MCP_LLM_PROVIDER": "google",
            "MCP_LLM_MODEL_NAME": "gemini-2.5-flash-preview-04-17",
            "MCP_BROWSER_HEADLESS": "true",
          },
          "type": "local"
        }
    

    Net of the incompatibilities (not just differences, it's not backwards compat/optional):

    1. command is an array, with all args in there, too, so:
    2. no args
    3. env is environment
    4. there must be an explicit type, and that type does not account for remote being either streamable http or SSE variants (although perhaps you can test/investigate that at run time and hope /sse in the URL gives you a hit as convention, but this isn't necessarily a standard).

    I'm not sure why they deviated here, and I don't find it to be more usable or specific, really. I love sst/opencode a lot, they're doing a great job, so maybe they had wisdom here I just can't decode. But, word of warning to any implementer (or if I get around to it, to me if I pick this up?).

    Image
  2. added a commit that references this issue on Jun 27, 2025
    a71553a
  3. added a commit that references this issue on Jul 24, 2025
    1c6377b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions