Skip to content

Extensions: OpenCode 2.x runtime (MCP servers, skills, ProPR MCP) #3844

Done

Description

@integry

Enable the extension library for OpenCode 2.x, which #3820 introduces. Verified live with OpenCode 2.4.2: stdio and bearer-auth HTTP MCP through OPENCODE_CONFIG_CONTENT both work (the HTTP log showed auth=ok), and skills through skills.paths work (the skill tool returned the bundle content). 2.x moved servers under mcp.servers; a flat 1.x-style mcp.<name> block is ignored.

Acceptance:

  • OpenCodeAgent.executeTask wraps execution in executeWithExtensions, with extensionAgentLaunch set.
  • Inline config: render into the inline config, merged with any existing config content:
    {"mcp":{"servers":{
      "<local>":{"type":"local","command":["/usr/local/bin/node","/opt/propr/extension-stdio-bridge.mjs","<bridgeConfig>"]},
      "<url>":{"type":"remote","url":"<gateway>/api/extensions/mcp/<name>","headers":{"Authorization":"Bearer {env:PROPR_EXTENSION_MCP_0_TOKEN}"}}
    }},
    "skills":{"paths":["/opt/propr/extensions"]}}
    • Stdio servers inherit the container env (verified), so pass the bridge secrets as -e NAME, never in arguments.
    • Bearer tokens use {env:VAR} substitution (verified); never write the token into config.
  • exclusiveMcp:
    • Set OPENCODE_DISABLE_CLAUDE_CODE=1 (or OPENCODE_DISABLE_CLAUDE_CODE_SKILLS=1) and OPENCODE_CONFIG_PROJECT_DISABLE=1.
    • Make sure the host opencode.json mcp.servers don't load: use a disposable config dir, as [Goal by GPT-6.2 Astra] Upgrade OpenCode from version 1 to 2 #3820's repository-scout path does, or override with empty mcp.servers. Test which is reliable on 2.4.2.
  • Skills: staged <id>/SKILL.md bundles load natively through skills.paths; keep the prompt pointer as a fallback.
  • ProPR MCP: the propr MCP server works through the same path.
  • Display: OpenCode 2 calls MCP tools through its execute code-mode tool (tools.<server>.<tool>()). Render those as readable tool events in persisted logs and the live view.
  • Capability map: turn on opencode only for CLI 2.x; 1.x stays unsupported.
  • Tests: a config snapshot for each server kind, with the token never in args or config; exclusive mode excluding host and project servers and ambient skills; a stub stdio server smoke test through the bridge.

Implementation

Requires #3820 (OpenCode 2.4.2) on main; build on it. Use the builder contract from the ext-shared issue.

Notes

ProPR runs on SQLite only: do not add code or tests for other databases.

Activity

  1. added and removed on Nov 27, 2026
  2. propr-dev commented on Nov 27, 2026

    @propr-dev
    Contributor

    🤖 AI processing has started for this issue using claude agent with claude-opus-5-5 model.

    I'll analyze the problem and work on a solution. This may take a few minutes.

    Processing Details:

    • Agent: claude
    • Model: claude-opus-5-5
    • Branch: 3844/claude-opus-5-5-extensions-opencode-2-x-r-20261127-2200-4tj
    • Base Branch: 3841-epic-extension-library-r77
    • Worktree: issue-3844-20261127-2200-claude-opus-5-5-4tj

    🔍 Track Task Execution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions