Skip to content

Conversation

@strawgate
Copy link

Summary

Test plan

  • Added test: should read and merge mcp-config file path when no inline JSON exists
  • Added test: should merge file path config with inline JSON configs (fixes #754) - the exact scenario from the issue
  • Added test: should handle non-existent mcp-config file gracefully
  • Added test: should handle invalid JSON in mcp-config file gracefully
  • Added test: should merge multiple file paths
  • Existing tests continue to pass

Previously, when users provided `--mcp-config` with a file path in
`claude_args`, the file path was silently discarded if inline JSON
configs also existed (which the action always provides for its built-in
servers). This meant user-provided MCP servers from file configs were
never loaded.

The fix reads file paths at parse time using `readFileSync` and merges
their contents with inline JSON configs. Errors reading files (missing
file, invalid JSON) are logged as warnings but don't fail the action.

Fixes anthropics#754
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

User-provided MCP config file paths are silently discarded when action prepends inline JSON

1 participant