Fix MCP servers in multi root wrokspaces - #52161
Closed
OmChillure wants to merge 4 commits into
Closed
Conversation
zed-codeowner-coordinator
Bot
requested review from
a team,
cameron1024 and
reflectronic
and removed request for
a team
March 23, 2026 05:40
5 tasks
chirivelli
pushed a commit
to chirivelli/zed
that referenced
this pull request
Jul 10, 2026
### Closes zed-industries#51951 ## Self-Review Checklist - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the UI/UX checklist - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable #### Note : Reopens previous work from closed PR zed-industries#52161 (fork was deleted) ## Video [Screencast from 2026-03-22 23-26-06.webm](https://github.com/user-attachments/assets/ab68e47a-7e74-4f1e-991d-8ca4fed7952c) ## Release Notes: - Fixed MCP servers from `.zed/settings.json` not being discovered when multiple project folders are open in a workspace. --------- Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de> Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com> Co-authored-by: Bennet Bo Fenner <bennet@zed.dev>
jolutz
pushed a commit
to jolutz/zed
that referenced
this pull request
Aug 8, 2026
### Closes zed-industries#51951 ## Self-Review Checklist - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the UI/UX checklist - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable #### Note : Reopens previous work from closed PR zed-industries#52161 (fork was deleted) ## Video [Screencast from 2026-03-22 23-26-06.webm](https://github.com/user-attachments/assets/ab68e47a-7e74-4f1e-991d-8ca4fed7952c) ## Release Notes: - Fixed MCP servers from `.zed/settings.json` not being discovered when multiple project folders are open in a workspace. --------- Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de> Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com> Co-authored-by: Bennet Bo Fenner <bennet@zed.dev>
playdohface
pushed a commit
to playdohface/zed
that referenced
this pull request
Aug 29, 2026
### Closes zed-industries#51951 ## Self-Review Checklist - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the UI/UX checklist - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable #### Note : Reopens previous work from closed PR zed-industries#52161 (fork was deleted) ## Video [Screencast from 2026-03-22 23-26-06.webm](https://github.com/user-attachments/assets/ab68e47a-7e74-4f1e-991d-8ca4fed7952c) ## Release Notes: - Fixed MCP servers from `.zed/settings.json` not being discovered when multiple project folders are open in a workspace. --------- Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de> Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com> Co-authored-by: Bennet Bo Fenner <bennet@zed.dev>
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.
Context
MCP servers defined in
.zed/settings.jsonof a project folder were not discovered when that folder was added to a workspace that already contained another project.ContextServerStorepreviously read context server settings only from the first visible worktree viaresolve_project_settings(). This meant servers configured in any additional project folder were silently ignored.Added
resolve_all_context_server_settings()which iterates all visible worktrees and merges theircontext_serversmaps (first-match-wins for duplicate IDs).Closes #51951
How to Review
Single file change in
context_server_store.rs:resolve_all_context_server_settings(lines 862–879)resolve_project_settings().context_serversSelf-Review Checklist
Video
Screencast.from.2026-03-22.23-26-06.webm
Release Notes:
.zed/settings.jsonnot being discovered when multiple project folders are open in a workspace.