feat(mcp-gateway): team MCP gateway UI replacing the marketplace behind the mcp-gateway flag#3643
Draft
cvolzer3 wants to merge 2 commits into
Draft
feat(mcp-gateway): team MCP gateway UI replacing the marketplace behind the mcp-gateway flag#3643cvolzer3 wants to merge 2 commits into
cvolzer3 wants to merge 2 commits into
Conversation
…ateway flag
Replaces the per-user MCP marketplace with the team gateway surface from the
design handoff when the mcp-gateway flag is on: servers home with connection
status, server detail with per-scope tool policies and the admin access
section, team & agents roster, agent service-account detail (identity, token
rotation, shared servers, call history), member detail with per-server
revocation, team settings (custom-server gate, approval baselines, server
access, team rules), the audit log, and the gateway add-server form with
sharing options. The legacy marketplace remains the fallback while the flag
is off.
Adds hand-written /api/projects/{id}/mcp_gateway/* client methods and types
to @posthog/api-client (the endpoints are not in the generated OpenAPI client
yet), and portable helpers with tests in @posthog/core/mcp-gateway.
Generated-By: PostHog Code
Task-Id: 7ecfb6f3-39d8-4443-96e7-36e9d1ebd144
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
React Doctor found 7 issues in 5 files · 7 warnings. 7 warnings
Reviewed by React Doctor for commit |
…nstead of a state-sync effect Addresses the react-doctor blocking finding (no-adjust-state-on-prop-change) on the add-server form: the mutation now re-reads the gateway registry and returns the created server, so the form navigates from the mutation result instead of chaining pendingUrl state through an effect. Also derives the role-guarded route at render in McpGatewayView rather than correcting it in an effect, and renames the audit pager's map variable so the key reads as the page number it is. Generated-By: PostHog Code Task-Id: 7ecfb6f3-39d8-4443-96e7-36e9d1ebd144
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.
Problem
The MCP servers page in PostHog Code is a per-user install list: each member connects servers for themselves and approves tools for themselves, with no shared team view or control. The backend now models a team MCP gateway (PostHog/posthog#72409, behind the
mcp-gatewayflag) — a control plane for which servers a team runs, under whose credentials, with which tools allowed, and who called what. The desktop app needs the matching UI.Why: we're refactoring the existing MCP server marketplace into the gateway experience from the design handoff, so teams manage servers, credentials, agent identities, per-tool policies, and auditing in one place — implemented here per the design artifacts.
Changes
packages/ui/src/features/mcp-gatewayfeature rendered at/mcp-serverswhen themcp-gatewayflag is on; the legacy marketplace stays as the fallback while the flag is off.@posthog/api-client: hand-written types + client methods for themcp_gatewayAPI family (not in the generated OpenAPI client yet); install methods accept the new sharing options.@posthog/core/mcp-gateway: portable helpers (filtering, policy counts, time formatting, add-server request building, install flow) with unit tests.mcpCallbackdeep-link round-trip.Adaptations where the backend constrains the design: member self-disable only shows when the member has their own connection row; the audit caller filter covers agents only (the API has no human-caller filter); agent identities render their
handlerather than an email.How did you test this?
pnpm typecheckacross the workspace (24 tasks green).biome lintclean on all touched packages (including zeronoRestrictedImportsinpackages/core).packages/core/src/mcp-gatewaysuites (33 tests), existingmcp-servers/mcp-server-managerUI suites, and the full@posthog/api-clientsuite (106 tests) all pass.node scripts/check-host-boundaries.mjs— no new violations.mcp-gatewayflag in PostHog/posthog#72409, which is still open.Automatic notifications
Created with PostHog Code