Repository navigation
Conversation
ParseSource reads a legacy .mcp.json or an Agent Plugins mcp.json named
by a ConfigSource. A plugin mcp.json is read through os.Root at the
plugin root and validated per entry: an invalid server is returned with
its error while its siblings still load, and a bad file, scope, or top
level fails the whole plugin. Plugin stdio servers resolve command and
cwd inside the plugin, get PLUGIN_ROOT and PLUGIN_DATA, and expand
${PLUGIN_ROOT} and ${PLUGIN_DATA} in args, env values, and cwd. Plugin
HTTP servers require HTTPS unless the host is loopback and send their
headers through the same-origin client.
Manager.ReloadSources takes ConfigSources, keeps Reload for plain
paths, rejects server names shared across files with an error on the
later entry, and reconnects a server when its plugin scope changes.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VpiVZBgFqiSdRKrH8dPSPT
This was referenced Nov 16, 2026
…gent-plugins/09-plugin-mcp-config
…gent-plugins/09-plugin-mcp-config
…gent-plugins/09-plugin-mcp-config
The Manager computes its config sources from a function registered with SetSources. ReloadCurrent and config-change reloads call it on every attempt and retry while the sources keep changing; Reconnect reloads the current sources once the first reload settles. A source position change or a ConfigSource.LoadError change reloads, a plugin source with a LoadError reports it instead of loading, and a plugin server whose <plugin>/<server> source is a legacy server's name is rejected. PluginSource builds a plugin's mcp.json source with its data directory. The agent registers its .mcp.json files as the sources and reloads with ReloadCurrent. The external ParseSource tests move to the test change. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VpiVZBgFqiSdRKrH8dPSPT
…gent-plugins/09-plugin-mcp-config
…garrett/agent-plugins/09-plugin-mcp-config
…garrett/agent-plugins/09-plugin-mcp-config
f0ssel
force-pushed
the
garrett/agent-plugins/09-plugin-mcp-config
branch
from
November 16, 2026 23:25
db61e5a to
d01df9a
Compare
…garrett/agent-plugins/09-plugin-mcp-config
…garrett/agent-plugins/09-plugin-mcp-config
This branch has not been deployed
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.
ParseSourcereads a legacy.mcp.jsonor a pluginmcp.json(throughos.Rootat the plugin root) and validates plugin entries individually, so one bad server doesn't take down its siblings. Plugin stdio servers resolvecommand/cwdinside the plugin and getPLUGIN_ROOT/PLUGIN_DATA; HTTP servers require HTTPS unless loopback.The Manager now reloads from sources registered with
SetSources(ReloadCurrent, config-change reloads, andReconnectall call it), retrying while the sources keep changing. A plugin source can carry aLoadError,PluginSourcebuilds a plugin's source with its data directory, and a plugin server whose<plugin>/<server>source matches a legacy server name is rejected. The agent registers its.mcp.jsonfiles as the sources; #32274 adds plugin sources.Part 2 of the #29325 split, with the
agentmcpAPI changes from #29326 folded in so the package changes once. Tests follow in the next PR.Stack (base
main, replaces #29321–#30577):Generated by Claude Code