Skip to content

Improve MCP startup errors for missing server dependencies#7339

Open
Rishirandhawa wants to merge 2 commits into
microsoft:mainfrom
Rishirandhawa:fix/mcp-dependency-error-hints
Open

Improve MCP startup errors for missing server dependencies#7339
Rishirandhawa wants to merge 2 commits into
microsoft:mainfrom
Rishirandhawa:fix/mcp-dependency-error-hints

Conversation

@Rishirandhawa
Copy link
Copy Markdown

Summary

  • add MCP startup error formatting in McpWorkbench.list_tools() to surface actionable guidance instead of opaque actor crashes
  • include specific Playwright MCP install guidance when the configured stdio command targets @playwright/mcp
  • include command-not-found guidance for missing stdio executables
  • add tests covering both new startup error paths

Why

AssistantAgent MCP workflows often fail with generic connection errors when MCP server dependencies are missing. This makes the README quickstart hard to debug, especially for Playwright MCP setup.

Fixes #7337

Validation

  • python3 -m ruff check python/packages/autogen-ext/src/autogen_ext/tools/mcp/_workbench.py python/packages/autogen-ext/tests/tools/test_mcp_workbench_warnings_and_errors.py
  • uv run --package autogen-ext --extra mcp pytest -q packages/autogen-ext/tests/tools/test_mcp_workbench_warnings_and_errors.py -k "playwright_dependency_hint or missing_stdio_command or list_tools_actor_none_after_start"

@Rishirandhawa
Copy link
Copy Markdown
Author

Rishirandhawa commented Mar 3, 2026 via email

@Rishirandhawa
Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

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.

Improve error messages for missing MCP server dependencies in AssistantAgent

2 participants