diff --git a/web/app/components/tools/mcp/modal.tsx b/web/app/components/tools/mcp/modal.tsx index a60bf4e77c..efe63ec722 100644 --- a/web/app/components/tools/mcp/modal.tsx +++ b/web/app/components/tools/mcp/modal.tsx @@ -57,6 +57,7 @@ const MCPModal = ({ const { t } = useTranslation() const originalServerUrl = data?.server_url + const originalServerID = data?.server_identifier const [url, setUrl] = React.useState(data?.server_url || '') const [name, setName] = React.useState(data?.name || '') const [appIcon, setAppIcon] = useState(getIcon(data)) @@ -145,7 +146,7 @@ const MCPModal = ({ /> {originalServerUrl && originalServerUrl !== url && (
- {t('tools.mcp.modal.warning')} + {t('tools.mcp.modal.serverUrlWarning')}
)} @@ -170,9 +171,9 @@ const MCPModal = ({ className='relative cursor-pointer rounded-2xl' coverElement={ isHovering - ? (
- -
) : null + ? (
+ +
) : null } onClick={() => { setShowAppIconPicker(true) }} /> @@ -188,6 +189,11 @@ const MCPModal = ({ onChange={e => setServerIdentifier(e.target.value)} placeholder={t('tools.mcp.modal.serverIdentifierPlaceholder')} /> + {originalServerID && originalServerID !== serverIdentifier && ( +
+ {t('tools.mcp.modal.serverIdentifierWarning')} +
+ )}
diff --git a/web/i18n/en-US/tools.ts b/web/i18n/en-US/tools.ts index 0f340ac5fc..364129e802 100644 --- a/web/i18n/en-US/tools.ts +++ b/web/i18n/en-US/tools.ts @@ -167,11 +167,12 @@ const translation = { name: 'Name & Icon', namePlaceholder: 'Name your MCP server', serverUrl: 'Server URL', - serverUrlPlaceholder: 'URL to server endpiont', - warning: 'Updating the server address may affect applications currently using this MCP', + serverUrlPlaceholder: 'URL to server endpoint', + serverUrlWarning: 'Updating the server address may disrupt applications that depend on this server', serverIdentifier: 'Server Identifier', - serverIdentifierTip: 'This text will be displayed on the client side, providing basic guidance on how to use the application', - serverIdentifierPlaceholder: 'Unique identifier for this server', + serverIdentifierTip: 'Unique identifier for the MCP server ID within the workspace. Lowercase letters, numbers, underscores, and hyphens only. Up to 24 characters.', + serverIdentifierPlaceholder: 'Unique identifier, e.g., my-mcp-server', + serverIdentifierWarning: 'The server won’t be recognized by existing apps after an ID change', cancel: 'Cancel', save: 'Save', confirm: 'Add & Authorize', diff --git a/web/i18n/zh-Hans/tools.ts b/web/i18n/zh-Hans/tools.ts index 4a62ffd901..7690d97f48 100644 --- a/web/i18n/zh-Hans/tools.ts +++ b/web/i18n/zh-Hans/tools.ts @@ -168,10 +168,11 @@ const translation = { namePlaceholder: '命名你的 MCP 服务', serverUrl: '服务端点 URL', serverUrlPlaceholder: '服务端点的 URL', - warning: '修改服务端点 URL 可能会影响使用当前 MCP 的应用。', + serverUrlWarning: '修改服务端点 URL 可能会影响使用当前 MCP 的应用。', serverIdentifier: '服务器标识符', serverIdentifierTip: '此文本将在客户端显示,为如何使用应用程序提供基本指导', serverIdentifierPlaceholder: '此服务器的唯一标识符', + serverIdentifierWarning: '更改服务器标识符后,现有应用将无法识别此服务器', cancel: '取消', save: '保存', confirm: '添加并授权',