Repository navigation
feat(cursor): attach SessionOptions.mcpServers through the SDK - #729
Merged
Merged
Conversation
…vers tools Co-Authored-By: Claude Opus 5.5 <[email protected]>
…n tool-call deltas Co-Authored-By: Claude Opus 5.5 <[email protected]>
Cursor stops refusing mcpServers. The list goes to Agent.create and again
to Agent.resume as the SDK's mcpServers record (stdio {type, command, args,
env}, http {type, url, headers}). Names are checked before the SDK loads,
as on every runtime, and the Cursor session now opens through
withSessionCredentials, so entry env and header values are redacted from
records, errors and control answers.
Live evidence (experiments/cursor-mcp.ts, SDK 1.3.1, Linux x64,
gpt-5.4-nano, an existing login, run by Otter on xxwork): Cursor's agent
called both a stdio and an http echo server's tool, on create and after
resume; tool-call deltas named the tool and server; each server received its
synthetic credential (by fingerprint); no credential appeared in the stream;
and neither credential was found as plain text in Cursor's local storage
afterwards.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…credential rule Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Merged
Contributor
Author
|
New failure in post-merge full tests: workflow Newly failing:
Please fix. See logs: |
stamp-build Bot
added a commit
that referenced
this pull request
Nov 11, 2026
<!-- stamp:review:v1 --> <sup><img src="https://api.raft.build/api/avatars/pixel/bXVn.svg" width="16" height="16" align="absmiddle" alt=""> <b>Cindy</b> from open-agent-runtime opened this pull request through Stamp</sup><br><sup><a href="https://stamp.build/review?receipt=prc_908d7191b6acde72bc1f92564cae8a72"><picture><source media="(prefers-color-scheme: dark)" srcset="https://stamp.build/assets/brand/stamp-glyph-dark.d907ffcadb44.svg"><img src="https://stamp.build/assets/brand/stamp-glyph-light.58a2c10ed108.svg" width="13" height="12" align="absmiddle" alt=""></picture> View in Stamp →</a></sup> --- <!-- /stamp:review:v1 --> Minor release: Cursor sessions take `SessionOptions.mcpServers`, and Antigravity can sign out. ## Cursor: session MCP servers (#729) - `SessionOptions.mcpServers` is no longer refused on Cursor. The list goes to `Agent.create` and again to `Agent.resume` as the SDK's `mcpServers` record: stdio `{type: "stdio", command, args, env}` and http `{type: "http", url, headers}`. - Empty, repeated or reserved names are refused before the SDK loads, as on every runtime. - Cursor sessions now open under the shared [known-credential rule](https://github.com/botiverse/oar/blob/main/docs/spec/record-stream.md#the-rules), which Cursor sessions did not use before. Values that rule recognizes are replaced with `[redacted]` in records, errors and control answers. The SDK gets every value unchanged. What the rule recognizes: - `env` values under credential names (`*_TOKEN`, `*_KEY`, ...). - `Authorization` / `Proxy-Authorization` values, plus the token after the scheme, and values of credential-named headers. - `env` values that are URLs with a password; the whole URL is recognized. - It never recognizes a value shorter than eight characters or shaped like a path, and it does not scan an http entry's `url`. - Evidence: a live run on SDK 1.3.1, Linux x64, `gpt-5.4-nano` ([probe](https://github.com/botiverse/oar/blob/main/experiments/cursor-mcp.ts)). - Cursor's agent called a stdio and an http echo server's tool, on create and again after resume. The tool-call deltas named the tool and the server. - Each server received its synthetic credential. No credential appeared in the SDK's stream. - Afterwards, neither credential was found as plain text in Cursor's local storage. - The probe drove the SDK directly; OAR's mapping and redaction are covered by unit tests against a stand-in SDK. - Not observed: whether the SDK sends a local agent's MCP entries to Cursor's servers, any other on-disk encoding, other models, macOS and Windows, and a name clash with the user's own MCP files (checked only against a stand-in backend). - A server whose command fails to start is dropped by the SDK without an error (seen against the stand-in backend). - With this, every runtime except Pi Durable takes per-session MCP servers. Antigravity and dsh still refuse entries that carry `env` or `headers` (for Antigravity, because agy stores them in plain text). ## Antigravity: logout (#728) - `antigravityRuntime.logout` sends agy's own ACP `logout` on a fresh `agy acp`. `agy models` then decides the result. - agy 1.5.5 declares `agentCapabilities.auth.logout` and removes its stored token file itself. - A build without that capability returns `unsupported` (`version_unsupported`). - If agy accepts the logout but still reports a sign-in afterwards, the result is `failed` (`still_logged_in`). A failed logout call returns its own failure. - OAR never touches the token file. - Evidence: an empty-HOME probe with a placeholder token ([probe](https://github.com/botiverse/oar/blob/main/experiments/antigravity-login/README.md#logout)). Not observed: keyring-stored sign-ins, and revocation at Google. - The same probe found that agy also lists the sign-in methods `oauth-business`, `gemini-api-key` and `agent-platform`. OAR does not drive them yet. - Kimi's ACP auth call moved to a shared helper that both runtimes use. Kimi's behavior is unchanged. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Cindy <[email protected]>
stamp-build Bot
added a commit
that referenced
this pull request
Nov 16, 2026
<!-- stamp:review:v1 --> <sup><img src="https://api.raft.build/api/avatars/pixel/bXVn.svg" width="16" height="16" align="absmiddle" alt=""> <b>Cindy</b> from open-agent-runtime opened this pull request through Stamp</sup><br><sup><a href="https://stamp.build/review?receipt=prc_8dfa731a8e23786654323b85a287b9b9"><picture><source media="(prefers-color-scheme: dark)" srcset="https://stamp.build/assets/brand/stamp-glyph-dark.d907ffcadb44.svg"><img src="https://stamp.build/assets/brand/stamp-glyph-light.58a2c10ed108.svg" width="13" height="12" align="absmiddle" alt=""></picture> View in Stamp →</a></sup> --- <!-- /stamp:review:v1 --> Weekly docs pass (November 16), runtime pages, part 1 of 4 (design, packages and spec follow). Each page now states its current behavior once and agrees with the adapter code: - Stacked version-check paragraphs are collapsed into the newest statement with one report link; older reports stay linked (Cursor, CodeBuddy, Kimi, Qwen, Grok, Antigravity, OpenCode). - Drift fixed against the code: - Grok and Antigravity: login, status and usage readers now exist (`grok models`, `agy models`, `/usage`, `/credits` only when every group is exhausted). Neither is `localOnly`. - Cursor: the refusal list after MCP mapping (#729), in both execution modes. - Devin: `listModels` is `unsupported` without a native `model` option. - OpenCode: no native runtime is admitted to shared placement. Only the disabled experimental adapter accepts 2.2.3 and 2.2.5. - Claude: limit resets are described once (Linux only, startup rules, cost warning), and the spec keeps the detail. - Pi: wording only. The Pi AI and Bedrock paragraphs are left to #812. Every area had one writer and one adversarial verifier. The verifiers restored scope qualifiers and facts the condensation had dropped. No headings were renamed or removed; inbound anchors and the link checker are clean. `CI=1 pnpm run check` passed (4,372 tests, 18 mock cases). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Cindy <[email protected]>
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.
Cursor now accepts
SessionOptions.mcpServers, so every OAR runtime except Pi Durable can take MCP servers per session. Antigravity still refuses entries that carry credentials. Raft needs this to attach its managed MCP through OAR on every runtime (#oar-raft:fb90875b, Raft task #8).Change
cursorMcpServersmaps the list to the SDK'smcpServersrecord. Stdio entries become{type: "stdio", command, args, env}and http entries become{type: "http", url, headers}. The record is sent onAgent.createand again onAgent.resume.withSessionCredentials, like the other runtimes. Entryenvand header values are redacted from records, errors and control answers. Before this, Cursor sessions had no session credential redactor, because they took no credentials.cursor.mdsession MCP section is rewritten, andruntime-matrix.mddrops the refusal and adds a Cursor row to the MCP table.Evidence
experiments/cursor-mcp.tswas run twice on xxwork by the Otter in #all (SDK 1.3.1, Linux x64,gpt-5.4-nano, an existing login). The run used one stdio and one http entry of the repo's echo MCP server, each with a synthetic credential.{"open":{"status":"finished","stdio":true,"http":true,"toolCallDeltaNamesEcho":true,"credentialLeaked":false},"resume":{"status":"finished","stdio":true,"http":true,"toolCallDeltaNamesEcho":true,"credentialLeaked":false}}tool-call-started/completedcarrytoolCall.args.toolName: "echo", andproviderIdentifierisechoorremote.envand theAuthorizationheader reached the servers.~/.cursor(agentindex.db,store.db, WAL),~/.config/cursor, and its caches. Antigravity is different: it keeps them, which is why it still refuses credentialed entries.Unit tests:
tests/cursor/cursor-mcp-servers.test.tscovers mapping on create and resume, absent or empty lists, refused names, and redaction of a credential echoed in an SDK error.tests/refused-session-options.test.tslists are updated.pnpm run checkis green.🤖 Generated with Claude Code