Skip to content

Commit d965828

Browse files
feat: add warn text for mcp server
1 parent 8196c11 commit d965828

13 files changed

Lines changed: 25 additions & 18 deletions

File tree

backend/app/service/mcp_server.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,7 @@ func updateMcpConfig(websiteID uint) {
387387
for _, server := range servers {
388388
if server.BaseURL != baseUrl {
389389
server.BaseURL = baseUrl
390+
server.HostIP = "127.0.0.1"
390391
go updateMcpServer(&server)
391392
}
392393
}
@@ -484,6 +485,7 @@ func addMCPProxy(websiteID uint) error {
484485
return buserr.WithErr(constant.ErrUpdateBuWebsite, err)
485486
}
486487
server.BaseURL = baseUrl
488+
server.HostIP = "127.0.0.1"
487489
go updateMcpServer(&server)
488490
}
489491
nginxInclude := fmt.Sprintf("/www/sites/%s/proxy/*.conf", website.Alias)

frontend/src/lang/modules/en.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2623,6 +2623,8 @@ const message = {
26232623
commandPlaceHolder: 'Currently only supports commands started with npx and binary',
26242624
importMcpJson: 'Import MCP Server Configuration',
26252625
importMcpJsonError: 'mcpServers structure is incorrect',
2626+
bindDomainHelper:
2627+
'After binding the website, it will modify the access address of all installed MCP Servers and close external access to the ports',
26262628
},
26272629
};
26282630

frontend/src/lang/modules/ja.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2593,6 +2593,8 @@ const message = {
25932593
commandPlaceHolder: '現在、npx およびバイナリ起動のコマンドのみをサポートしています',
25942594
importMcpJson: 'MCP サーバー設定をインポート',
25952595
importMcpJsonError: 'mcpServers 構造が正しくありません',
2596+
bindDomainHelper:
2597+
'ウェブサイトをバインドした後、インストールされたすべての MCP サーバーのアクセスアドレスを変更し、ポートへの外部アクセスを閉じます',
25962598
},
25972599
};
25982600
export default {

frontend/src/lang/modules/ko.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2552,6 +2552,8 @@ const message = {
25522552
commandPlaceHolder: '現在、npx およびバイナリ起動のコマンドのみをサポートしています',
25532553
importMcpJson: 'MCP サーバー設定をインポート',
25542554
importMcpJsonError: 'mcpServers 構造が正しくありません',
2555+
bindDomainHelper:
2556+
'웹사이트를 바인딩한 후, 설치된 모든 MCP 서버의 접근 주소를 수정하고 포트의 외부 접근을 닫습니다',
25552557
},
25562558
};
25572559

frontend/src/lang/modules/ms.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2651,6 +2651,8 @@ const message = {
26512651
commandPlaceHolder: 'Kini hanya menyokong perintah yang bermula dengan npx dan binari',
26522652
importMcpJson: 'Import Konfigurasi Pelayan MCP',
26532653
importMcpJsonError: 'Struktur mcpServers tidak betul',
2654+
bindDomainHelper:
2655+
'Setelah mengikat laman web, ia akan mengubah alamat akses semua Pelayan MCP yang dipasang dan menutup akses luaran ke pelabuhan',
26542656
},
26552657
};
26562658

frontend/src/lang/modules/pt-br.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2649,6 +2649,8 @@ const message = {
26492649
commandPlaceHolder: 'Atualmente, apenas comandos iniciados com npx e binário são suportados',
26502650
importMcpJson: 'Importar Configuração do Servidor MCP',
26512651
importMcpJsonError: 'A estrutura mcpServers está incorreta',
2652+
bindDomainHelper:
2653+
'Após vincular o site, ele modificará o endereço de acesso de todos os servidores MCP instalados e fechará o acesso externo às portas',
26522654
},
26532655
};
26542656

frontend/src/lang/modules/ru.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2646,6 +2646,8 @@ const message = {
26462646
'В настоящее время поддерживаются только команды, запускаемые с помощью npx и бинарных файлов',
26472647
importMcpJson: 'Импортировать конфигурацию сервера MCP',
26482648
importMcpJsonError: 'Структура mcpServers некорректна',
2649+
bindDomainHelper:
2650+
'После привязки веб-сайта он изменит адрес доступа для всех установленных серверов MCP и закроет внешний доступ к портам',
26492651
},
26502652
};
26512653

frontend/src/lang/modules/tw.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2458,6 +2458,7 @@ const message = {
24582458
commandPlaceHolder: '當前僅支持 npx 和二進制啟動的命令',
24592459
importMcpJson: '導入 MCP Server配置',
24602460
importMcpJsonError: 'mcpServers 結構不正確',
2461+
bindDomainHelper: '綁定網站之後會修改所有已安裝 MCP Server 的訪問地址,並關閉端口的外部訪問',
24612462
},
24622463
};
24632464
export default {

frontend/src/lang/modules/zh.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2460,6 +2460,7 @@ const message = {
24602460
commandPlaceHolder: '当前仅支持 npx 和二进制启动的命令',
24612461
importMcpJson: '导入 MCP Server 配置',
24622462
importMcpJsonError: 'mcpServers 结构不正确',
2463+
bindDomainHelper: '绑定网站之后会修改所有已安装 MCP Server 的访问地址,并关闭端口的外部访问',
24632464
},
24642465
};
24652466
export default {

frontend/src/views/ai/mcp/server/bind/index.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
{{ $t('firewall.quickJump') }}
3939
</el-link>
4040
</span>
41+
<el-text type="danger">{{ $t('mcp.bindDomainHelper') }}</el-text>
4142
</el-form-item>
4243
<el-form-item :label="$t('xpack.waf.whiteList') + ' IP'" prop="ipList">
4344
<el-input

0 commit comments

Comments
 (0)