feat(dashboard): UI for managing MCP tokens #94
Reference in New Issue
Block a user
Delete Branch "feat/m7.3-mcp-tokens-ui"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Adds a
/mcp-tokenspage so a logged-in user can mint, list, and revoke bearer tokens for the MCP server without curl. Stacks on #92 (which added the agent endpoints + MCP middleware) — once both land, a user can copy a token from the dashboard straight into their LLM client config.Targets
feat/m7.3-mcp-tenant-tokens(#92's branch) so the diff shown is only the UI changes. When #92 merges, this PR auto-retargets to main.UX
POST /api/v1/mcp-tokens. The raw token is shown once in a yellow banner with a copy button and a "won't be shown again" warning. User dismisses manually.mcpt_xxxx…), created date, last_used (or "never"). Revoked tokens render dimmed with a "revoked" pill.Files
infrastructure/mcp_tokens.rs(new)#[server]fns going throughagent_client(auto-attaches the KC bearer + handles token refresh)pages/mcp_tokens.rs(new)app.rsRoute::McpTokensPageat/mcp-tokenspages/mod.rs,infrastructure/mod.rsTest plan
cargo fmt --all -- --checkcleancargo clippy -p compliance-dashboard --features server -- -D warningscleancargo clippy -p compliance-dashboard --features web --no-default-features -- -D warningscleancargo checkon both feature sets clean/mcp-tokens, create a token, copy it, paste into a fresh curl againstcomp-mcp-dev.meghsakha.com/mcp, confirm tools/list works. Revoke; confirm a subsequent call 401s.Followups
mcp_servers(settings-style pages reached via direct URL). Worth a future Settings sub-menu pass.🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.