Repository navigation
fix(mcp): scope gateway mcp projects list/use to Gateway projects - #505
Open
pcbeingused333 wants to merge 1 commit into
Open
pcbeingused333 wants to merge 1 commit into
pcbeingused333 wants to merge 1 commit into
Conversation
The Gateway MCP server set no ProjectFilter, so hookdeck_projects use accepted an Outpost project and every later Gateway call 404ed. Set ProjectFilter to the Event Gateway type; the filter treats console projects as Gateway projects (also in the login mismatch check), and the refusal now points at the other product's MCP server. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
Fixes #350
Related: #434 (same mid-session gap; #350 settles the asymmetry it asks about)
hookdeck gateway mcprefuses to start against a non-Gateway project, buthookdeck_projects use <outpost-project-id>mid-session succeeded and left every Gateway tool returning 404. The Outpost server already setsProjectFilter; the Gateway server did not.NewServerfor the Gateway MCP server now setsProjectFilterto the Event Gateway type. Console projects are Event Gateway projects with a different entry point (config.IsGatewayProject), so the shared filter matching (matchesProjectFilter) accepts both for the Gateway filter. The same helper is used in the login project-mismatch check, otherwise a console project signed in viahookdeck_loginwould have been rejected (TestLoginTool_PollSurvivesAcrossToolCallscaught this).projects listnow returns Gateway projects only, andprojects useon any other project is refused with a message that names the type and points at the other product's MCP server. The active project stays unchanged.Tests:
TestProjectsList_OnlyGatewayProjectsandTestProjectsUse_RefusesOutpostProjectinpkg/gateway/mcp/server_test.go, using a mixed event_gateway/console/outpost project list. Both fail on main (the Outpost project is listed andusesucceeds) and pass with this change;pkg/gateway/mcp,pkg/mcpcore,pkg/outpost/mcpandpkg/cmdtests pass.This change was prepared with AI assistance.