Skip to content

Add mcp to team capabilities #7636

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 18, 2025
Merged

Add mcp to team capabilities #7636

merged 1 commit into from
Jul 18, 2025

Conversation

jnsdls
Copy link
Member

@jnsdls jnsdls commented Jul 16, 2025

TL;DR

Added mcp capability to team capabilities in service-utils.

What changed?

  • Added a new mcp field to the TeamCapabilities type in packages/service-utils/src/core/api.ts
  • Created a changeset file to document this patch update for the @thirdweb-dev/service-utils package

How to test?

Verify that the TeamCapabilities type correctly includes the new mcp field with its enabled boolean and rateLimit number properties.

Why make this change?

This change adds support for the Multi-Chain Protocol (MCP) capability in team settings, allowing teams to have this capability configured with appropriate rate limiting and enablement controls.

Summary by CodeRabbit

  • New Features
    • Added support for the new "mcp" capability, including its enabled status and rate limit, to team capabilities.

PR-Codex overview

This PR introduces the mcp capability to team configurations within the @thirdweb-dev/service-utils package, enhancing team features with new properties.

Detailed summary

  • Added mcp capability to team configurations in packages/service-utils/src/core/api.ts with properties enabled (boolean) and rateLimit (number).
  • Updated mcp settings in apps/dashboard/src/@/storybook/stubs.ts to enabled: true and rateLimit: 10.
  • Updated mcp settings in packages/service-utils/src/mocks.ts to enabled: true and rateLimit: 10.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

vercel bot commented Jul 16, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 16, 2025 7:48pm
nebula ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 16, 2025 7:48pm
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 16, 2025 7:48pm
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 16, 2025 7:48pm
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 16, 2025 7:48pm

Copy link

changeset-bot bot commented Jul 16, 2025

🦋 Changeset detected

Latest commit: a8b2de1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@thirdweb-dev/service-utils Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

coderabbitai bot commented Jul 16, 2025

Walkthrough

A new capability identifier, mcp, was added to the TeamCapabilities type in the @thirdweb-dev/service-utils package. This capability includes enabled and rateLimit properties. Corresponding mock data and storybook stubs were updated to include this new capability. No other logic or public API changes were introduced.

Changes

File(s) Change Summary
.changeset/free-boxes-lose.md Added a changeset describing the patch update and new capability.
packages/service-utils/src/core/api.ts Extended TeamCapabilities type with new mcp capability group.
packages/service-utils/src/mocks.ts Added mcp capability to validTeamResponse mock data.
apps/dashboard/src/@/storybook/stubs.ts Added mcp capability to teamStub function's returned object.

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1d5958d and a8b2de1.

📒 Files selected for processing (4)
  • .changeset/free-boxes-lose.md (1 hunks)
  • apps/dashboard/src/@/storybook/stubs.ts (1 hunks)
  • packages/service-utils/src/core/api.ts (1 hunks)
  • packages/service-utils/src/mocks.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
  • .changeset/free-boxes-lose.md
  • packages/service-utils/src/mocks.ts
  • packages/service-utils/src/core/api.ts
  • apps/dashboard/src/@/storybook/stubs.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Size
  • GitHub Check: Build Packages
  • GitHub Check: Unit Tests
  • GitHub Check: Lint Packages
  • GitHub Check: Analyze (javascript)
✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Member Author

jnsdls commented Jul 16, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge-queue - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
.changeset/free-boxes-lose.md (1)

1-5: Changeset message could be more descriptive
A one-liner makes changelogs terse; consider adding a brief rationale or link to internal spec so consumers understand what “mcp” is.
Example:

add `mcp` (Multi-Chain Payments) capability to team capabilities – enables new payment routes via MCP service
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e125e74 and 2589a31.

📒 Files selected for processing (2)
  • .changeset/free-boxes-lose.md (1 hunks)
  • packages/service-utils/src/core/api.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx}

Instructions used from:

Sources:
📄 CodeRabbit Inference Engine

  • CLAUDE.md
🧠 Learnings (1)
.changeset/free-boxes-lose.md (1)
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.488Z
Learning: Surface breaking changes prominently in PR descriptions
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Unit Tests
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (1)
packages/service-utils/src/core/api.ts (1)

115-118: Confirm backend parity for the new mcp capability
The shape matches the existing rpc/pay blocks, so the typing looks correct.
Please double-check that:

  1. The API already includes mcp in its response payload; otherwise capabilities.mcp will be undefined at runtime and may break feature-flag checks.
  2. Any feature checks elsewhere in the codebase are updated to read capabilities.mcp.enabled / rateLimit.

If both points are covered, this addition is good to ship.

Copy link

codecov bot commented Jul 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 56.42%. Comparing base (e125e74) to head (a8b2de1).
Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7636   +/-   ##
=======================================
  Coverage   56.42%   56.42%           
=======================================
  Files         906      906           
  Lines       58126    58126           
  Branches     4222     4222           
=======================================
  Hits        32795    32795           
  Misses      25223    25223           
  Partials      108      108           
Flag Coverage Δ
packages 56.42% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
apps/dashboard/src/@/storybook/stubs.ts (1)

95-104: Consider adding 'mcp' to the enabled scopes array.

The mcp capability is added to the capabilities object but is not included in the enabledScopes array. For consistency with other capabilities like pay, storage, rpc, etc., consider adding 'mcp' to the enabledScopes array if it represents a scope that can be enabled/disabled.

		enabledScopes: [
			"pay",
			"storage",
			"rpc",
			"bundler",
			"insight",
			"embeddedWallets",
			"relayer",
			"chainsaw",
+			"mcp",
		],
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2589a31 and 1d5958d.

