Commit Graph

32 Commits

Author SHA1 Message Date
Akhilesh Kumar 54a9bce2b7 refactor(core): architectural decoupling of MCP management and tool isolation
This commit implements a proper architectural decoupling of MCP servers from the global ToolRegistry, eliminating the need for the `__agent__` naming prefix while maintaining perfect isolation.

Key changes:
1. McpClientManager now acts as a pure connection pool, keying clients by a hash of their configuration. This allows multiple agents or extensions to define servers with the same name (e.g. 'github') without collision.
2. McpClient supports multiple 'RegistrySets', allowing it to push discovered tools, prompts, and resources into arbitrary isolated registries.
3. LocalAgentExecutor now creates and manages its own isolated Tool, Prompt, and Resource registries. The `__agent__` prefix is removed, and tools retain their standard `mcp_{server}_{tool}` FQN.
4. CoreToolScheduler and policy checks are reverted to use standard names, as isolation is now handled at the registry level rather than via string namespacing.
5. Proxied the Config object within subagents to ensure system-wide components (like prompt templates) automatically use the agent-specific registries.
6. Verified through comprehensive updates to core tests for agents, MCP management, and registries.
2026-03-13 19:23:33 +00:00
Jacob Richman 352fb0c976 fix(mcp): Notifications/tools/list_changed support not working (#21050)
Co-authored-by: Bryan Morgan <bryanmorgan@google.com>
2026-03-04 09:46:17 -05:00
Spencer 20d884da2f fix(core): reduce intrusive MCP errors and deduplicate diagnostics (#20232) 2026-02-27 20:04:36 +00:00
Himanshu Soni e4204d5939 fix(core): create new McpClient on restart to apply updated config (#20126) 2026-02-24 18:03:33 +00:00
Himanshu Soni 774ae220be fix(core): prevent state corruption in McpClientManager during collis (#19782) 2026-02-23 18:35:31 +00:00
Dmitry Lyalin f5dd1068f6 fix(core): complete MCP discovery when configured servers are skipped (#18586)
Co-authored-by: christine betts <chrstn@uw.edu>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-02-11 16:30:46 +00:00
christine betts 14e2e09d10 Match on extension ID when stopping extensions (#18218) 2026-02-03 19:29:15 +00:00
christine betts d8837ec95e Remove MCP servers on extension uninstall (#18121)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-02-03 16:18:09 +00:00
Adib234 12a5490bcf Allow prompt queueing during MCP initialization (#17395) 2026-01-23 23:32:06 +00:00
Jasmeet Bhatia a060e6149a feat(mcp): add enable/disable commands for MCP servers (#11057) (#16299)
Co-authored-by: Allen Hutchison <adh@google.com>
2026-01-22 23:38:06 +00:00
David Soria Parra b288f124b2 fix(cli): send gemini-cli version as mcp client version (#13407)
Co-authored-by: Taylor Mullen <ntaylormullen@google.com>
2026-01-20 22:01:18 +00:00
christine betts 166e04a8dd Fix mcp instructions (#16439) 2026-01-20 16:10:21 +00:00
Ramón Medrano Llamas 1182168bd9 feat(core): enhanced anchored iterative context compression with self-verification (#15710) 2026-01-20 08:43:15 +00:00
Adib234 1e8f87fbdf Add support for running available commands prior to MCP servers loading (#15596) 2026-01-15 20:33:16 +00:00
HyeongHo Jun 8a0190ca3b fix(core): handle unhandled promise rejection in mcp-client-manager (#14701) 2026-01-02 16:06:56 +00:00
Alex Gavrilescu 560550f5df feat: Add support for MCP Resources (#13178)
Co-authored-by: Jack Wotherspoon <jackwoth@google.com>
2025-12-09 02:43:12 +00:00
Christian Gunderman 025e450ac2 Disallow floating promises. (#14605) 2025-12-06 00:12:49 +00:00
Adib234 5f60281d25 Add support for MCP dynamic tool update by notifications/tools/list_changed (#14375) 2025-12-04 21:04:38 +00:00
Jack Wotherspoon bdbbe9232d feat: consolidate remote MCP servers to use url in config (#13762) 2025-12-03 01:01:33 +00:00
christine betts 844d3a4dfa Always use MCP server instructions (#14297) 2025-12-01 17:17:54 +00:00
christine betts bc365f1eaa Add support for MCP server instructions behind config option (#13432)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2025-11-26 18:08:47 +00:00
Jacob MacDonald da4fa5ad75 Extensions MCP refactor (#12413) 2025-11-04 15:51:18 +00:00
Sehoon Shon e9c7a80b12 migrate console.error to coreEvents for mcp-client-manager and google-auth-provider (#12342) 2025-10-31 18:52:56 +00:00
Jacob MacDonald cc081337b7 Initial support for reloading extensions in the CLI - mcp servers only (#12239) 2025-10-30 18:05:49 +00:00
Tommaso Sciortino 85f3a8c210 Migrate to coreEvents/debugLogger (#12107) 2025-10-27 23:46:35 +00:00
Zack Birkenbuel cc7e1472f9 Pass whole extensions rather than just context files (#10910)
Co-authored-by: Jake Macdonald <jakemac@google.com>
2025-10-20 23:15:23 +00:00
Tommaso Sciortino 2b05cf3bb4 Allow users to type while waiting for MCP servers (#8021) 2025-09-08 23:37:36 +00:00
shrutip90 2a0e69d833 fix(trust): Update config.isTrustedFolder (#7373) 2025-08-29 02:41:33 +00:00
shrutip90 a0fbe000ee Skip MCP server connections in untrusted folders (#7358) 2025-08-28 22:46:27 +00:00
Pascal Birchler 03bcbcc10d Add MCP loading indicator when initializing Gemini CLI (#6923) 2025-08-28 19:53:56 +00:00
Pascal Birchler 0f031a7f89 Explict imports & exports with type modifier (#3774) 2025-08-25 22:04:53 +00:00
Ramón Medrano Llamas b24c5887c4 feat: restart MCP servers on /mcp refresh (#5479)
Co-authored-by: Brian Ray <62354532+emeryray2002@users.noreply.github.com>
Co-authored-by: N. Taylor Mullen <ntaylormullen@google.com>
2025-08-19 19:03:19 +00:00