Visitar URL original
Warn when MCP servers fail to connect at startup by bezabyte · Pull Request #2014 · anthropics/claude-code-action · GitHub
Skip to content

Warn when MCP servers fail to connect at startup - #2014

Open
bezabyte wants to merge 1 commit into
anthropics:mainfrom
bezabyte:fix/report-mcp-connection-failures
Open

bezabyte wants to merge 1 commit into
anthropics:mainfrom
bezabyte:fix/report-mcp-connection-failures

Conversation

@bezabyte

Copy link
Copy Markdown

Summary

The Agent SDK reports MCP connection failures in its startup message, but the action's default log omits them. An action can therefore complete successfully while a configured server is unavailable.

  • Emit a GitHub Actions warning when a server reports failed or needs-auth during startup. The warning includes the configured name and a next step, without logging server config or raw errors.
  • Document how to use --debug-file for connection details and how to choose the matching HTTP or SSE transport. A pending connection is normal and does not warn.

Fixes #813.

Verification

  • All 1,225 Bun tests, TypeScript, and Prettier passed.
  • Ran the base action with Claude Code 2.1.322 on GitHub Actions against loopback HTTP and SSE endpoints returning 404. The job showed both named warnings, wrote the underlying failures to the CLI debug file, and completed successfully using a fixture model response. Hosted run

This branch has not been deployed

No deployments
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.

Connection to MCPs fails without any logs

1 participant