📒 Files selected for processing (4)
  • .changeset/free-boxes-lose.md (1 hunks)
  • apps/dashboard/src/@/storybook/stubs.ts (1 hunks)
  • packages/service-utils/src/core/api.ts (1 hunks)
  • packages/service-utils/src/mocks.ts (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • packages/service-utils/src/mocks.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • .changeset/free-boxes-lose.md
  • packages/service-utils/src/core/api.ts
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}

Instructions used from:

Sources:
📄 CodeRabbit Inference Engine

  • CLAUDE.md
apps/{dashboard,playground-web}/**/*.{tsx,ts}

Instructions used from:

Sources:
📄 CodeRabbit Inference Engine

  • CLAUDE.md
🧠 Learnings (1)
apps/dashboard/src/@/storybook/stubs.ts (14)
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.488Z
Learning: Applies to **/*.test.{ts,tsx} : Use real function invocations with stub data in tests; avoid brittle mocks
Learnt from: Yash094
PR: thirdweb-dev/js#7608
File: apps/dashboard/src/@/api/team.ts:96-96
Timestamp: 2025-07-15T08:25:44.584Z
Learning: In the thirdweb dashboard codebase, the `getTeamById` function was actually a wrapper around `getTeamBySlug`, so removing it and calling `getTeamBySlug` directly doesn't change functionality. The `LAST_USED_TEAM_ID` cookie and related variables were storing slugs all along, not IDs.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-06-30T10:26:04.389Z
Learning: Applies to dashboard/**/components/**/*.stories.tsx : Provide a Storybook story (`MyComponent.stories.tsx`) or unit test alongside the component.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-06-30T10:26:04.389Z
Learning: Applies to dashboard/**/api/**/*.{ts,tsx} : Return typed results (`Project[]`, `User[]`, …) – avoid `any`.
Learnt from: MananTank
PR: thirdweb-dev/js#7315
File: apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/nft/launch-nft.tsx:153-226
Timestamp: 2025-06-10T00:50:20.795Z
Learning: In apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/nft/launch-nft.tsx, the updateStatus function correctly expects a complete MultiStepState["status"] object. For pending states, { type: "pending" } is the entire status object. For error states, { type: "error", message: React.ReactNode } is the entire status object. The current code incorrectly spreads the entire step object instead of passing just the status object.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.488Z
Learning: Applies to apps/{dashboard,playground-web}/**/feature/components/**/*.{tsx,ts} : Group feature-specific components under `feature/components/*` with barrel `index.ts`
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{tsx,ts} : Server Side Data Fetching: Return typed results (`Project[]`, `User[]`) – avoid `any`
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-06-30T10:26:04.389Z
Learning: Applies to dashboard/**/api/**/*.{ts,tsx} : Co-locate data helpers under `@/api/**` and mark them with "server-only".
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-06-30T10:26:04.389Z
Learning: Applies to dashboard/**/api/**/*.{ts,tsx} : Export default async functions without `'use client';` – they run on the Node edge.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.488Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{tsx,ts} : Server Components (Node edge): Start files with `import "server-only";`
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.488Z
Learning: Applies to test/src/test-wallets.ts : Predefined test accounts are in `test/src/test-wallets.ts`
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to src/wallets/**/*.{ts,tsx} : Smart wallets with account abstraction in wallet architecture
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to src/wallets/**/*.{ts,tsx} : Unified `Wallet` and `Account` interfaces in wallet architecture
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T10:25:29.489Z
Learning: Applies to src/extensions/**/*.{ts,tsx} : Auto-generated contracts from ABI definitions in extensions
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: Analyze (javascript)
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: Size
  • GitHub Check: Lint Packages
  • GitHub Check: Unit Tests
🔇 Additional comments (1)
apps/dashboard/src/@/storybook/stubs.ts (1)

88-91: LGTM! New MCP capability correctly added to team stub.

The addition of the mcp capability with enabled: true and rateLimit: 10 is consistent with the PR objectives and aligns with the type definition changes in the service-utils package. The structure matches the pattern used by other capabilities in the stub.

Copy link
Contributor

github-actions bot commented Jul 16, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 63.25 KB (0%) 1.3 s (0%) 382 ms (+58.15% 🔺) 1.7 s
thirdweb (cjs) 353.31 KB (0%) 7.1 s (0%) 1.8 s (-7.37% 🔽) 8.8 s
thirdweb (minimal + tree-shaking) 5.7 KB (0%) 114 ms (0%) 83 ms (+514.08% 🔺) 197 ms
thirdweb/chains (tree-shaking) 526 B (0%) 11 ms (0%) 40 ms (+506.1% 🔺) 51 ms
thirdweb/react (minimal + tree-shaking) 19.59 KB (0%) 392 ms (0%) 71 ms (+155.18% 🔺) 462 ms

@gregfromstl gregfromstl added the merge-queue Adds the pull request to Graphite's merge queue. label Jul 17, 2025
@jnsdls jnsdls merged commit 746b0c9 into main Jul 18, 2025
25 checks passed
@jnsdls jnsdls deleted the Add_mcp_to_team_capabilities branch July 18, 2025 00:46
@joaquim-verges joaquim-verges mentioned this pull request Jul 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dashboard Involves changes to the Dashboard. merge-queue Adds the pull request to Graphite's merge queue. packages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants