microsoft / microsoft/apm

[BUG] OpenCode MCP adapter rejects documented global user configuration

Open
#3,032 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
3.9k
Forks
365
Avg merge
1d 17h
Merged PRs (30d)
132

Description

Describe the bug

APM rejects an explicit global MCP installation for OpenCode even when the user's documented global OpenCode configuration already exists.

To Reproduce

Run:

$ apm install -g --target opencode \
    --mcp example --transport http --url https://example.com/mcp

Error: Selected targets are unavailable for user-scope MCP installation
(opencode; source: --target flag); choose a global-capable --target or omit --global

No OpenCode configuration is changed.

Expected behavior

apm install -g --target opencode should support MCP deployment to OpenCode's documented global configuration and preserve unrelated existing settings.

Project-scoped OpenCode installation should continue to use project opencode.json independently.

Environment (please complete the following information):

  • OS: macOS
  • Python Version: 3.14.7
  • APM Version: 0.31.0 installed with Homebrew
  • VSCode Version (if relevant): Not applicable

Logs

The complete relevant error is included in the reproduction above.

Additional context

APM's OpenCode adapter explicitly disables user scope, selects project-root opencode.json, and requires a project .opencode/ directory. The global MCP installer then rejects adapters without user-scope support.

OpenCode documents a supported user-level configuration model:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/apm_cli/adapters/client/opencode.py around lines 37-69 and src/apm_cli/integration/mcp_integrator_install.py around lines 570-600 to trace how target scope and the global-install rejection are determined. Reproduce the documented command, then verify that global OpenCode configuration is supported, unrelated settings are preserved, and project-scoped installation remains independent.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
74/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.