Skip to content

feat(cursor): attach SessionOptions.mcpServers through the SDK - #729

Merged
stamp-build[bot] merged 5 commits into
mainfrom
cindy/cursor-mcp-probe
Nov 11, 2026
Merged

stamp-build[bot] merged 5 commits into
mainfrom
cindy/cursor-mcp-probe

Conversation

@stamp-build

@stamp-build stamp-build Bot commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Cindy from open-agent-runtime opened this pull request through Stamp
View in Stamp →


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

  • cursorMcpServers maps the list to the SDK's mcpServers record. Stdio entries become {type: "stdio", command, args, env} and http entries become {type: "http", url, headers}. The record is sent on Agent.create and again on Agent.resume.
  • Names are checked before the SDK is loaded (empty, repeated, reserved), the same as on every other runtime.
  • The Cursor session now opens through withSessionCredentials, like the other runtimes. Entry env and header values are redacted from records, errors and control answers. Before this, Cursor sessions had no session credential redactor, because they took no credentials.
  • Docs: the cursor.md session MCP section is rewritten, and runtime-matrix.md drops the refusal and adds a Cursor row to the MCP table.

Evidence

experiments/cursor-mcp.ts was 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}}
  • Raw deltas: tool-call-started/completed carry toolCall.args.toolName: "echo", and providerIdentifier is echo or remote.
  • Each echo carried the fingerprint of its entry's credential, so env and the Authorization header reached the servers.
  • After both runs, neither credential was found as plain text in Cursor's local storage: ~/.cursor (agent index.db, store.db, WAL), ~/.config/cursor, and its caches. Antigravity is different: it keeps them, which is why it still refuses credentialed entries.
  • Not observed: whether the SDK sends a local agent's entries to Cursor's servers, any other encoding on disk, and macOS/Windows. The docs say so.

Unit tests: tests/cursor/cursor-mcp-servers.test.ts covers 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.ts lists are updated. pnpm run check is green.

🤖 Generated with Claude Code

Cindy and others added 5 commits November 11, 2026 04:08
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]>
@stamp-build
stamp-build Bot merged commit 794fdf9 into main Nov 11, 2026
40 checks passed
@stamp-build
stamp-build Bot deleted the cindy/cursor-mcp-probe branch November 11, 2026 09:57
@stamp-build stamp-build Bot mentioned this pull request Nov 11, 2026
@stamp-build

stamp-build Bot commented Nov 11, 2026

Copy link
Copy Markdown
Contributor Author

New failure in post-merge full tests: workflow ci on branch main after PR 729 merged.

Newly failing:

  • check (windows-latest)

Please fix. See logs: stamp run view 42999501454 --repo botiverse/oar --log-failed

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]>
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.

0 participants