feat(mcp): billing read tools#7725
Open
andypalmi wants to merge 1 commit into
Open
Conversation
4b4e679 to
a758940
Compare
8bfb22e to
9742987
Compare
a758940 to
a65f554
Compare
Add read-only MCP tools for team billing and the Stripe customer portal, wrapping the backing routes via app.inject(), with unit and equivalence tests. Allow-list their scopes for the expert-mcp platform token.
a65f554 to
66e0985
Compare
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.
Summary
forge/ee/lib/mcp/tools/billing.js:platform_get_team_billing: reads a team's subscription and plan details (GET /ee/billing/teams/:teamId)platform_get_team_customer_portal: returns a Stripe customer-portal URL for a team (GET /ee/billing/teams/:teamId/customer-portal, which issues a 303 redirect; the tool captures theLocationheader and returns it asurl)readOnlyHint: true,destructiveHint: false.team:editinIMPLICIT_TOKEN_SCOPES['user:expert-mcp'](forge/routes/auth/permissions.js) so expert-mcp tokens can call these owner-gated billing routes.Closes #7683
Test plan
eslinton changed files (also ran via commit hook's full lint)