Commit ee181cf
♻️ Mcp Tools Management Page Development (#2771)
* 添加MCP管理界面,支持添加、删除、修改、启用、停止、查看MCP服务,支持用户自行添加和公共市场快速添加,目前公共市场快速添加只支持链接形式的MCP服务;
添加公共市场的浏览和搜索。
* 重构代码以符合项目规范,前端样式修改
* feat: Enhance MCP Tools functionality and UI
- Added new service enabling and disabling messages in English and Chinese localization files.
- Updated API endpoints for enabling and disabling MCP tools.
- Introduced new container service addition functionality in the MCP tools service.
- Refactored mcpToolsService to handle container services and improve error handling.
- Updated types for MCP tools to reflect new transport types and service details.
- Created a new SQL migration script to extend the mcp_record_t table for additional MCP tool attributes.
- Implemented a custom hook for managing MCP tools page state and interactions.
功能亮点:增强 MCP 工具的功能与用户界面
- 在英文和中文本地化文件中添加了启用和禁用服务的提示信息。
- 更新了用于启用和禁用 MCP 工具的 API 接口。
- 在 MCP 工具服务中引入了新增容器服务的功能。
- 重构了 mcpToolsService 以处理容器服务并改进错误处理机制。
- 更新了 MCP 工具的类型,以反映新的传输类型和服务详情。
- 创建了新的 SQL 迁移脚本,用于扩展 mcp_record_t 表以支持 MCP 工具的额外属性。
- 实现了自定义钩子,用于管理 MCP 工具页面的状态和交互。
* Rewrite the code to rename “market” to ‘registry’
Remove the “market_name” field from the mcp_record_t SQL extension and correct the spelling error in the source code
重构代码,将market命名转为registry
移除mcp_record_t扩展sql的market_name,修正拼写错误souce
* Add a community marketplace feature where users can upload their own MCPs to the community marketplace for other users to browse and discover.
添加社区市场功能,用户可以上传自己的MCP到社区市场供其它用户浏览发现。
* Support for displaying and filling in variables and request headers during quick addition in MCP Registry;
Removal of the old MCP Tools interface and uniform migration to the new interface;
Caching of the search bar in external marketplaces;
Update to the logic of the tool list on the Agent page, synchronized with the MCP Tools page
外部市场支持快速添加时的变量和请求头显示和填写;
去除mcp tools的旧接口,统一改为新接口;
外部市场搜索栏缓冲;
智能体页面工具列表逻辑更新,和mcp tools页面同步更新
* Add source and transport type method filters
增加来源和传输方式筛选
* /container/add: The App layer has been changed from “handling business logic” to “only making calls and mapping exceptions.”
Aggregation of props for frontend detail pop-ups.
New MCP domain exceptions have been added; the service layer throws MCP exceptions, and the App layer uniformly maps them to HTTP status codes.
/container/add 由 App 层“做业务”改为“只做调用+异常映射”。
前端详情弹窗 props 聚合。
新增 MCP 领域异常,service 层抛出MCP异常,app 层统一映射 HTTP 状态。
* Store tags as an array and add the ability to filter MCPs by tag.
将tags改为数组形式存储,新增用tag筛选mcp。
* Add restrictions on request headers; only Bearer tokens in the Authorization header are allowed.增加请求头填写限制,只允许Authorization的Bearer Token填写
* Supports displaying descriptions in Markdown format, supports expanding and collapsing descriptions, and supports descriptions of unlimited length.
支持描述markdown形式展示,支持描述展开和收起,支持无限长的描述。
* Add pagination to the community marketplace; add display of shipping methods and tags; add filtering by shipping methods and tags.
社区市场添加分页,添加传输方式和tag显示,添加传输方式和tag筛选.
* Optimized the display of installation package variables on the remote market details page;
Added a hyperlink entry point to the Modelscope MCP Plaza.
优化外部市场详情界面安装包变量显示;
新增魔搭mcp广场超链接入口。
* Fine-tune description style
微调描述样式
* Added container service port conflict verification and recommended port features;
When quickly adding a container from the external market, a port needs to be filled in;
Refactored the code of mcp_management_app and service, moving a large amount of data validation handling to the app, using Pydantic for validation, simplifying the code.
添加了容器服务端口冲突校验和推荐端口功能;
外部市场快速添加容器需要填写端口;
重构了mcp_managemeny_app和service的代码,讲大量数据检验处理移动到app中,利用Pydantic校验,简化代码。
* Data validation for the mcptools frontend form;
Fix the front-end and back-end integration errors of My Posts and Community Market;
Fix the display of description editing in My Posts editing and Community Market.
mcptools前端表单进行数据校验;
修复我的发布和社区市场前后端对接错误;
修复我的发布编辑和社区市场的描述编辑显示。
* 禁止oci形式mcp添加
* Add MCP.so hyperlink
添加MCP.so超链接
* Optimized the frontend's handling of OCI unsupported display.
Slightly optimized the backend code for OCI unsupported cases.
优化前端对oci的不支持显示。
稍微优化了后端对oci不支持的代码。
* Remove duplicate code
去除重复代码
* Optimization
Recommended ports are now random
Fixed container name duplication issue
Abstracted front-end code port handling to reduce duplicate code
Added a prompt for failed addition of services with duplicate names
Loading state between each MCP card is independent and does not interfere
优化
推荐端口现在改为随机
容器重名问题修复
前端代码端口处理问题抽象,减少重复代码
增加对重复命名服务添加失败的提示
每个mcp卡片之间加载状态独立不干扰
* Fixed the issue of accompanying registry_json errors when adding to the community market, and optimized redundant code
修复社区市场添加时附带registry_json错误的问题,并优化冗余代码
* Readjust, change stdio to a container
重新调整,把stdio改成容器
* Mini Fix
小修复
* ♻️ Refactor: Refactor the remote_mcp and mcp_management services, and adapt the Agent development page to the mcp service.
* 尝试优化前端代码架构,进行初步重构,优化了Props传递和hooks设计不合理的一部分问题;
删除mcp描述的markdown展示;
删除不必要的工具列表Model,改用统一Model Component。
* 二次重构,继续优化
* 前端代码样式重构,优化标题样式,去除所有圆角,修改主界面布局,去除我的发布,改为主界面导入的服务和发布的服务切换,优化搜索栏和筛选栏样式,优化卡片列表支持动态布局,优化详情弹窗显示,优化查看server.json和容器配置弹窗样式,修改标签样式,增加发布到社区的确认和修改弹窗,去除连通性校验弹窗,优化添加弹窗显示避免大小抖动,去除common.json中部分过时字段
后端去除last_sync_time字段和少量冗余代码
* 优化状态显示组件,移动端口组件
* 修复端口冲突显示bug
调整部分Types和const的代码写法
* 修改容器配置和server.json弹窗样式
修复小bug
* 修复更新合并带来的部分冲突,如/list和delete
由于接口变化,修改tag筛选为前端筛选
* ♻️ Refactor: Refactor the remote_mcp and mcp_management services, and adapt the Agent development page to the mcp service.
[Specification Details]
1. Modify healthcheck method.
* 修改部分post接口为get
* 修复输入了authorization_token但是list却不传authorization_token的问题.
修复删除Mcp不删除对应容器的问题
修复前端点击启用关闭不刷新的问题,并添加刷新工具中信息提示。
* 简化部分组件传递信息代码
* 修复我的发布详情界面滚动条问题
* 修复社区市场tag筛选项是按租户显示的问题;
社区市场传输类型筛选改为后端实现;
去除原来的http和sse,统一改为url;
修复部分代码不必要的null和可选性问题;
修复部分翻译键问题;
修复添加容器化服务的部分前端逻辑代码错误。
* 修复社区市场弹窗层级问题
* 修改发布代码逻辑
支持发布时修改config_json和url
删除healthcheck详细显示
* 整体页面色调改为绿色
* 修改主界面切换页签样式
修改主界面布局
* 修改卡片样式设计
* 改进添加和详情弹窗,缩小宽度,添加动态过渡
* 小修复
* 给发布的服务提供筛选栏
tag筛选改为前端筛选,删除相关代码
* 调整容器启用关闭以兼容k8s部署,现在会删除停止的容器,启用时重新拉取
* 修复详情界面切换服务状态信息显示不更新问题
* 修复页签字体不居中,筛选栏字体大小问题
* 前端代码组件分类
* 修复弹窗问题
* 改名
* 修复i18n缺失bug
* 删除部分未使用文本
* 小修复
* 添加测试文件
* 修改sql
* 更新文档
* ♻️ Refactor: Front-end style adjustment.
* ♻️ Refactor: Front-end style adjustment & test cases addition.
* ♻️ Refactor: Front-end style adjustment & test cases addition.
[Specification Details]
Fix frontend build.
* ♻️ Refactor: Revert to the container naming rules for launching containers in Docker and Kubernetes clients.
[Specification Details]
Modify the name of the update SQL statement and synchronize the Kubernetes init.sql file.
* ♻️ Refactor: Revert to the container naming rules for launching containers in Docker and Kubernetes clients.
[Specification Details]
1. Fix test cases.
* ♻️ Refactor: Add UUID when creating the container.
[Specification Details]
1. Fix test cases.
* 修复描述为空导致的搜索栏bug
修复社区市场不必要的来源显示
* 🐛 Bugfix: Fix the issue of missing fields in init.sql.
* 🐛 Bugfix: ModelAddDialog.tsx rollback
---------
Co-authored-by: panyehong <2655992392@qq.com>
Co-authored-by: panyehong <91180085+YehongPan@users.noreply.github.com>1 parent 1b93a61 commit ee181cf
83 files changed
Lines changed: 15095 additions & 5671 deletions
File tree
- backend
- apps
- consts
- database
- services
- docker
- sql
- doc/docs
- en/user-guide
- zh/user-guide
- frontend
- app/[locale]
- agents/components
- agentConfig
- mcp-tools
- components
- add
- community
- local
- registry
- models/components/model
- tenant-resources/components/resources
- components
- mcp
- tool-config
- const
- hooks
- agent
- mcpTools
- lib
- public/locales
- en
- zh
- services
- types
- k8s/helm/nexent/charts/nexent-common/files
- sdk/nexent/container
- test
- backend
- app
- database
- services
- sdk/container
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
| 82 | + | |
81 | 83 | | |
82 | 84 | | |
83 | 85 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
0 commit comments