feat: add MCP token management UI to My Tokens page#617
Merged
Conversation
liuwei08
requested changes
Jun 25, 2026
liuwei08
left a comment
Contributor
There was a problem hiding this comment.
Two bugs that must be fixed before merge — see inline comments.
Collaborator
Author
|
Fixed in 902bf9b:
|
added 4 commits
June 26, 2026 16:32
- UserTokenService: add loadMcpTokens, createMcpToken, revokeMcpToken, setMcpTrigger methods calling /api/v1/mcp/tokens/* endpoints - UserGlobalTokens.vue: append MCP Tokens card to /user/tokens page with create form, token list (name, project scope, expiry, last used, trigger toggle), revoke action, and post-create dialog showing the ib_mcp_* token value with INFRABOX_MCP_TOKEN usage hint
…n on dialog close
- createMcpToken form: native checkbox list for project selection - token list: edit button expands inline scope editor per token - PATCH /api/v1/mcp/tokens/<id> via new updateMcpToken service method - NewAPIService: add patch() method - validation: show error messages on invalid name/days input
680ae35 to
94d4e0f
Compare
added 5 commits
June 26, 2026 16:59
- projects.py: empty dict falls through to full collaborator query - auth.py: check_project_access_mcp treats empty dict as allow-all
… response
- auth.py: clarify enabled_projects={} means allow-all (not deny-all);
add docstring explaining the intentional semantics
- UserGlobalTokens.vue: fix toggleMcpTrigger — v-model already flips
token.allow_trigger before @change fires, so read it directly instead
of negating again (previous code sent the wrong value and silently
reverted the UI)
- NewAPIService.js: patch() returns response.body || {} to guard against
204 No Content responses
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.
Summary
UserTokenService.js— 4 new methods wiring up the/api/v1/mcp/tokens/*endpoints added in DIARCHERS-1396: MCP-dedicated API layer with rate limiting, auth, and audit #610/user/tokenspage (UserGlobalTokens.vue) — no new route neededib_mcp_*token value (shown once) with aINFRABOX_MCP_TOKEN=...usage hint for the MCP clientWhat users can do after this PR
ib_mcp_*value and setINFRABOX_MCP_TOKENin their MCP client configRelated
Completes the frontend half of DIARCHERS-1396 / #610 (backend MCP API layer).