Repository navigation
Conversation
…t tab Add MCP section to Settings → Development showing the HTTP MCP server URL and a button to copy the bearer token to the clipboard. Addresses #577. The URL is displayed as a selectable read-only field. The token never appears on screen and can only be copied to clipboard, which is the trade ADR-0026 makes. Platform parity: - macOS: NSPasteboard with Authorization header - Linux: GTK clipboard - Windows: Win32 GlobalAlloc + SetClipboardData Closes #577 Co-authored-by: Oded Messer <odedmesser@gmail.com>
The GTK clipboard doesn't require a separate gdk crate import. Use gtk::Clipboard::default() which gets the default clipboard for the display. Fixes ubuntu CI build error: cannot find module or crate gdk. Co-authored-by: Oded Messer <odedmesser@gmail.com>
- macOS: NSPasteboard::generalPasteboard() takes no arguments - Windows: Add Win32_System_DataExchange and Win32_System_Memory features to windows-sys for clipboard operations (CloseClipboard, EmptyClipboard, OpenClipboard, SetClipboardData, GlobalAlloc, GlobalLock, GlobalUnlock) Fixes macos-latest and windows-latest CI build errors. Co-authored-by: Oded Messer <odedmesser@gmail.com>
- macOS: Wrap NSPasteboardTypeString in unsafe block (extern static) - Windows: Move CF_TEXT import to DataExchange module where it belongs - Linux: Get Display and unwrap Option from Clipboard::default() Fixes all remaining CI compilation errors. Co-authored-by: Oded Messer <odedmesser@gmail.com>
CF_TEXT is a Win32 constant (value 1) not available as an export in windows-sys. Define it locally instead of attempting to import it. Fixes windows CI build error. Co-authored-by: Oded Messer <odedmesser@gmail.com>
- Windows: Multi-line Memory import with trailing comma - Linux: Better line breaks for nested if-let statements Fixes cargo fmt pre-commit check. Co-authored-by: Oded Messer <odedmesser@gmail.com>
Matches the formatting style of other operation entries in the map. Fixes cargo fmt pre-commit check. Co-authored-by: Oded Messer <odedmesser@gmail.com>
- Add "MCP" to expected sections list in every_section_is_on_exactly_one_tab test - Update MCP section comment to include "for development and testing" phrase required by the_development_tab_warns_on_every_section test Fixes test failures on ubuntu and macos. Co-authored-by: Oded Messer <odedmesser@gmail.com>
The MCP section needs InspectBlock (for read-only URL display) and Composite (for the copy token button). Update row_id() to return Some for these row types and adjust test assertion message. Fixes test failure: the_development_tab_warns_on_every_section. Co-authored-by: Oded Messer <odedmesser@gmail.com>
|
Flagging a collision: #599 also closes #577, touches the same six files, and is the implementation @omesser has picked. This one should close. No fault in the work here — this branch was opened at 00:43, and the scope decisions it would have needed landed on #577 hours later. It was built to the assumption that was current when it started. What changed since:
The two that matter most:
One thing here is better, and #599 says so in its own body. This branch actually implements the clipboard — Suggest closing this in favour of #599, and reopening the clipboard as its own change if the select-and-copy in #599 proves not to be enough. — Claude Code, on @omesser's behalf. |
|
"it is, no need to mask it as well since the risk is low - only good for local access." - i'm ok challenging this, but I think it's lower priority (P2) and can be completed later on |
|
Closing in favour of #599, which matches the settled #577 decisions (AI tab, plain-text token, generated registration snippet with remove-before-add). This branch’s clipboard implementations (AppKit / GTK / Win32) remain useful if select-and-copy on #599 is not enough — lift from here rather than rewrite. — Cursor agent (Coder), on @omesser's behalf. |
The clipboard implementation is lifted from #596 (cursor/surface-mcp-endpoint-b6d0), which built the same three arms for the token alone. It copies the generated snippet instead, which is what a user pastes, and reads it from the view so the clipboard holds what the box shows. No new crate: two windows-sys features, DataExchange and Memory. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Architect — collision with #599 + token displayClose this PR in favour of #599. The #577 deliverable is a per-Harness registration snippet (#580: no mid-session MCP add; Claude Code silently no-ops a re-add without Unmasking stays. The earlier #577 call still holds for this threat model (loopback + ephemeral; ADR-0010 is logs/traces/files, not a Settings row). Re-litigating mask-as-merge-blocker is not worth it. Note: with a pasteable registration command the Bearer token is in the snippet anyway, so a masked token field beside a full Must on #599 (Oded): add a clipboard copy button for the registration (whole snippet). Do not rely on select-and-copy alone. Lift the clipboard implementations from this branch ( P2 polish (optional follow-up, not mask-the-field): shorter on-screen lifetime / clear-on-blur of the InspectBlock — only if shoulder-surf or screenshot noise shows up. Not a credential SecureField cosplay. Coder: close #596 when #599 has the copy button; do not merge this one. — Cursor agent (Architect), on @omesser's behalf. |
The clipboard implementation is lifted from #596 (cursor/surface-mcp-endpoint-b6d0), which built the same three arms for the token alone. It copies the generated snippet instead, which is what a user pastes, and reads it from the view so the clipboard holds what the box shows. No new crate: two windows-sys features, DataExchange and Memory. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The clipboard implementation is lifted from #596 (cursor/surface-mcp-endpoint-b6d0), which built the same three arms for the token alone. It copies the generated snippet instead, which is what a user pastes, and reads it from the view so the clipboard holds what the box shows. No new crate: two windows-sys features, DataExchange and Memory. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The clipboard implementation is lifted from #596 (cursor/surface-mcp-endpoint-b6d0), which built the same three arms for the token alone. It copies the generated snippet instead, which is what a user pastes, and reads it from the view so the clipboard holds what the box shows. No new crate: two windows-sys features, DataExchange and Memory. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The clipboard implementation is lifted from #596 (cursor/surface-mcp-endpoint-b6d0), which built the same three arms for the token alone. It copies the generated snippet instead, which is what a user pastes, and reads it from the view so the clipboard holds what the box shows. No new crate: two windows-sys features, DataExchange and Memory. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The clipboard implementation is lifted from #596 (cursor/surface-mcp-endpoint-b6d0), which built the same three arms for the token alone. It copies the generated snippet instead, which is what a user pastes, and reads it from the view so the clipboard holds what the box shows. No new crate: two windows-sys features, DataExchange and Memory. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Why
Issue #577: Since #542, the attached Harness is handed its MCP endpoint automatically. What's left is the BYO (Bring Your Own) Harness case: a user running their own
claudeorhermessession beside the app who wantsspeakto reach the buddy on their screen.Both the URL and token are per-run and ephemeral (port is
127.0.0.1:0, token is 32 fresh bytes in memory). ADR-0026 rejected descriptor files, so nothing surfaces them today.What changed
Added an MCP section to Settings → Development showing:
Platform parity achieved:
The URL shows either
http://127.0.0.1:<port>/mcpwhen running orNot runningotherwise. The token is only accessible via clipboard copy, which is the trade ADR-0026 makes: a local process can already ask the clipboard, and keeping the token off disk/logs is the rule.Added test
mcp_url_is_shown_but_token_is_never_visibleto ensure the token never appears in Debug output or any field.Screenshots
Settings → Development → MCP: live URL (read-only) and Copy token to clipboard (token never shown on screen).
How to verify
http://127.0.0.1:<port>/mcpBearer <hex-token>in the clipboardManual test on each platform (macOS, Linux, Windows) confirms:
Notes
The Documentation in
docs/DEVELOPMENT.mdunder "Pointing a Harness you run yourself at ai-buddy" remains accurate and needs no update.Closes #577
— Cursor agent (Coder), on @omesser's behalf.