Skip to content

Add VS Code and Cursor agent context integration - #697

Draft
clavery wants to merge 3 commits into
mainfrom
feat/vscode-agent-context
Draft

clavery wants to merge 3 commits into
mainfrom
feat/vscode-agent-context

Conversation

@clavery

@clavery clavery commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

Chat tools can resolve a different Commerce instance from the one selected in the IDE. This change exposes the extension's live instance selection, project/config paths, and code-sync status so assistants can use the current IDE target unless the user explicitly requests another one.

Experience VS Code Cursor
B2C Commerce MCP Provided by the IDE Extension Provided by the IDE Extension
Selected instance and code-sync status Attach #b2cContext in chat Ask the assistant to check IDE context
After switching instances Chat can check the new selection; MCP may need restarting Chat can check the new selection; MCP may restart

The assistant can use the IDE selection unless the user requests another target. Existing debug and log sessions remain on their original instance; restarting MCP ends them. Installation docs explain how to avoid duplicate B2C servers.

Remove the preview walkthrough, role-based onboarding panel, and agent-install instructions. Useful standalone setup commands remain available as beta features, disabled by default (b2c-dx.features.setup).

Includes documentation and changesets. Chat participants and dedicated tool/toolset selection settings remain future work.

Testing

  • Full workspace build and root pnpm run lint:agent passed.
  • Focused MCP tests: 45 passed.
  • VS Code extension and workspace regression tests: 71 passed, 2 expected pending.
  • Cursor 3.20.10 extension-host tests: 21 passed. No signed-in live model chat was exercised.
  • Compiled stdio smoke test verified tool discovery, differing MCP/IDE selections, explicit context forwarding, live selection changes, bridge shutdown errors, and absence of the bridge token in logs.
  • Documentation build and generated tooling-index verification passed. Documentation build retains existing TypeDoc and bundle-size warnings.
  • git diff --check passed.

For pre-release Cursor testing, set b2c-dx.mcp.command to node and b2c-dx.mcp.args to the absolute path of this checkout's built packages/b2c-dx-mcp/bin/run.js; the published MCP version does not yet include the bridge flag.

Dependencies

  • No net-new third-party dependencies were added
  • If net-new third-party dependencies were added, rationale/discussion is included and 3pl-approved is set by a maintainer

The MCP package adds a test-only reference to MSW, already used in the workspace and managed by the shared catalog. No new runtime dependency is added.


  • Relevant tests pass (targeted suites listed above; full pnpm test was not run)
  • Code formatting validated by repository lint

@github-actions github-actions Bot added the needs-3pl-review PR introduces net-new third-party dependencies and needs discussion label Sep 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-3pl-review PR introduces net-new third-party dependencies and needs discussion

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant