feat(agent): Added support for MCP to Friday#124
feat(agent): Added support for MCP to Friday#124hongxicheng wants to merge 5 commits intoagentscope-ai:mainfrom
Conversation
Summary of ChangesHello @hongxicheng, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly expands the capabilities of the Friday agent by integrating Model Context Protocol (MCP) support. It provides a robust framework for users to define and interact with external services, whether running locally or remotely, enhancing Friday's ability to leverage diverse tools and data sources. The changes include both the necessary backend infrastructure for managing these connections and a user-friendly interface for configuration. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces support for the Model Context Protocol (MCP) to the Friday agent, allowing it to connect to and utilize external services. The changes include backend logic for managing local and remote MCP server connections, a new UI for configuring these servers, and updates to the argument parsing and main application flow to integrate this new functionality. My review focuses on improving the robustness of the new connection logic, ensuring consistency between frontend validation and backend parsing, and addressing a bug in the new UI component. I've also suggested a small cleanup for better code maintainability.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces Model Context Protocol (MCP) server management functionality to the application. Key changes include adding a json5 dependency, implementing new Python argument parsing for --mcpServers (a JSON list of configurations), and creating a new mcp_manager module in the backend to connect and manage both local and remote MCP servers using agentscope.mcp clients. The frontend now features a comprehensive UI for MCP server management, including components for adding, deleting, editing (with simple and advanced JSON modes), and enabling/disabling servers. This UI is integrated into the Friday chat page via a new MCPManagementSheet and uses a dedicated MCPContext for state management and validation. Translation keys for the new MCP features have been added for both English and Chinese locales. Additionally, the FridaySettingRoomContext was updated to ensure local configuration state is only updated upon successful saving.
Description
Checklist
Please check the following items before code is ready to be reviewed.
npm run formatcommand in the root directory