Skip to content

fix(mcp): serve entry points exit with the mcp-extra hint, not a traceback - #56

Merged
Icaro0310 merged 3 commits into
mainfrom
fix/mcp-extra-guard
Oct 15, 2026
Merged

Icaro0310 merged 3 commits into
mainfrom
fix/mcp-extra-guard

Conversation

@Icaro0310

@Icaro0310 Icaro0310 commented Oct 15, 2026 •

Copy link
Copy Markdown
Owner

Both MCP server entry points (devin-devkit-mcp, devin-skill-catalog-mcp) called build_server().run(transport="stdio") bare, so a missing mcp extra surfaced as a raw ImportError traceback instead of the install hint _make_app already raises.

Wrap the .run() call in each main(): on ImportError, print error: {exc} to stderr and exit 1 — the published devin_memory pattern.

Adds test_main_missing_mcp_extra_exits_with_hint to both tests/test_mcp.py files (monkeypatches build_server to raise, asserts SystemExit(1), stderr contains the hint, no traceback).

Tests: pytest tests/test_mcp.py — 12 passed / 11 passed (+1 skipped each: mcp extra not installed).

Generated with Devin


Devin Review

…eback

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
devin-ai-integration[bot]

This comment was marked as resolved.

… tests

- main() now guards only build_server(): an ImportError while building
  the app is the missing-extra case (hint on stderr, exit 1); a startup
  ImportError from .run() propagates with its traceback instead of
  being mislabeled.
- New tests block mcp in sys.modules so the real _make_app import chain
  produces the exit — stubbed build_server could not catch a broken
  hint or a leaked traceback path.
- Changelog entries for devkit and skill-catalog.
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Oct 15, 2026
devin-ai-integration[bot]

This comment was marked as resolved.

github-actions[bot]
github-actions Bot previously approved these changes Oct 15, 2026
Regression test for the changed behavior: a stub server whose run()
raises ImportError must propagate the traceback rather than exit 1
with the missing-extra hint. One test per package entry point.
@Icaro0310
Icaro0310 merged commit ae6cb6d into main Oct 15, 2026
21 checks passed
@Icaro0310
Icaro0310 deleted the fix/mcp-extra-guard branch October 15, 2026 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant