Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
e15e0c1
Merge remote-tracking branch 'origin/develop' into mcp_tools_develop
HelloWorldGitHub114 Feb 25, 2026
f0271c3
Merge remote-tracking branch 'upstream/develop' into mcp_tools_develop
HelloWorldGitHub114 Mar 8, 2026
1ca9856
添加MCP管理界面,支持添加、删除、修改、启用、停止、查看MCP服务,支持用户自行添加和公共市场快速添加,目前公共市场快速添加只支持链接形…
HelloWorldGitHub114 Mar 10, 2026
7bdc366
Merge branch 'ModelEngine-Group:main' into mcp_tools_develop
HelloWorldGitHub114 Mar 10, 2026
6ab44f1
重构代码以符合项目规范,前端合理划分模块和层级
HelloWorldGitHub114 Mar 18, 2026
51310a0
Merge remote-tracking branch 'upstream/develop' into mcp_tools_develop
HelloWorldGitHub114 Mar 19, 2026
b3a7baf
feat: Enhance MCP Tools functionality and UI
HelloWorldGitHub114 Mar 24, 2026
1435eab
Rewrite the code to rename “market” to ‘registry’
HelloWorldGitHub114 Mar 24, 2026
552ffbd
Add a community marketplace feature where users can upload their own …
HelloWorldGitHub114 Mar 27, 2026
173f6f8
Support for displaying and filling in variables and request headers d…
HelloWorldGitHub114 Mar 30, 2026
f6c9832
Merge remote-tracking branch 'origin/develop' into mcp_tools_develop
HelloWorldGitHub114 Mar 30, 2026
54299e0
Add source and transport type method filters
HelloWorldGitHub114 Mar 30, 2026
cb826b4
/container/add: The App layer has been changed from “handling busines…
HelloWorldGitHub114 Mar 31, 2026
a57b2d4
Store tags as an array and add the ability to filter MCPs by tag.
HelloWorldGitHub114 Mar 31, 2026
9c1783c
Add restrictions on request headers; only Bearer tokens in the Author…
HelloWorldGitHub114 Apr 2, 2026
8c12676
Supports displaying descriptions in Markdown format, supports expandi…
HelloWorldGitHub114 Apr 2, 2026
a6bef8a
Add pagination to the community marketplace; add display of shipping …
HelloWorldGitHub114 Apr 2, 2026
9430305
Merge remote-tracking branch 'origin/develop' into mcp_tools_develop
HelloWorldGitHub114 Apr 2, 2026
245b3af
Optimized the display of installation package variables on the remote…
HelloWorldGitHub114 Apr 2, 2026
f467b3f
Fine-tune description style
HelloWorldGitHub114 Apr 3, 2026
3c847fc
Added container service port conflict verification and recommended po…
HelloWorldGitHub114 Apr 4, 2026
f5fe172
Data validation for the mcptools frontend form;
HelloWorldGitHub114 Apr 4, 2026
68ada06
禁止oci形式mcp添加
HelloWorldGitHub114 Apr 5, 2026
ebba480
Add MCP.so hyperlink
HelloWorldGitHub114 Apr 5, 2026
f9c46b4
Optimized the frontend's handling of OCI unsupported display.
HelloWorldGitHub114 Apr 10, 2026
baa970e
Merge remote-tracking branch 'origin/develop' into mcp_tools_develop
HelloWorldGitHub114 Apr 10, 2026
09d4286
Remove duplicate code
HelloWorldGitHub114 Apr 10, 2026
450671e
Optimization
HelloWorldGitHub114 Apr 11, 2026
932e17b
Fixed the issue of accompanying registry_json errors when adding to t…
HelloWorldGitHub114 Apr 11, 2026
ae73778
Readjust, change stdio to a container
HelloWorldGitHub114 Apr 11, 2026
ecd0eb3
Mini Fix
HelloWorldGitHub114 Apr 11, 2026
5acc6ae
Merge remote-tracking branch 'origin/develop' into mcp_tools_develop
YehongPan Apr 22, 2026
4a05b20
♻️ Refactor: Refactor the remote_mcp and mcp_management services, and…
YehongPan Apr 27, 2026
f1a5557
尝试优化前端代码架构,进行初步重构,优化了Props传递和hooks设计不合理的一部分问题;
HelloWorldGitHub114 Apr 24, 2026
3ff0f34
二次重构,继续优化
HelloWorldGitHub114 Apr 25, 2026
91c0c23
前端代码样式重构,优化标题样式,去除所有圆角,修改主界面布局,去除我的发布,改为主界面导入的服务和发布的服务切换,优化搜索栏和筛选栏样式,…
HelloWorldGitHub114 Apr 26, 2026
be735bf
优化状态显示组件,移动端口组件
HelloWorldGitHub114 Apr 27, 2026
265496e
修复端口冲突显示bug
HelloWorldGitHub114 Apr 27, 2026
d281bdd
修改容器配置和server.json弹窗样式
HelloWorldGitHub114 Apr 27, 2026
8ea9cd2
♻️ Refactor: Refactor the remote_mcp and mcp_management services, and…
YehongPan Apr 28, 2026
14cdb88
修复更新合并带来的部分冲突,如/list和delete
HelloWorldGitHub114 Apr 29, 2026
ddba29f
Merge branch 'mcp_tools_develop' of https://github.com/HelloWorldGitH…
HelloWorldGitHub114 Apr 29, 2026
98429db
修改部分post接口为get
HelloWorldGitHub114 Apr 29, 2026
6df19f5
修复输入了authorization_token但是list却不传authorization_token的问题.
HelloWorldGitHub114 Apr 29, 2026
1e5d8c1
简化部分组件传递信息代码
HelloWorldGitHub114 Apr 30, 2026
51ea822
Merge branch 'develop' of https://github.com/ModelEngine-Group/nexent…
HelloWorldGitHub114 Apr 30, 2026
8c172cc
修复我的发布详情界面滚动条问题
HelloWorldGitHub114 Apr 30, 2026
fdaa59f
Merge pull request #2910 from ModelEngine-Group/release/v2.1.0
Dallas98 Apr 30, 2026
7544430
修复社区市场tag筛选项是按租户显示的问题;
HelloWorldGitHub114 May 5, 2026
972e5b0
修复社区市场弹窗层级问题
HelloWorldGitHub114 May 5, 2026
be79848
修改发布代码逻辑
HelloWorldGitHub114 May 5, 2026
9e61616
整体页面色调改为绿色
HelloWorldGitHub114 May 5, 2026
0377c46
修改主界面切换页签样式
HelloWorldGitHub114 May 5, 2026
471b2ad
🐛 Bugfix: Fixed the issue of conversation history not being saved cor…
YehongPan May 6, 2026
f4bfe33
修改卡片样式设计
HelloWorldGitHub114 May 6, 2026
c372b76
改进添加和详情弹窗,缩小宽度,添加动态过渡
HelloWorldGitHub114 May 7, 2026
82462b7
小修复
HelloWorldGitHub114 May 7, 2026
1364259
给发布的服务提供筛选栏
HelloWorldGitHub114 May 7, 2026
dc8c978
Merge remote-tracking branch 'origin/develop' into mcp_tools_develop
HelloWorldGitHub114 May 7, 2026
14ba6a8
Merge branch 'ModelEngine-Group:main' into mcp_tools_develop
HelloWorldGitHub114 May 7, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions backend/apps/config_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from apps.model_managment_app import router as model_manager_router
from apps.oauth_app import router as oauth_router
from apps.prompt_app import router as prompt_router
from apps.mcp_management_app import router as mcp_management_router
from apps.remote_mcp_app import router as remote_mcp_router
from apps.skill_app import router as skill_router
from apps.tenant_config_app import router as tenant_config_router
Expand Down Expand Up @@ -64,6 +65,7 @@
app.include_router(prompt_router)
app.include_router(skill_router)
app.include_router(tenant_config_router)
app.include_router(mcp_management_router)
app.include_router(remote_mcp_router)
app.include_router(tenant_router)
app.include_router(group_router)
Expand Down
302 changes: 302 additions & 0 deletions backend/apps/mcp_management_app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,302 @@
import logging
from typing import Optional

from fastapi import APIRouter, Depends, Header, HTTPException, Query, Request
from fastapi.responses import JSONResponse
from http import HTTPStatus

from consts.exceptions import (
MCPConnectionError,
McpNotFoundError,
McpValidationError,
UnauthorizedError,
)
from consts.model import (
RegistryListQuery,
CommunityListRequest,
CommunityPublishRequest,
CommunityUpdateRequest,
)
from services.mcp_management_service import (
list_community_mcp_services,
list_community_mcp_tag_stats,
list_my_community_mcp_services,
list_registry_mcp_services,
publish_community_mcp_service,
update_community_mcp_service,
delete_community_mcp_service,
)
from utils.auth_utils import get_current_user_info

router = APIRouter(prefix="/mcp-tools")
logger = logging.getLogger("mcp_management_app")


# ---------------------------------------------------------------------------
# Registry Endpoints (MCP Registry - external service)
# ---------------------------------------------------------------------------

@router.get("/registry/list")
async def list_registry_mcp_services_api(
query: RegistryListQuery = Depends(),
authorization: Optional[str] = Header(None),

Check failure on line 42 in backend/apps/mcp_management_app.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use "Annotated" type hints for FastAPI dependency injection

See more on https://sonarcloud.io/project/issues?id=ModelEngine-Group_nexent&issues=AZ19Z22SSTzC4JOHLeav&open=AZ19Z22SSTzC4JOHLeav&pullRequest=2771
http_request: Request = None,
):
"""
List MCP services from the official MCP Registry.
"""
try:
get_current_user_info(authorization, http_request)

data = await list_registry_mcp_services(
search=query.search,
include_deleted=query.include_deleted,
updated_since=query.updated_since,
version=query.version,
cursor=query.cursor,
limit=query.limit,
)
return JSONResponse(
status_code=HTTPStatus.OK,
content=data,
)
except UnauthorizedError as exc:
raise HTTPException(
status_code=HTTPStatus.UNAUTHORIZED,
detail=str(exc),
)
except HTTPException:
raise
except Exception as exc:
logger.error(f"Failed to list MCP registry services: {exc}")
raise HTTPException(
status_code=HTTPStatus.INTERNAL_SERVER_ERROR,
detail="Failed to list MCP registry services"
)


# ---------------------------------------------------------------------------
# Community Endpoints
# ---------------------------------------------------------------------------

@router.get("/community/list")
async def list_community_mcp_services_api(
query: CommunityListRequest = Depends(),
authorization: Optional[str] = Header(None),
http_request: Request = None,
):
"""
List public community MCP services.
"""
try:
get_current_user_info(authorization, http_request)
data = await list_community_mcp_services(
search=query.search,
tag=query.tag,
transport_type=query.transport_type,
cursor=query.cursor,
limit=query.limit,
)
return JSONResponse(
status_code=HTTPStatus.OK,
content={"status": "success", "data": data},
)
except UnauthorizedError as exc:
raise HTTPException(
status_code=HTTPStatus.UNAUTHORIZED,
detail=str(exc),
)
except HTTPException:
raise
except Exception as exc:
logger.error(f"Failed to list MCP community services: {exc}")
raise HTTPException(
status_code=HTTPStatus.INTERNAL_SERVER_ERROR,
detail="Failed to list MCP community services"
)


@router.get("/community/tags/stats")
async def list_community_mcp_tag_stats_api(
authorization: Optional[str] = Header(None),
http_request: Request = None,
):
"""
Get community MCP tag statistics.
"""
try:
get_current_user_info(authorization, http_request)
stats = list_community_mcp_tag_stats()
return JSONResponse(
status_code=HTTPStatus.OK,
content={"status": "success", "data": stats},
)
except UnauthorizedError as exc:
raise HTTPException(
status_code=HTTPStatus.UNAUTHORIZED,
detail=str(exc),
)
except HTTPException:
raise
except Exception as exc:
logger.error(f"Failed to list community MCP tag stats: {exc}")
raise HTTPException(
status_code=HTTPStatus.INTERNAL_SERVER_ERROR,
detail="Failed to list community MCP tag stats"
)


@router.post("/community/publish")
async def publish_community_mcp_service_api(
payload: CommunityPublishRequest,
authorization: Optional[str] = Header(None),
http_request: Request = None,
):
"""
Publish a local MCP service to the community.
"""
try:
user_id, tenant_id, _ = get_current_user_info(authorization, http_request)
community_id = await publish_community_mcp_service(
tenant_id=tenant_id,
user_id=user_id,
mcp_id=payload.mcp_id,
name=payload.name,
description=payload.description,
version=payload.version,
tags=payload.tags,
mcp_server=payload.mcp_server,
config_json=payload.config_json,
)
return JSONResponse(
status_code=HTTPStatus.OK,
content={"status": "success", "data": {"community_id": community_id}},
)
except McpNotFoundError as exc:
raise HTTPException(status_code=HTTPStatus.NOT_FOUND, detail=str(exc))
except McpValidationError as exc:
raise HTTPException(status_code=HTTPStatus.BAD_REQUEST, detail=str(exc))
except UnauthorizedError as exc:
raise HTTPException(
status_code=HTTPStatus.UNAUTHORIZED,
detail=str(exc),
)
except HTTPException:
raise
except Exception as exc:
logger.error(f"Failed to publish MCP community service: {exc}")
raise HTTPException(
status_code=HTTPStatus.INTERNAL_SERVER_ERROR,
detail="Failed to publish MCP community service"
)


@router.put("/community/update")
async def update_community_mcp_service_api(
payload: CommunityUpdateRequest,
authorization: Optional[str] = Header(None),

Check failure on line 197 in backend/apps/mcp_management_app.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use "Annotated" type hints for FastAPI dependency injection

See more on https://sonarcloud.io/project/issues?id=ModelEngine-Group_nexent&issues=AZ19Z22SSTzC4JOHLeaz&open=AZ19Z22SSTzC4JOHLeaz&pullRequest=2771
http_request: Request = None,
):
"""
Update a community MCP service.
"""
try:
user_id, tenant_id, _ = get_current_user_info(authorization, http_request)
await update_community_mcp_service(
tenant_id=tenant_id,
user_id=user_id,
community_id=payload.community_id,
name=payload.name,
description=payload.description,
tags=payload.tags,
version=payload.version,
registry_json=payload.registry_json,
)
return JSONResponse(
status_code=HTTPStatus.OK,
content={"status": "success"},
)
except McpNotFoundError as exc:
raise HTTPException(status_code=HTTPStatus.NOT_FOUND, detail=str(exc))
except McpValidationError as exc:
raise HTTPException(status_code=HTTPStatus.BAD_REQUEST, detail=str(exc))
except UnauthorizedError as exc:
raise HTTPException(
status_code=HTTPStatus.UNAUTHORIZED,
detail=str(exc),
)
except HTTPException:
raise
except Exception as exc:
logger.error(f"Failed to update MCP community service: {exc}")
raise HTTPException(
status_code=HTTPStatus.INTERNAL_SERVER_ERROR,
detail="Failed to update MCP community service"
)


@router.delete("/community/delete")
async def delete_community_mcp_service_api(
community_id: int = Query(gt=0),
authorization: Optional[str] = Header(None),

Check failure on line 241 in backend/apps/mcp_management_app.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use "Annotated" type hints for FastAPI dependency injection

See more on https://sonarcloud.io/project/issues?id=ModelEngine-Group_nexent&issues=AZ19Z22SSTzC4JOHLea1&open=AZ19Z22SSTzC4JOHLea1&pullRequest=2771
http_request: Request = None,
):
"""
Delete a community MCP service.
"""
try:
user_id, tenant_id, _ = get_current_user_info(authorization, http_request)
await delete_community_mcp_service(
tenant_id=tenant_id,
user_id=user_id,
community_id=community_id,
)
return JSONResponse(
status_code=HTTPStatus.OK,
content={"status": "success"},
)
except McpNotFoundError as exc:
raise HTTPException(status_code=HTTPStatus.NOT_FOUND, detail=str(exc))
except UnauthorizedError as exc:
raise HTTPException(
status_code=HTTPStatus.UNAUTHORIZED,
detail=str(exc),
)
except HTTPException:
raise
except Exception as exc:
logger.error(f"Failed to delete MCP community service: {exc}")
raise HTTPException(
status_code=HTTPStatus.INTERNAL_SERVER_ERROR,
detail="Failed to delete MCP community service"
)


@router.get("/community/mine")
async def list_my_community_mcp_services_api(
authorization: Optional[str] = Header(None),

Check failure on line 277 in backend/apps/mcp_management_app.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use "Annotated" type hints for FastAPI dependency injection

See more on https://sonarcloud.io/project/issues?id=ModelEngine-Group_nexent&issues=AZ19Z22SSTzC4JOHLea2&open=AZ19Z22SSTzC4JOHLea2&pullRequest=2771
http_request: Request = None,
):
"""
List MCP services published by the current user to the community.
"""
try:
_, tenant_id, _ = get_current_user_info(authorization, http_request)
data = await list_my_community_mcp_services(tenant_id=tenant_id)
return JSONResponse(
status_code=HTTPStatus.OK,
content={"status": "success", "data": data},
)
except UnauthorizedError as exc:
raise HTTPException(
status_code=HTTPStatus.UNAUTHORIZED,
detail=str(exc),
)
except HTTPException:
raise
except Exception as exc:
logger.error(f"Failed to list my MCP community services: {exc}")
raise HTTPException(
status_code=HTTPStatus.INTERNAL_SERVER_ERROR,
detail="Failed to list my MCP community services"
)
Loading