Skip to content

MLD-1347 - Cursor rewrite mcp.json - #63

Open
arielamitjfrog wants to merge 5 commits into
mainfrom
feature/MLD-1347-cursor-rewrite-mcp-json
Open

MLD-1347 - Cursor rewrite mcp.json#63
arielamitjfrog wants to merge 5 commits into
mainfrom
feature/MLD-1347-cursor-rewrite-mcp-json

Conversation

@arielamitjfrog

@arielamitjfrog arielamitjfrog commented Aug 17, 2026

Copy link
Copy Markdown

Summary

  • On Cursor sessionStart, discover plugin mcp.json / .mcp.json under $CURSOR_CONFIG_DIR/plugins/local (plus this plugin’s own config) and run Agent Guard --rewrite-mcp-json so stdio MCP entries launch through @jfrog/agent-guard. Remote URL/HTTP/SSE/WS entries are left unchanged; workspace/user .cursor/mcp.json is out of scope.
  • Cursor-specific path discovery lives in scripts/ (cursor-mcp-json-discover.mjs + thin cursor-align-mcp-json.mjs adapter). Shared orchestration (project/server resolution, Step 0 gate, spawn/timeout, soft-fail) is vendored into modules/core/ from jfrog-agent-hooks MLD-1386 (a146a13), with rewrite budget set to 35s so it fits under the 45s hook timeout with gate overhead.
  • Soft-fails always (exit 0): kill switch JF_AGENT_REWRITE_MCP_JSON_DISABLE=1, missing project, gate failure, or rewrite errors. Bumps plugin/marketplace version to 0.5.14. Documents env vars and vendor layout in README / VENDOR.md; adds dest_prefix to modules sync config.

Related PRs:

Test plan

  • node --test plugins/jfrog/scripts/*.test.mjs
  • With Agent Guard enabled + JF_PROJECT (or project in existing _JF_ARGS), start a Cursor agent session and confirm the align hook runs without failing session start
  • Stdio MCP under ~/.cursor/plugins/local/*/mcp.json is rewritten through @jfrog/agent-guard; remote entries unchanged
  • This plugin’s own mcp.json is included; workspace/user .cursor/mcp.json is not
  • JF_AGENT_REWRITE_MCP_JSON_DISABLE=1 skips rewrite
  • Missing project / gate disabled → soft no-op (session continues)
  • After a successful rewrite, Developer: Reload Window picks up MCP config changes

@arielamitjfrog
arielamitjfrog requested a review from a team as a code owner August 17, 2026 09:28
@arielamitjfrog arielamitjfrog changed the title MLD-1347 - Cursor rewrite mcp json MLD-1347 - Cursor rewrite mcp.json Aug 17, 2026
Comment thread VENDOR.md Outdated
Comment thread plugins/jfrog/scripts/cursor-mcp-json-discover.mjs
Comment thread plugins/jfrog/modules/core/rewrite-mcp-json.mjs
Comment thread plugins/jfrog/hooks/hooks.json Outdated
Comment thread plugins/jfrog/scripts/cursor-mcp-json-discover.mjs
Comment thread plugins/jfrog/modules/core/rewrite-mcp-json.mjs
Comment thread plugins/jfrog/modules/core/rewrite-mcp-json.mjs
Comment thread plugins/jfrog/modules/core/rewrite-mcp-json.mjs
Comment thread plugins/jfrog/scripts/cursor-mcp-json-discover.mjs
Comment thread plugins/jfrog/scripts/cursor-mcp-json-discover.mjs Outdated
Comment thread plugins/jfrog/scripts/cursor-mcp-json-discover.mjs Outdated
Comment thread plugins/jfrog/scripts/cursor-mcp-json-discover.mjs Outdated
YoniMelki
YoniMelki previously approved these changes Aug 18, 2026
@arielamitjfrog

arielamitjfrog commented Aug 19, 2026

Copy link
Copy Markdown
Author

@shay-coh to align the Claude plugin behavior, I added a message when the process completes: JFrog Agent Guard secured your plugins' MCP servers. Open a new session to reconnect.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants