Skip to content

fix: list only granted MCP servers on the agent gateway - #8311

Draft
mfbx9da4 wants to merge 2 commits into
mainfrom
claude/agent-gateway-mcp-permissions-de1ba9
Draft

mfbx9da4 wants to merge 2 commits into
mainfrom
claude/agent-gateway-mcp-permissions-de1ba9

Conversation

@mfbx9da4

@mfbx9da4 mfbx9da4 commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Fixes DNO-1456

Why

An agent's gateway (/agent-mcp/{agentID}) listed every public MCP server in the organization, including ones nobody selected for the agent. The agent identity wizard says the agent "can reach nothing else".

Discussion

From the team thread:

  • "Public" only skips Speakeasy sign-in. Most public servers need per-user upstream OAuth, so an agent can call one only with its own attached connection. Listing ungranted ones showed tools it could not use.
  • The selection is stored as RBAC mcp:connect grants. So a key can now exclude a server with no upstream auth, which anyone can call. Slightly counterintuitive, but it matches the wizard.
  • Open question: how people keep an agent's selection current after setup.

What changed

Before: Public servers skipped the mcp:connect check on every gateway.

After:

  • admitMetaMembers takes publicNeedsGrant. Only the agent gateway sets it, so organization and stored gateways still include public servers.
  • An ungranted public server is gone from list_servers and returns "unknown server" on drill-down.
  • The admission shadow records each member's real visibility.
  • Test fixtures add granted and ungranted public servers.

Agents that used an ungranted public server lose it.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mfbx9da4 mfbx9da4 added the bug Something isn't working label Oct 30, 2026
@changeset-bot

changeset-bot Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: e9d742f

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

This PR includes changesets to release 1 package
Name Type
server Patch

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

@linear-code

linear-code Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

DNO-1456

@blacksmith-sh

This comment has been minimized.

@cubic-dev-ai cubic-dev-ai Bot left a comment

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 issues found across 4 files

This PR changes authentication, authorization, or input validation. Ultrareviews find 2.4x more serious bugs than standard reviews. Comment @cubic-dev-ai ultrareview to run one.

View guided diff | Turn on auto-fix | Re-trigger cubic

…on test

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant