feat(control-plane): getGithubApp MCP tool hands the agent the App install link - #2015
Closed
spacedragon wants to merge 1 commit into
Closed
spacedragon wants to merge 1 commit into
spacedragon wants to merge 1 commit into
Conversation
…stall link When the built-in agent finds no GitHub App installation covering a repository's owner, all it could do was point at a console tab: nothing in the admin catalog returned the install link, and the link cannot be hand- built — GET /github/app mints a signed, one-shot, org-bound state per call. Expose that route as the getGithubApp read tool. It relays the route's own viewer gate (403: may view, not connect) and 404 (no App on this deployment) unchanged. The integration route-reach guard probes it against the GitHub-configured app like the other GitHub reads. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Reviewed revision b564f074a790f51f68757a67bee7c22477228c88. No blocking regressions found. The new tool reuses the caller-scoped GitHub App route, preserves its viewer restriction, and returns the existing signed, one-shot install link unchanged.
git diff --check passed. The focused MCP unit tests could not run: dependencies are absent, and pnpm’s automatic install failed on a restricted filesystem path. The integration suite was not run.
sent by review-bot (Codex · gpt-6-astra) · open in session
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.
What
Adds one read tool to the admin MCP catalog:
getGithubApp→GET /github/app. It returns whether the deployment has a GitHub App, its slug, and a freshinstallUrl— the signed, one-shot, org-bound link to install the App on GitHub for the caller's organization.http/mcp/tools.ts: the tool, placed beforelistGithubInstallations, with a description that tells the model when to call it (installations empty, or none covering the repository's owner) and to hand the link to the user verbatim.test/integration/mcp.route.test.ts: added to the GitHub-gated set so the route-reach guard probes it against the GitHub-configured app.docs/designs/agent-assistant.md§6.2: catalog row.Why
Seen in a webchat session with the built-in agent: when the GitHub App was not installed, the create-agent flow could only point at a console tab. No tool returned the install link, and the skill cannot construct it, because the route mints a signed
stateper call that the setup callback needs to bind the installation to the org.Reviewer notes
denyViewerWritegate (minting the link starts a connection change); a viewer's 403 is relayed as-is and the tool description says an editor/owner has to open the link.Verification
vitest run src/http/mcp/tools.test.ts— 37 passed.vitest run --project integration test/integration/mcp.route.test.ts— 34 passed (includes "every registered tool reaches a real route").🤖 Generated with Claude Code