Skip to content

feat(mcp): billing read tools#7725

Open
andypalmi wants to merge 1 commit into
feat/mcp-tools-shared-schemasfrom
feat/mcp-tools-billing-read
Open

feat(mcp): billing read tools#7725
andypalmi wants to merge 1 commit into
feat/mcp-tools-shared-schemasfrom
feat/mcp-tools-billing-read

Conversation

@andypalmi

Copy link
Copy Markdown
Contributor

Summary

  • Adds read-only MCP tools for team billing visibility in 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 the Location header and returns it as url)
  • Both tools are annotated readOnlyHint: true, destructiveHint: false.
  • Allow-lists team:edit in IMPLICIT_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

  • eslint on changed files (also ran via commit hook's full lint)
  • Manual verification against a team with an active subscription (no automated tests added, per scope)

@andypalmi andypalmi force-pushed the feat/mcp-tools-billing-read branch from 4b4e679 to a758940 Compare July 4, 2026 13:33
@andypalmi andypalmi linked an issue Jul 6, 2026 that may be closed by this pull request
@andypalmi andypalmi force-pushed the feat/mcp-tools-shared-schemas branch from 8bfb22e to 9742987 Compare July 6, 2026 13:13
@andypalmi andypalmi force-pushed the feat/mcp-tools-billing-read branch from a758940 to a65f554 Compare July 6, 2026 16:38
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.
@andypalmi andypalmi force-pushed the feat/mcp-tools-billing-read branch from a65f554 to 66e0985 Compare July 6, 2026 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5.14 Billing (read-only)

1 participant