fix: read and merge file-path MCP configs instead of dropping them#1192
Open
qozle wants to merge 1 commit intoanthropics:mainfrom
Open
fix: read and merge file-path MCP configs instead of dropping them#1192qozle wants to merge 1 commit intoanthropics:mainfrom
qozle wants to merge 1 commit intoanthropics:mainfrom
Conversation
…g them mergeMcpConfigs() stored file paths in a variable but always returned only the inline-JSON merged result when inline configs were present. Since the action always prepends its own inline JSON config (e.g. github_comment server), user-provided file paths (like --mcp-config /tmp/mcp-notion.json) were silently dropped — the server was never connected at runtime. Now reads file-path configs from disk with readFileSync and merges their mcpServers into the combined config. Invalid or missing files log a warning and continue gracefully. Closes anthropics#1191 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1df531e to
80e204d
Compare
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.
Summary
Fixes #1191.
mergeMcpConfigs()silently dropped file-path MCP configs when inline JSON configs were also present.merged.mcpServerswas always non-emptyJSON.stringify(merged), discarding the file path entirelyreadFileSyncand merges theirmcpServersinto the combined configTest plan
bun test— 655/655 passbun run typecheck— cleanbun run format:check— clean