feat: access profiles, and read/edit/other tool groups with bulk switches #48

Merged
marti merged 3 commits from feature/access-profiles into develop 2026-11-09 14:29:30 +01:00
Owner

Summary

Clients page and profiles

  • Each OAuth client and MCP key now shows what it can use: server icons, "N servers · M tools".
  • Profiles are named allowlists of servers, for example "Coding" or "Assistant". Clients and keys can follow profiles instead of their own switches.
    • A client that follows several profiles gets their union.
    • Its own switches are kept but are read-only (409) until it follows none.
    • Deleting a profile an active client follows is refused (409).
  • New profile editor at /clients/profiles/:id. GET /api/me/access-overview feeds the Clients page.

Read / edit / other tool groups

  • Each tool's MCP annotations are now stored in server_tools.annotations (migration 0009).
  • toolKind() in @mcphub/shared sorts tools into read, edit or other. readOnlyHint / destructiveHint decide first; otherwise the verb the name starts or ends with is a guess.
  • Tool lists are now foldable Read / Edit / Other sections, with one switch per kind:
    • client and profile access pages: PUT /api/me/{clients|mcp-keys|profiles}/:id/tools/access, also with a "Bulk actions" menu for every server at once;
    • the user's server page: PUT /api/me/servers/:id/tools/prefs;
    • the admin Tools tab: PATCH /api/admin/servers/:id/tools, audited with kind and count.
  • Server rows on access pages fold to the same height and expand on click. DataTable gets a flush option so tables sit edge to edge inside sections.

Docs: docs/architecture.md (Profiles, Bulk switches by tool kind).

Test plan

  • npm run lint, npm run typecheck
  • Web tests: 157 passed, including a new ToolsTab.test.tsx
  • Shared tests: tool-kind.test.ts
  • API tests: 334 of 335 passed, including new gateway tests for profiles and bulk switches. The failure is egress.test.ts > answers 502 for a host that does not resolve, which also fails without these changes (DNS in my environment).
  • Checked in the running app with demo data: Clients page, profile editor, client access, user server page, admin Tools tab, light and dark, desktop and mobile.

🤖 Generated with Claude Code

## Summary **Clients page and profiles** - Each OAuth client and MCP key now shows what it can use: server icons, "N servers · M tools". - Profiles are named allowlists of servers, for example "Coding" or "Assistant". Clients and keys can follow profiles instead of their own switches. - A client that follows several profiles gets their union. - Its own switches are kept but are read-only (409) until it follows none. - Deleting a profile an active client follows is refused (409). - New profile editor at `/clients/profiles/:id`. `GET /api/me/access-overview` feeds the Clients page. **Read / edit / other tool groups** - Each tool's MCP annotations are now stored in `server_tools.annotations` (migration `0009`). - `toolKind()` in `@mcphub/shared` sorts tools into read, edit or other. `readOnlyHint` / `destructiveHint` decide first; otherwise the verb the name starts or ends with is a guess. - Tool lists are now foldable Read / Edit / Other sections, with one switch per kind: - client and profile access pages: `PUT /api/me/{clients|mcp-keys|profiles}/:id/tools/access`, also with a "Bulk actions" menu for every server at once; - the user's server page: `PUT /api/me/servers/:id/tools/prefs`; - the admin Tools tab: `PATCH /api/admin/servers/:id/tools`, audited with kind and count. - Server rows on access pages fold to the same height and expand on click. `DataTable` gets a `flush` option so tables sit edge to edge inside sections. Docs: `docs/architecture.md` (Profiles, Bulk switches by tool kind). ## Test plan - [x] `npm run lint`, `npm run typecheck` - [x] Web tests: 157 passed, including a new `ToolsTab.test.tsx` - [x] Shared tests: `tool-kind.test.ts` - [x] API tests: 334 of 335 passed, including new gateway tests for profiles and bulk switches. The failure is `egress.test.ts > answers 502 for a host that does not resolve`, which also fails without these changes (DNS in my environment). - [x] Checked in the running app with demo data: Clients page, profile editor, client access, user server page, admin Tools tab, light and dark, desktop and mobile. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Merge pull request 'develop' (#44) from develop into main
All checks were successful
CI / check (push) Successful in 6m19s
3eec488837
Reviewed-on: #44
Merge pull request 'develop' (#46) from develop into main
All checks were successful
CI / check (push) Successful in 6m8s
1e6ebec2fe
Reviewed-on: #46
feat: access profiles, and read/edit/other tool groups with bulk switches
All checks were successful
CI / check (pull_request) Successful in 5m54s
63f4630a10
Clients page:
- show what each OAuth client and MCP key can use (servers and tool counts)
- profiles: named allowlists of servers ("Coding", "Assistant") that clients
  and keys follow instead of their own switches; a client may follow several
  and gets their union; deleting a followed profile is refused
- profile editor at /clients/profiles/:id with the same switches as a client

Tool kinds:
- store each tool's MCP annotations in server_tools (migration 0009)
- classify tools as read, edit or other: readOnlyHint / destructiveHint
  first, then the verb the name starts or ends with
- foldable Read / Edit / Other sections with one switch per kind on client
  and profile access, the user's server page and the admin Tools tab
- bulk routes: PUT /api/me/{clients|mcp-keys|profiles}/:id/tools/access,
  PUT /api/me/servers/:id/tools/prefs, PATCH /api/admin/servers/:id/tools
- access pages also get a menu to switch one kind on every server

Server rows on access pages fold to one height and expand on click.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
marti merged commit bf07fb5fa2 into develop 2026-11-09 14:29:30 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
marti/mcphub!48
No description provided.