Repository navigation
feat: agent access tokens that can drive threads - #118
Merged
Merged
Conversation
adampeterhiggins
force-pushed
the
ah/mcp-write-4-thread-control-setting
branch
from
October 1, 2026 08:32
9cf3dfe to
3b894b6
Compare
Agent access tokens gain an access level. A read token keeps reaching /mcp/query; an operate token (orchestration:read + operate) reaches the new /mcp/operate server, which lists the history tools and the thread tools and acts as the user, recording the token's label on threads it starts. Settings → Connections → Agent access picks the level and lists both kinds; `t3 auth session issue --operate` does the same from a terminal. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
adampeterhiggins
force-pushed
the
ah/mcp-write-5-operate-tokens
branch
from
October 1, 2026 08:33
5607d0d to
c924550
Compare
adampeterhiggins
changed the base branch from
ah/mcp-write-4-thread-control-setting
to
main
October 1, 2026 08:33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack 5 of 8: agents operate T3 Code over MCP. Based on #117.
Agents outside T3 Code, such as a scheduled Claude Code run, could only read history through
/mcp/query. This lets them start and drive threads as the user would.POST /api/auth/agent-access-tokenstakesaccess: "read" | "operate", defaulting to read.AuthAgentOperateScopes(orchestration:read+orchestration:operate).mcpUrlpoints at the matching endpoint./mcp/operateis a new fresh MCP server inapps/server/src/mcp/query/QueryMcpServer.ts.Authorizationheader (cookies are stripped, like/mcp/query).McpActorcarrying the session label, so threads it starts record{ kind: "agent-access", label }.mcp/paths.tsto keepauth/http.tsoff the MCP server module.AuthenticatedSession.labelcarries the client label through bearer auth.claude mcp add … t3-code-control …for operate tokens.t3 auth session issue --operate.docs/user/agent-access.mdand the fork-differences entry rewritten for both levels.Testing:
QueryMcpServer.test.ts: a read token gets 403 on/mcp/operate; an operate token lists both toolkits;/mcp/querynever listscreate_thread.http.test.ts: operate issuance returns both scopes and an/mcp/operateURL.src/mcp+src/auth+src/cli319/319, web settings 462/462.tscis clean for server and web.Done by Claude Opus 5.5 in Claude Code.
🤖 Generated with Claude Code