feat: MCP streamable_http connection test + auto-test on import

This commit is contained in:
QihuAI Design committed 2026-07-16 18:38:10 +08:00
1 parent feb9865b00
commit 6331e84185
3 files changed
+859 -479

No files matched your search

+4
View File
@@ -16,6 +16,7 @@ from ..models import (
)
from ..auth import get_current_user, get_current_user_id, get_current_user_id_optional
from ..middleware.log_service import LogService
from app.api.admin.mcp_admin import _test_mcp_server
router = APIRouter()
@@ -417,6 +418,9 @@ def upload_app(
db.add(server)
db.commit()
# 导入后自动做一次连通性测试,状态会同步为 connected / error
_test_mcp_server(server, db)
# 用户创建/导入的应用自动标记为已安装
existing_install = db.query(AppInstallation).filter(
AppInstallation.user_id == current_user.id,