feat(mcp): JFrog Platform remote MCP (token auth) + install hint#19
Merged
Conversation
In the same config hook that registers the vendored skills, inject
config.mcp.jfrog as an OpenCode remote MCP at https://<host>/mcp when both a
host (JFROG_URL / JF_URL / JFROG_PLATFORM_URL) and a token env (JFROG_ACCESS_TOKEN
/ JF_ACCESS_TOKEN) are present and JFROG_MCP_DISABLE is not set.
- Token auth, headless: oauth:false + Authorization: "Bearer {env:<TOKEN_VAR>}".
The {env:} reference keeps the raw token out of the config (logs/state/rotation).
- Idempotent and non-destructive: never clobbers a user-defined mcp.jfrog.
- URL normalization (strip scheme + trailing slash); pure sync mutation, no
network on load. Skips cleanly (log only) when unconfigured.
- Tests cover the full matrix; README documents setup, the JWT-token requirement,
and the JFROG_MCP_DISABLE opt-out.
Co-authored-by: Cursor <cursoragent@cursor.com>
Default-on for parity with the Cursor/Claude plugins; note the ~32K (OpenCode) / ~44K (Cursor) per-request tool-schema cost and the JFROG_MCP_DISABLE / tools scoping escape hatches. Skills do not carry this cost. Co-authored-by: Cursor <cursoragent@cursor.com>
…r + tests
- Inject the resolved Bearer token directly (OpenCode does not expand {env:} in
plugin-injected config), so the JFrog MCP actually authenticates headlessly.
- Just-in-time install-jf hint via tool.execute.before; MCP setup issues
(missing env, non-JWT token, 401) are surfaced by OpenCode's mcp list/TUI and
the README, with a debug WARNING for non-JWT tokens.
- Functional refactor (pure helpers) + unit tests for registration, gating,
idempotency, host/token precedence + normalization, and the install hint.
- README: JFrog MCP prerequisites, token handling, context cost, 401 troubleshooting.
Co-authored-by: Cursor <cursoragent@cursor.com>
YoniMelki
requested changes
Jun 28, 2026
YoniMelki
left a comment
Collaborator
There was a problem hiding this comment.
4 findings, 2 confirmed bugs + 2 design issues:
- Windows
commandExists(line 53):split(':')hardcodes Unix PATH separator;.exe/.cmdextension not probed.hasJfCliis always false on Windows. - Silent
http://→https://upgrade (line 97):normalizeHoststrips scheme,mcpServerEntryhardcodeshttps://. On-prem HTTP instances get a broken MCP URL with no warning. - No dedup guard on error toast (line 115): The
nudgeShownguard was removed with the info toast, but the broken-package error toast has no equivalent — it fires on every config call. registerMcpskipped when skills broken (line 196): Two independent features are coupled; a missingskills/dir silently prevents MCP registration.
…toast dedup, skills/MCP decoupling - commandExists: use path.delimiter and probe Windows .exe/.cmd/.bat - MCP base URL: preserve explicit http://, default https://, strip trailing slash - skills-not-found error toast/log deduped via module-level guard (once per session) - config hook registers skills and MCP unconditionally (independent features) Co-authored-by: Cursor <cursoragent@cursor.com>
YoniMelki
approved these changes
Jun 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the JFrog Platform remote MCP to the OpenCode plugin (token auth, headless), on top of the skills work (#16). When
JFROG_URL+JFROG_ACCESS_TOKENare set, the plugin registersconfig.mcp.jfrogso the JFrog platform tools appear in OpenCode alongside the skills.What changed
confighook:config.mcp.jfrog→ remotehttps://<host>/mcp,oauth:false,Authorization: Bearer <token>. Env-gated (host and token required), host precedenceJFROG_URL→JF_URL→JFROG_PLATFORM_URL+ scheme/trailing-slash normalization, idempotent (never clobbers a user-definedjfrog),JFROG_MCP_DISABLEopt-out. No network on load.{env:…}in config a plugin injects at runtime, so the plugin reads the token from the environment and sets the resolvedBearer <token>header directly. The token lives in the in-memory session config (sourced from env); the plugin never writes it to disk. Prefer a short-livedjf atctoken.jfhint: atool.execute.beforehook nudges once/session to install the CLI whenjfis missing and ajfcommand runs. MCP setup problems (missing env, non-JWT token,401) are surfaced by OpenCode's ownmcp list/TUI + the README — aWARNINGline is logged (debug) for a non-JWT token.resolveMcpCredentials,mcpServerEntry,commandExists,looksLikeJwt); unit tests for registration, gating, idempotency, host/token precedence + normalization, reference-token-still-registers, and the install hint.401troubleshooting.Verification
lint/typecheck/test(26 pass) /buildgreen;sync-skills:check+pack:checkpass.opencode mcp listshows✓ jfrog connected+jfrog_*tools; reference token →401(surfaced by OpenCode) + debugWARNING; no env → not registered;JFROG_MCP_DISABLE=true→ not registered.Notes
56 tools (+32K tokens/request; OpenCode has no lazy tool loading). Enabled by default for parity with the Cursor/Claude plugins; opt out withJFROG_MCP_DISABLE=trueor scope viatoolsglobbing.