fix(mcp): actionable error when the mcp extra is missing + document it - #35
Merged
Conversation
cfg-mcp is commonly launched by an MCP client (e.g. a one-click install deeplink) against a cfgit installed without the [mcp] extra — a plain 'pipx install cfgit' or 'pip install cfgit'. It then dies with 'install cfgit[mcp]', which is the WRONG fix for a pipx install (pip won't touch the pipx venv), so the client just shows a failed connection. Detect a pipx venv and lead with 'pipx inject cfgit mcp>=1.0,<2'; otherwise show 'pip install cfgit[mcp]'. Both note that the extra pins mcp<2. Add a README note to the MCP server section covering the extra and the deeplink footgun.
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.
cfg-mcpis commonly launched by an MCP client (e.g. a one-click install deeplink likecursor://...mcp/install?name=cfgit&config=...) against a cfgit installed without the[mcp]extra — a plainpipx install cfgitorpip install cfgit. It then dies withModuleNotFoundError: install cfgit[mcp], which the client surfaces as a failed connection.Two problems:
install cfgit[mcp]— but for a pipx install that's the wrong fix (pip install cfgit[mcp]doesn't touch the pipx venv). The user actually needspipx inject cfgit 'mcp>=1.0,<2'.Fix
/pipx/venvs/insys.prefix/sys.executable) and lead withpipx inject cfgit 'mcp>=1.0,<2'; otherwisepip install 'cfgit[mcp]'. Both note the extra pinsmcp<2.Verified both message branches render the right command; full suite 158 passed.