Skip to content

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

Merged
arielamitjfrog merged 9 commits into
mainfrom
feature/MLD-1347-cursor-rewrite-mcp-json
Aug 25, 2026
Merged

MLD-1347 - Cursor rewrite mcp.json#63
arielamitjfrog merged 9 commits into
mainfrom
feature/MLD-1347-cursor-rewrite-mcp-json

Conversation

@arielamitjfrog

@arielamitjfrog arielamitjfrog commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

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
shay-coh
shay-coh previously approved these changes Aug 18, 2026
@arielamitjfrog

arielamitjfrog commented Aug 19, 2026

Copy link
Copy Markdown
Contributor 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.

YoniMelki
YoniMelki previously approved these changes Aug 23, 2026
…D-1347-cursor-rewrite-mcp-json

# Conflicts:
#	.github/scripts/sync-modules-vendor.json
#	plugins/jfrog/modules/core/rewrite-mcp-json.mjs

@YoniMelki YoniMelki left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pull request does not change plugin.json or marketplace.json.
The two files stay at 0.5.17, the same as main.
Increase the version above 0.5.17 so that Cursor installs the change.

Comment thread plugins/jfrog/scripts/cursor-align-mcp-json.mjs Outdated
Comment thread plugins/jfrog/scripts/cursor-align-mcp-json.test.mjs Outdated
Comment thread VENDOR.md Outdated
Comment thread plugins/jfrog/scripts/cursor-mcp-json-discover.mjs Outdated
@arielamitjfrog
arielamitjfrog merged commit 5095f93 into main Aug 25, 2026
3 checks passed
@arielamitjfrog
arielamitjfrog deleted the feature/MLD-1347-cursor-rewrite-mcp-json branch August 25, 2026 14:33
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