Skip to content

feat: fine-grained MCP tool selection UI and team access tab#2255

Merged
adaam2 merged 28 commits intomainfrom
feat/fine-grained-mcp-connect-ui-2
Apr 22, 2026
Merged

feat: fine-grained MCP tool selection UI and team access tab#2255
adaam2 merged 28 commits intomainfrom
feat/fine-grained-mcp-connect-ui-2

Conversation

@adaam2
Copy link
Copy Markdown
Member

@adaam2 adaam2 commented Apr 16, 2026

Summary

Duplicate of #2252.

  • Adds fine-grained tool selection UI to the MCP scope picker — supports filtering by annotation tab and HTTP method tab per tool entry
  • Introduces a Team Access tab on the MCP server detail page for managing per-team tool grants with expandable scope pickers
  • Surfaces httpMethod on the ToolEntry type in the API, generated types, and SDK (v0.32.41+)
  • Adds a Collection tab to the playground, with fullscreen improvements and an expand button in the footer
  • Various UI polish: MCP URLs in server list, persistent tab selection, group headers fully clickable, padding/width tweaks

Test plan

  • Open MCP scope picker → verify tool selection works across annotation and HTTP method tabs
  • Navigate to MCP server detail → Team Access tab → confirm per-team grants can be saved and persisted
  • Verify httpMethod surfaces on tools via the SDK and API response
  • Navigate away and back to the scope picker → confirm tab selection persists
  • Test Collection tab in the playground; verify fullscreen and footer expand button behave correctly

🤖 Generated with Claude Code

adaam2 and others added 17 commits April 9, 2026 09:44
Add a "Specific tools" option to the MCP scope picker that expands into
a tabbed two-column drill-down interface for selecting individual tools
per server. Includes search filtering, onWheel scroll workaround for
Radix Sheet body scroll lock, and custom mode state tracking.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Bump spacing across the board to reduce cramped feeling: wider popover
(550px), wider server column (160px), taller headers (h-10), roomier
items (px-3 py-2), and override TabsList/TabsTrigger fixed heights
with h-auto so padding is respected.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Rename scope picker tabs: All tools, By annotation, By HTTP method
- Add httpMethod field to ToolEntry (Goa design, SQL, SDK pipeline)
- Build HttpMethodGroupPanel with select-all checkboxes per method
- Tab switching resets selections (tabs are mutually exclusive)
- Add indeterminate (minus) state to Checkbox component
- Auto-size tab widths with subtle dividers between them

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Track active custom tab (All tools / By annotation / By HTTP method) on RoleGrant
- Restore custom mode and correct tab when editing a saved role
- Clear resources/annotations when switching between Specific servers and Specific tools
- Fix popover trigger bg, offset, animation, and width tweaks
- Use square-asterisk icon for HTTP method tab

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Show full MCP URL (sans protocol) instead of server name in server list
- Widen server pane to 240px and popover to 620px
- Fix row height alignment between server and tool items
- Increase tab bar vertical padding

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add Team Access tab to MCP detail page showing per-member access levels
- Fix annotation-based grants not saving: resolve annotations to compound
  tool IDs before persisting so the backend receives real resource IDs
- Add tab detection on role re-edit: infer annotation/HTTP method/select
  tab from saved resource IDs by comparing against current tool data
- Add grey header with expand button to MCP scope picker popover that
  opens a full-screen dialog for easier tool selection
- Resolve SDK merge conflicts (version bump to 0.32.40)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…-connect-ui

# Conflicts:
#	.speakeasy/workflow.lock
#	client/sdk/.speakeasy/gen.lock
#	client/sdk/.speakeasy/gen.yaml
#	client/sdk/jsr.json
#	client/sdk/package.json
#	client/sdk/src/lib/config.ts
#	server/gen/http/openapi3.json
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add "By collection" tab with SquareLibrary icon to scope picker
- Move expand toggle from header to footer with "Open in full screen" text
- Widen popover to 620px in custom mode for 4 tabs
- Make fullscreen dialog fill 85vh with flex layout
- Replace close X with minimize button that returns to popover

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…fix oxfmt formatting

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@adaam2 adaam2 requested review from a team as code owners April 16, 2026 15:10
@adaam2 adaam2 added the enhancement New feature or request label Apr 16, 2026
Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

Tip: disable this comment in your organization's Code Review settings.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 16, 2026

🦋 Changeset detected

