Skip to content

Commit 40b96b0

Browse files
Merge pull request #1017 from corbitsdev/cl-7899-verify-docsmcpmd-by-following-it-end-to-end
Correct MCP trust fingerprint, store path, and auth UX
2 parents f2d73ce + cd9e758 commit 40b96b0

1 file changed

Lines changed: 11 additions & 8 deletions

File tree

docs/MCP.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,11 @@ disabled or overridden by a custom `exa` MCP server. Other Exa MCP tools, such a
7272
**Project trust:** When `mcpServers` comes from **local** `.corbits/settings.json`,
7373
Corbits Code does **not** spawn or connect until each server is trusted for this
7474
project. Trust is stored as a fingerprint of `{ name, type, command, args, url }`
75-
in `~/.corbits/trust/<cwd-hash>.json` (outside the repo). The TUI prompts on
75+
plus the sorted `env` key names — never values, so adding a new injected
76+
variable invalidates a prior grant. `type` defaults to `http` when `url` is set,
77+
else `stdio`. The store lives in `~/.corbits/trust/<repo-hash>.json` (outside the
78+
repo), where `<repo-hash>` is the first 32 hex characters of the SHA-256 of the
79+
realpath-canonicalized project root. The TUI prompts on
7680
first connect (trust-on-first-use). Headless runs without a trust callback
7781
**fail closed** — untrusted local servers are not connected.
7882

@@ -186,11 +190,11 @@ Because only `url` is set, `type` defaults to `http`.
186190
### Authorization on first run
187191

188192
The first time Corbits Code connects to an http server that requires auth, the TUI
189-
shows an authorization prompt listing the server and its authorize URL:
190-
191-
- The URL is rendered as a clickable hyperlink (`open in browser`) in terminals
192-
that support OSC 8.
193-
- Press **Alt+C** to copy the URL for pasting into a browser instead.
193+
marks the prompt box `mcp !` and lists the server as needing auth in `/mcp`.
194+
Focus the server in `/mcp` and press **Enter** to authorize: the authorize URL
195+
opens in the browser and the link is copied to the clipboard automatically (the
196+
copy covers SSH sessions, where the browser taking the redirect is often not
197+
this machine).
194198

195199
Complete the consent flow in the browser. A loopback callback server catches the
196200
redirect and exchanges the authorization code for tokens automatically — the
@@ -209,8 +213,7 @@ Credentials are scoped to the exact server name and endpoint URL, not the displa
209213
name alone. Corbits Code parses and normalizes the URL, removes its fragment, and
210214
hashes the unambiguous `[serverName, normalizedURL]` tuple. The full path and query
211215
remain part of the identity, so credentials cannot cross origins, paths, or query
212-
variants. The bounded slug prefix is derived from the server name for readability;
213-
the raw URL never appears in the filename.
216+
variants. The bounded slug prefix is derived from the server name for readability: characters outside `[A-Za-z0-9_-]` are replaced with `_` (case preserved; an empty result becomes `server`), truncated to 48 characters; the raw URL never appears in the filename.
214217

215218
Tokens never appear in `settings.json`. The settings file holds only the URL;
216219
secret material stays in the endpoint-scoped auth file. Legacy name-only files

0 commit comments

Comments
 (0)