feat: add, share and rotate upstream credentials from server settings
AIM-596 (2 of 5)
Stacked on #8036.
Summary
- Server settings → Upstream credentials → Add credential opens a sheet that, in order:
- reuses a credential another server already offers (filtered to ones this server can use: same project or organization-shared, and no header credentials on tunneled servers), or
- creates a service account or each person's own account over an existing sign-in registration, or a static credential or caller-supplied header with its own headers. "Let servers in other projects use it too" shares a header credential across the organization; a sign-in-backed credential follows its registration's project.
- Sign-in registrations come from Authorization Servers; the sheet links there when none fits.
- Credential sheet → Headers sent upstream: an administrator-created credential's headers are edited and rotated here. Stored secrets are never shown, and leaving one empty keeps it. Saving a credential other servers also use first confirms and names them. Credentials copied from a server's identity settings show their headers read-only and point back to those settings. Sign-in-backed credentials show a locked "Authorization · Set by sign-in" row.
- Rename: the static Authorization identity choice is now Shared credential, with formats Static credential and Service account. The pill, explainer, header warnings, toasts and created-server messages follow.
- Agent page → Permissions:
- "Credentials this agent can't use" (agent managers): block a kind of credential or one credential through the agent's policy (
mcp:blocked_authgrants viaagents.createPolicyGrant/deletePolicyGrant). These rows no longer appear as raw scopes in the permissions panel. - "Your connections this agent can't use" (anyone): block or lift the agent on your own connections through
agents.blockOnConnection/removeConnectionBlock. It needs no agent management access and is hidden when you have no connections and no blocks.
- "Credentials this agent can't use" (agent managers): block a kind of credential or one credential through the agent's policy (
Directions considered: A (chosen), an Add credential sheet in the server's existing Upstream credentials section, where admins already toggle and scope credentials. B, an organization-level Credentials page, which adds a nav item and separates the credential from the server that needs it. C, inline forms in the section, which crowd the list once a server has more than one credential. Command K: no new page or route, and credentials aren't addressable by URL, so nothing new to index.
Motivation
Milestone 3 lets one server offer several upstream identities, and lets agent managers and connection owners restrict which of them an agent may use. This is the dashboard over the API in #8036 and the already-shipped agent restriction endpoints.
Gutternote review steps
- Setup: the seeded demo data covers it. GitHub offers the shared "Engineering automation token" and "Your own GitHub token"; Linear also offers each person's own account. Sign in as an org admin.
- Sidebar → MCP servers → GitHub → Settings (
/<org>/projects/<project>/mcp/<server>/settings) → Upstream credentials. Click Add credential. - The sheet opens on A credential another server uses. Choose New: static credential, enter a name and a value, and click Add credential. The new row appears in the list with a "… added" toast.
- Click the new row. Headers sent upstream shows the header with "Stored. Enter a new value to replace it." Enter a new value and Save.
- Open Engineering automation token (shared with Linear), change a header and Save. A confirmation names Linear before saving.
- Settings → Identity section: the mode cards read User Identity / Shared credential / Manual, and the shared credential's format groups read Static credential and Service account.
- Identity → Agents → an agent → Permissions. Credentials this agent can't use → Block a credential → pick Each person's own account → Block. The row reads "Each person's own account · every credential of this kind" and can be removed.
Also check: the empty Credentials state for a non-admin, a tunneled server (no header credential options), and "Your connections this agent can't use" for a user with a connected account.
🚀 Preview Environment (PR #8037)
Preview URL: https://pr-8037.dev.getgram.ai
| Component | Status | Details | Updated (UTC) |
|---|---|---|---|
| ✅ Database | Ready | Existing database reused | 2026-10-29 13:15:12. |
| ✅ Images | Available | Container images ready | 2026-10-29 13:17:41. |
Gram Preview Bot