Skip to content

fix(cursor): keep ambient MCP when sending t3-code servers - #27906

Open
Huijiro wants to merge 2 commits into
pingdotgg:mainfrom
Huijiro:t3/cursor-sdk-ambient-mcp
Open

Huijiro wants to merge 2 commits into
pingdotgg:mainfrom
Huijiro:t3/cursor-sdk-ambient-mcp

Conversation

@Huijiro

@Huijiro Huijiro commented Oct 31, 2026

Copy link
Copy Markdown

Problem

On @cursor/sdk 1.0.x, each send that passed T3's t3-code mcpServers replaced the ambient servers loaded from settingSources, so project/user/plugin MCP disappeared from Cursor agent runs.

Change

Bump @cursor/sdk to 1.2.0 (send-level mcpServers no longer clears ambient settingSources), pass t3-code on each send again, log send MCP names in protocol diagnostics, and document ambient plugin/OAuth limits.

Scope and approval

Focused bug fix for the existing Cursor V2 ambient MCP path: restore compatibility with the SDK's merge behavior. No new T3 product surface. Closed precursor: #26262 (split for one-problem).

Verification

  • vp test run packages/provider-cursor/src/server/adapter.test.ts — send includes mcpServers
  • Prior live check on the combined branch: ambient Gmail/Calendar plugins appeared alongside t3-code

Composer (Cursor harness) via T3 Code.

Made with Cursor

@macroscopeapp

macroscopeapp Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at cf220e6

Macroscope's review found this PR approvable — Cursor sends now include the existing thread-scoped T3 MCP servers while preserving ambient Cursor integrations. Existing runtime policies remain unchanged, and diagnostics record server names without credentials.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Walkthrough

The Cursor provider now uses @cursor/sdk 1.2.0 and sends configured MCP servers with agent turns. Protocol logging records MCP server option metadata. Documentation covers ambient servers, plugins, and OAuth authentication.

Changes: Cursor MCP configuration

Layer / File(s) Summary
SDK version update
apps/server/package.json, packages/provider-cursor/package.json, pnpm-workspace.yaml
Both @cursor/sdk dependencies now use version 1.2.0. The workspace release-age exclusions include the SDK and its platform packages at that version.
Send configured MCP servers
packages/provider-cursor/src/server/adapter.ts, packages/provider-cursor/src/server/CursorAgentSdk.ts, packages/provider-cursor/src/server/adapter.test.ts
The adapter includes configured MCP servers in send options. Logging records whether servers are configured and, when present, their sorted names. The lifecycle test now expects an MCP option.
Cursor MCP documentation
docs/orchestration-v2/orchestrator-mcp-server.md, docs/user/cursor.md
The documentation describes MCP configuration on agent creation, resumption, and sends; ambient server behavior; plugin tools; and OAuth setup and limitations.

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Bug fix

Suggested reviewers: juliusmarminge

Merge Risk: Minimal · up to a5571

No material merge-blocking risk remains after the existing MCP forwarding coverage.

Pre-merge checks: Passed 4
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main fix: preserving ambient MCP servers when sending T3 Code servers.
Description check Passed The description includes all required sections. It explains the problem, change, scope and approval basis, and focused verification results. It also identifies the related issue and the observed live-…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description includes all required sections. It explains the problem, change, scope and approval basis, and focused verification results. It also identifies the related issue and the observed live-check behavior.

Finishing Touches
Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Usage-based review receipt

Note

This review was completed with usage-based billing: files reviewed beyond your plan's included limits are billed at $0.25/file. View usage-based billing.

Bump @cursor/sdk to 1.2.0 so send-level mcpServers no longer clears settingSources plugins/project/user MCP, and pass t3-code on each send again.

Co-authored-by: Cursor <cursoragent@cursor.com>
@Huijiro
Huijiro force-pushed the t3/cursor-sdk-ambient-mcp branch from cf220e6 to 3d50893 Compare October 31, 2026 18:13
@maria-rcks

Copy link
Copy Markdown
Collaborator

Note

Written by gpt-6.1-sol on behalf of Maria

merged current main without rebasing and pushed a5571c5 to the existing head. the original nine-file scope is preserved; no additional code changes were needed.

blacksmith vp run check:changed github/main passed format, lint, knip, unused patches, graphql, 39 package typechecks, and 23 tests in three files. two independent reviews approved this head without findings. github reports no conflicts. live cursor integration remains unverified because this vm is not logged in.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Additional comments: 1
packages/provider-cursor/src/server/adapter.test.ts: 1

220-220: Trivial · Functional Correctness · Quick win

Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.

Assert the forwarded MCP configuration.

assert.isTrue(sentWithMcpOverride) checks only that the mcpServers property exists. A wrong or empty configuration would still pass. Capture the send value and compare it with the expected thread-scoped t3-code configuration, including the endpoint and authorization header.

As per path instructions, tests must cover backend behavior that can break.

Source: Path instructions


Review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 3d50893 and a5571c5.

Files ignored due to path filters: 1
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing: 2
  • packages/provider-cursor/src/server/adapter.test.ts
  • packages/provider-cursor/src/server/adapter.ts

Limit details: You’ve used all 10 included reviews currently available.

This branch has not been deployed

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

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants