Repository navigation
Replies: 2 comments
|
Same need here, at a lower ceiling. OpenClaw, a local agent gateway on the same machine as T3, signs in to Any one of these would solve it while keeping the owner's ceiling choice:
|
|
A data point from a fork. We have the same need for an always-on agent (a bot using mcp-remote at Auto-accept edits) and built fionn77's second option, but set on the host when the approval code is made instead of on the approval page:
Commit with a behavior test: jason5545@16a647457a. The options are stored in the pairing link's subject only because a fork can't add migrations without colliding with upstream's numbering; a real version would use columns. The trade-off is that this is a long-lived access token, not a refresh flow, so a leaked token stays useful for its whole lifetime. Refresh tokens (option 1) are still the cleaner fix. This was the smallest change that kept the owner's ceiling choice. |
Uh oh!
There was an error while loading. Please reload this page.
Our outside orchestrator (KiroCrew) drives T3 threads over
/mcpwith nobody at the keyboard. It signs in once with MCP OAuth at Full access and sends the bearer token as a static header.What happened.
EnvironmentAuth.ts:86), and nothing renews it. The server advertises onlyauthorization_code(McpOAuth.ts:102), registration ignores therefresh_tokengrant clients ask for (McpOAuth.ts:334-337), and the token endpoint refuses other grants (McpOAuth.ts:487-488). feat(server): outside agents sign in to the T3 MCP server with OAuth #16336 lists this as a known limit, and feat(server): link to another environment #16655 says links inherit it ("no renewal yet").t3 auth session issue --subject mcp-client --ttl 365dmints a token/mcpaccepts, but the CLI cannot set a runtime-mode ceiling (cli/auth.ts:164-172,EnvironmentAuth.ts:1107-1118)./mcpreads the missing ceiling asapproval-required(EnvironmentAuth.ts:1285), so a Full-accesst3_thread_launchfails withruntime_mode_escalation_denied.Ask. Either would work for us:
/oauth/mcp/token. Return a rotating refresh token from the code exchange, tied to the same session and ceiling, so revoking the session in Settings → Connections ends it too. The access token can then stay short. Clients that already ask forrefresh_token, like Claude Code, would renew without re-approval, and so would environment links.t3 auth session issue --subject mcp-client --access full-access --ttl 365d, setting the same signed ceiling the approval page sets (issueMcpClientSession). It runs only on the host, which can already mint an administrative token with the same command, so it grants nothing new. The session still shows in Connections and can be revoked there.Why it matters. An unattended orchestrator has nobody to re-approve it every 30 days. Today we mint a pairing code on the host and script the approval page's OAuth flow, which works but automates the one step meant for a person.
Related, not a duplicate: #18003 covers the 30-day lifetime of pairing-issued device sessions. Its suggested fix changes the two pairing call sites, not
mcp-clientsessions.Code links are to
mainat 7ac952c.All reactions