-
Notifications
You must be signed in to change notification settings - Fork 415
MCP server auto search and add to toolkit #562
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
# Conflicts: # src/agentscope/service/service_toolkit.py
make rich package optional minor clean
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job, please see the inline comments for details.
examples/conversation_with_react_agent/code/react_agent_with_auto_mcp_toolkit.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The implementation needs to be further discussed, and a configuration of the service toolkit maybe better. For example
toolkit = ServiceToolkit(
mcp_search_allow=True,
mcp_search_model_config="xxx",
)
If mcp_search_allow
is True
, then we add the search
function to the toolkit automatically.
name: Pull Request
about: Create a pull request
Description
Add new methods in ServiceToolkit to automatically discover and add MCP servers.
ServiceToolkit.search_new_tool
requires a key functionality description (using keywords) as input. With the functionality keywords, Thesearch_new_tool
first searches viahttps://registry.npmjs.org/-/v1/search
API for a list of related MCP servers.ServiceToolkit.get_mcp_server_config_template
to obtain the MCP server configuration to guide the user or agent.ServiceToolkit.remove_auto_added_tool
is for an agent to delete the auto-added server if there are errors (e.g., missing API keys or invalid arguments).Checklist
Please check the following items before code is ready to be reviewed.