fix: declare mcp as required dependency in setup.py - #86
Draft
nam20485 wants to merge 1 commit into
Draft
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Comment on lines
+11
to
+13
| install_requires=[ | ||
| "mcp>=1.24,<2", | ||
| ], |
There was a problem hiding this comment.
The codebase directly imports from google.adk (e.g., in auto_agent/agent.py and hitl_agent/tools/filesystem_tools.py), but google-adk is not declared in install_requires. To ensure a clean installation works without missing dependencies, please add google-adk to the list of required packages.
install_requires=[
"google-adk",
"mcp>=1.24,<2",
],
nam20485
marked this pull request as draft
August 8, 2026 00:25
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.
Summary
The HITL agent fails to import with
ModuleNotFoundError: No module named 'mcp'because themcppackage is never installed during setup. It is imported unconditionally by the agent code and transitively bygoogle.adk, but it was never declared as a dependency.Error
Root cause
mcpis an optional extra ofgoogle-adk(mcp>=1.24,<2 ; extra == "mcp"), but the agent imports it unconditionally. It was not declared in:setup.py→install_requires(was[])requirements.txtfiles existThe
prepare_hitl_agent.shscript runspip install -e .(line 187), which usessetup.py— somcpwas never installed.Fix
Add
mcp>=1.24,<2toinstall_requiresinsetup.py:Testing
Verified that after
pip install -e .,from mcp import ClientSessionandfrom google.adk.tools.mcp_tool.mcp_session_manager import StdioConnectionParamsboth succeed, and the agent loads without import errors.