Latest commit: feb6e14

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
server Minor
dashboard Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
gram-docs-redirect Ready Ready Preview, Comment Apr 22, 2026 8:48am

Request Review

@github-actions github-actions Bot added the preview Spawn a preview environment label Apr 16, 2026
@speakeasybot
Copy link
Copy Markdown
Collaborator

speakeasybot commented Apr 16, 2026

🚀 Preview Environment (PR #2255)

Preview URL: https://pr-2255.dev.getgram.ai

Component Status Details Updated (UTC)
❌ Database Blocked Image build timed out 2026-04-22 08:57:55.
❌ Images Failed Timed out after 1182s waiting for images 2026-04-22 08:57:52.

Gram Preview Bot

devin-ai-integration[bot]

This comment was marked as resolved.

- Regen Speakeasy TypeScript SDK to update esm/ declaration files
- Fix ScopePickerPopover icon type (ElementType→ComponentType) to resolve
  className prop narrowing to never in TS 5.8
- Fix MCPTeamAccessTab ghost→tertiary Button variant (ghost not in design system)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 new potential issue.

View 7 additional findings in Devin Review.

Open in Devin Review

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚩 No tests added for new components and behavior

CONTRIBUTING.md states: 'Add tests for all new contributions. Coding agents and assistants are fantastically effective at this.' This PR adds substantial new UI components (MCPTeamAccessTab, AnnotationGroupPanel, HttpMethodGroupPanel, CollectionGroupPanel, ToolSelectionPanel) and complex logic (inferCustomTab) without any accompanying tests. While this is a guideline rather than a hard rule, the inferCustomTab heuristic and compound ID generation logic in particular would benefit from unit tests given their complexity and the bug found in HttpMethodGroupPanel.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Generated files were out of sync with design files, causing the
git:porcelain check to fail in CI.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
devin-ai-integration[bot]

This comment was marked as resolved.

adaam2 and others added 2 commits April 21, 2026 17:33
Resolve merge conflicts:
- ScopePickerPopover.tsx: keep feature branch tools array
- MCPDetails.tsx: keep both imports (MCPTeamAccessTab + useEnvironmentVariables)
- SDK/generated files: take main's newer versions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…up key

- HttpMethodGroupPanel: use tool.name instead of tool.id for compound
  resource IDs, consistent with all other tabs (BUG-0002/0003)
- CreateRoleDialog: gate initialization on scopesData && toolsetsData
  being loaded to prevent race with async queries (BUG-0001)
- CreateRoleDialog: remove broken inferCustomTab HTTP-method heuristic
  that relied on UUID-vs-name distinction (ANALYSIS-0005)
- toolset.go: fix pre-existing dedup seen-map key mismatch (ANALYSIS-0003)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Regenerate openapi3.json from Goa design files and SDK to include
both main's changes and our branch's ToolEntry additions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
devin-ai-integration[bot]

This comment was marked as resolved.

adaam2 and others added 2 commits April 22, 2026 08:53
…ion tab, feature flag

- Change group header from <button> to <div role="button"> to avoid
  nesting Radix Checkbox <button> inside outer <button> (invalid HTML)
- Remove shared scrollRef/onWheel from AnnotationGroupPanel,
  HttpMethodGroupPanel, CollectionGroupPanel — rely on native overflow-y-auto
- Rewrite CollectionGroupPanel to fetch actual org-level collections
  instead of grouping by project (was showing wrong data)
- Gate MCPTeamAccessTab behind gram-rbac feature flag and mcp:read scope

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
devin-ai-integration[bot]

This comment was marked as resolved.

- Remove expandable tool lists from annotation, HTTP method, and
  collection panels — select broadly by category instead
- Add className prop to ToolSelectionPanel for caller-controlled height
- Fix dialog columns not filling height (add flex flex-col to TabsContent)
- Add min-h-[200px] to all tab contents to prevent height jumping
- Remove overflow-hidden from PopoverContent to avoid scroll interference
- Add bg-background to fullscreen button footer

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix DescribeToolset seen-map: check used Name but stored ID.String(),
  so dedup never worked. Now stores Name to match the check.
- Fix useState initializer capturing stale isRbacEnabled on first render.
  Added useEffect to re-validate #team-access hash when flag loads.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@adaam2 adaam2 merged commit 04c6c30 into main Apr 22, 2026
25 of 26 checks passed
@adaam2 adaam2 deleted the feat/fine-grained-mcp-connect-ui-2 branch April 22, 2026 08:55
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request preview Spawn a preview environment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants