Skip to content

Conversation

@aheizi
Copy link
Contributor

@aheizi aheizi commented Mar 13, 2025

Context

support project-level mcp config

i found cursor support project-level mcp config, and some one tell me they need it.

image

Implementation

UI interaction:

  • Provide two buttons on the MCP settings interface:
    • Edit Global MCP - Edit Global Configuration
    • Edit Project MCP - Edit Project Configuration
  • Automatically create. roo/mcp.json when clicking 'Edit Project MCP'

The server list displays:

  • Display source tag (global/project) next to each server name

Screenshots

±image

How to Test

  • After opening the project, click "Edit Project MCP":
    • .roo/mcp.json will be automatically generated
    • The initial file content is { "mcpServers": {}
  • The global configuration button still retains its original function
  • Project file editing follows the VSCode standard process

Get in Touch

aheizi


Important

Adds support for project-level MCP configuration, including UI updates, backend logic, and internationalization changes.

  • Behavior:
    • Adds project-level MCP configuration support in ClineProvider.ts and McpHub.ts.
    • UI updates in McpView.tsx to include buttons for editing global and project MCP settings.
    • Displays source tag (global/project) next to server names in the server list.
  • Functionality:
    • Automatically creates .roo/mcp.json when 'Edit Project MCP' is clicked.
    • Handles errors for missing workspace folders and file creation issues.
    • Updates server connections based on project-level configurations.
  • Testing:
    • Adds tests in ClineProvider.test.ts and McpHub.test.ts for project MCP settings handling.
  • Internationalization:
    • Updates translation files for multiple languages to include new MCP-related strings.

This description was created by Ellipsis for bda929b. It will automatically update as commits are pushed.

@changeset-bot
Copy link

changeset-bot bot commented Mar 13, 2025

⚠️ No Changeset found

Latest commit: 6d70b8a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request labels Mar 13, 2025
@aheizi aheizi force-pushed the support_project_mcp branch from 605339b to 4106ca4 Compare March 13, 2025 13:07
// Validate configuration structure
const result = McpSettingsSchema.safeParse(config)
if (!result.success) {
vscode.window.showErrorMessage("项目 MCP 配置格式无效")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Mind if we make these English for now and then we can internationalize them soon?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Mind if we make these English for now and then we can internationalize them soon?

Of course, I have already seen the international submission, that's really a great thing!

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thank you! I want to talk to you about that separately - will send a message in Discord.

@aheizi aheizi marked this pull request as draft March 13, 2025 14:09
Copy link
Collaborator

@mrubens mrubens left a comment

Choose a reason for hiding this comment

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

Love this! Looks great once the tests pass and we switch the toasts to English 🦾

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Mar 13, 2025
@hannesrudolph hannesrudolph moved this from New to PR [Greenlit] in Roo Code Roadmap Mar 13, 2025
@aheizi aheizi marked this pull request as ready for review March 15, 2025 10:43
ipattis pushed a commit to ipattis/roo-code that referenced this pull request Mar 15, 2025
@aheizi
Copy link
Contributor Author

aheizi commented Mar 16, 2025

Love this! Looks great once the tests pass and we switch the toasts to English 🦾

done

aheizi added 2 commits March 16, 2025 19:53
@aheizi aheizi marked this pull request as draft March 17, 2025 03:01
aheizi added 3 commits March 17, 2025 11:14
# Conflicts:
#	webview-ui/src/i18n/locales/ar/mcp.json
#	webview-ui/src/i18n/locales/cs/mcp.json
#	webview-ui/src/i18n/locales/hu/mcp.json
#	webview-ui/src/i18n/locales/pt/mcp.json
#	webview-ui/src/i18n/locales/ru/mcp.json
@aheizi aheizi marked this pull request as ready for review March 17, 2025 04:10
# Conflicts:
#	src/services/mcp/McpHub.ts
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Mar 17, 2025
@mrubens mrubens merged commit df80e96 into RooCodeInc:main Mar 17, 2025
10 checks passed
@github-project-automation github-project-automation bot moved this from PR [Greenlit] to Done in Roo Code Roadmap Mar 17, 2025
mrubens added a commit that referenced this pull request Mar 18, 2025
This reverts commit df80e96, reversing
changes made to dc302f7.
mrubens added a commit that referenced this pull request Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request lgtm This PR has been approved by a maintainer size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants