Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

Fix: Add prompt text to the form in the MCP module (#9222)

chanxa36ba95c1c2f
diff --git a/web/src/locales/en.ts b/web/src/locales/en.ts
index 7a5ce123ac..734024b782 100644
--- a/web/src/locales/en.ts
+++ b/web/src/locales/en.ts
@@ -39,6 +39,13 @@ export default {
nextPage: 'Next',
add: 'Add',
promptPlaceholder: `Please input or use / to quickly insert variables.`,
+ mcp: {
+ namePlaceholder: 'My MCP Server',
+ nameRequired:
+ 'It must be 1–64 characters long and can only contain letters, numbers, hyphens, and underscores.',
+ urlPlaceholder: 'https://api.example.com/v1/mcp',
+ tokenPlaceholder: 'e.g. eyJhbGciOiJIUzI1Ni...',
+ },
},
login: {
login: 'Sign in',
diff --git a/web/src/pages/profile-setting/mcp/edit-mcp-form.tsx b/web/src/pages/profile-setting/mcp/edit-mcp-form.tsx
index dfad0ff382..3af21786b3 100644
--- a/web/src/pages/profile-setting/mcp/edit-mcp-form.tsx
+++ b/web/src/pages/profile-setting/mcp/edit-mcp-form.tsx
@@ -37,20 +37,23 @@ export function useBuildFormSchema() {
name: z
.string()
.min(1, {
- message: t('common.namePlaceholder'),
+ message: t('common.mcp.namePlaceholder'),
+ })
+ .regex(/^[a-zA-Z0-9_-]{1,64}$/, {
+ message: t('common.mcp.nameRequired'),
})
.trim(),
url: z
.string()
.url()
.min(1, {
- message: t('common.namePlaceholder'),
+ message: t('common.mcp.urlPlaceholder'),
})
.trim(),
server_type: z
.string()
.min(1, {
- message: t('common.namePlaceholder'),
+ message: t('common.pleaseSelect'),
})
.trim(),
authorization_token: z.string().optional(),
@@ -89,7 +92,7 @@ export function EditMcpForm({
<FormLabel>{t('common.name')}</FormLabel>
<FormControl>
<Input
- placeholder={t('common.namePlaceholder')}
+ placeholder={t('common.mcp.namePlaceholder')}
{...field}
autoComplete="off"
/>
@@ -106,7 +109,7 @@ export function EditMcpForm({
<FormLabel>{t('mcp.url')}</FormLabel>
<FormControl>
<Input
- placeholder={t('common.namePlaceholder')}
+ placeholder={t('common.mcp.urlPlaceholder')}
{...field}
autoComplete="off"
onChange={(e) => {
@@ -148,7 +151,7 @@ export function EditMcpForm({
<FormLabel>Authorization Token</FormLabel>
<FormControl>
<Input
- placeholder={t('common.namePlaceholder')}
+ placeholder={t('common.mcp.tokenPlaceholder')}
{...field}
autoComplete="off"
type="password"