Skip to content

7.4 billion tokens per month. 34 free LLM providers. 635 free model endpoints. All behind one /v1 endpoint, plus any custom OpenAI-compatible endpoint. Smart routing, automatic failover, encrypted keys. Personal experimentation only.

TypeScript

feat(mcp): configurable lifecycle — /mcp off by default, settings endpoints (#925 MVP-1) (#1073)

suantea (asuan_suan)d293baa2d1d1
diff --git a/client/src/components/keys/agent-compatibility-section.tsx b/client/src/components/keys/agent-compatibility-section.tsx
index 551ac91a..e7afccaf 100644
--- a/client/src/components/keys/agent-compatibility-section.tsx
+++ b/client/src/components/keys/agent-compatibility-section.tsx
@@ -53,6 +53,10 @@ export function AgentCompatibilitySection() {
queryKey: ['agent-compatibility'],
queryFn: () => apiFetch('/api/settings/agent-compatibility'),
})
+ const { data: mcp } = useQuery<{ enabled: boolean }>({
+ queryKey: ['enable-mcp'],
+ queryFn: () => apiFetch('/api/settings/enable-mcp'),
+ })
const { data: models = [] } = useQuery<MappableModel[]>({
queryKey: ['fallback'],
queryFn: () => apiFetch('/api/fallback'),
@@ -81,6 +85,13 @@ export function AgentCompatibilitySection() {
}),
onSuccess: () => queryClient.invalidateQueries({ queryKey: ['agent-compatibility'] }),
})
+ const saveMcp = useMutation({
+ mutationFn: (enabled: boolean) => apiFetch('/api/settings/enable-mcp', {
+ method: 'PUT',
+ body: JSON.stringify({ enabled }),
+ }),
+ onSuccess: () => queryClient.invalidateQueries({ queryKey: ['enable-mcp'] }),
+ })
const createToken = useMutation({
mutationFn: () => apiFetch<UrlToken>('/api/settings/url-tokens', {
method: 'POST',
@@ -179,6 +190,16 @@ export function AgentCompatibilitySection() {
saveCompatibility.mutate({ exposeClaudeDiscoveryAliases: checked })}
/>
</div>
+ <div className="flex items-center justify-between gap-4">
+ <div>
+ <p className="text-xs font-medium">{t('keys.mcpServer')}</p>
+ <p className="text-xs text-muted-foreground">{t('keys.mcpServerHint')}</p>
+ </div>
+ <Switch
+ checked={mcp?.enabled ?? false}
+ onCheckedChange={checked => saveMcp.mutate(checked)}
+ />
+ </div>
</div>
</section>
diff --git a/client/src/i18n/locales/am.json b/client/src/i18n/locales/am.json
index a798e8b8..d2389b7b 100644
--- a/client/src/i18n/locales/am.json
+++ b/client/src/i18n/locales/am.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "የAPI ቁልፍ ያስፈልጋል",
"claudeAliases": "የClaude Code ፍለጋ ተለዋጭ ስሞች",
"claudeAliasesHint": "የጌትዌዩ ሞዴል መራጭ ካታሎጉን መዘርዘር እንዲችል የclaude/<model> ተለዋጭ ስሞችን ይክፈቱ።",
+ "mcpServer": "MCP አገልጋይ",
+ "mcpServerHint": "ለወኪል ደንበኞች የ/mcp መዳረሻን ይክፈቱ። አዲስ ተከላዎች ጠፍቶ ይጀምራሉ።",
"urlTokensTitle": "ሊሻሩ የሚችሉ የURL ቶከኖች",
"urlTokensDesc": "ራስጌ ለሌላቸው ደንበኞች ብቻ። የURL ቶከኖች ወደ ታሪክ እና ምዝግብ ማስታወሻዎች ሊፈሱ ይችላሉ፣ ስለዚህ በማያስፈልጉበት ጊዜ ይሽሯቸው።",
"urlTokenLabel": "የቶከን መለያ",
diff --git a/client/src/i18n/locales/ar.json b/client/src/i18n/locales/ar.json
index 53bb666a..79c8a28c 100644
--- a/client/src/i18n/locales/ar.json
+++ b/client/src/i18n/locales/ar.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "مفتاح API مطلوب",
"claudeAliases": "أسماء بديلة لاكتشاف Claude Code",
"claudeAliasesHint": "اعرض أسماء بديلة بصيغة claude/<model> ليتمكن منتقي النماذج في البوابة من عرض الكتالوج.",
+ "mcpServer": "خادم MCP",
+ "mcpServerHint": "يتيح نقطة النهاية /mcp لعملاء الوكلاء. التثبيتات الجديدة تبدأ وهو معطَّل.",
"urlTokensTitle": "رموز URL قابلة للإلغاء",
"urlTokensDesc": "للعملاء بدون ترويسات فقط. قد تتسرب رموز URL إلى المحفوظات والسجلات، لذا ألغِها عندما لا تعود هناك حاجة إليها.",
"urlTokenLabel": "تسمية الرمز",
diff --git a/client/src/i18n/locales/az.json b/client/src/i18n/locales/az.json
index 2f0a2dec..4ecf3bb9 100644
--- a/client/src/i18n/locales/az.json
+++ b/client/src/i18n/locales/az.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "API açarı tələb olunur",
"claudeAliases": "Claude Code aşkarlama aliasları",
"claudeAliasesHint": "Şlüzün model seçicisi kataloqu göstərə bilsin deyə claude/<model> aliaslarını açın.",
+ "mcpServer": "MCP serveri",
+ "mcpServerHint": "/mcp son nöqtəsini agent klientlərinə açır. Yeni quraşdırmalar sönülü başlayır.",
"urlTokensTitle": "Ləğv edilə bilən URL tokenləri",
"urlTokensDesc": "Yalnız başlıqsız müştərilər üçün. URL tokenləri tarixçəyə və loqlara sıza bilər, ona görə də artıq lazım olmadıqda onları ləğv edin.",
"urlTokenLabel": "Token etiketi",
diff --git a/client/src/i18n/locales/bg.json b/client/src/i18n/locales/bg.json
index d7caf5bf..1b98e125 100644
--- a/client/src/i18n/locales/bg.json
+++ b/client/src/i18n/locales/bg.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "Изисква се API ключ",
"claudeAliases": "Псевдоними за откриване на Claude Code",
"claudeAliasesHint": "Изложете псевдоними claude/<model>, за да може селекторът на модели на шлюза да покаже каталога.",
+ "mcpServer": "MCP сървър",
+ "mcpServerHint": "Отваря крайната точка /mcp за агентни клиенти. Новите инсталации започват изключени.",
"urlTokensTitle": "Отменяеми URL токени",
"urlTokensDesc": "Само за клиенти без хедъри. URL токените могат да изтекат в историята и логовете, затова ги отменяйте, когато вече не са нужни.",
"urlTokenLabel": "Етикет на токена",
diff --git a/client/src/i18n/locales/bn.json b/client/src/i18n/locales/bn.json
index ca33aa90..37bb17c8 100644
--- a/client/src/i18n/locales/bn.json
+++ b/client/src/i18n/locales/bn.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "API কী প্রয়োজন",
"claudeAliases": "Claude Code আবিষ্কারের অ্যালিয়াস",
"claudeAliasesHint": "গেটওয়ের মডেল নির্বাচক যাতে ক্যাটালগ তালিকাভুক্ত করতে পারে সেজন্য claude/<model> অ্যালিয়াস উন্মুক্ত করুন।",
+ "mcpServer": "MCP সার্ভার",
+ "mcpServerHint": "এজেন্ট ক্লায়েন্টের জন্য /mcp এন্ডপয়েন্ট উন্মুক্ত করে। নতুন ইনস্টলে এটি বন্ধ থাকে।",
"urlTokensTitle": "প্রত্যাহারযোগ্য URL টোকেন",
"urlTokensDesc": "শুধুমাত্র হেডারবিহীন ক্লায়েন্টদের জন্য। URL টোকেন ইতিহাস এবং লগে ফাঁস হতে পারে, তাই আর প্রয়োজন না হলে সেগুলি প্রত্যাহার করুন।",
"urlTokenLabel": "টোকেন লেবেল",
diff --git a/client/src/i18n/locales/cs.json b/client/src/i18n/locales/cs.json
index e47d1240..b74521b4 100644
--- a/client/src/i18n/locales/cs.json
+++ b/client/src/i18n/locales/cs.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "Vyžadován API klíč",
"claudeAliases": "Aliasy zjišťování pro Claude Code",
"claudeAliasesHint": "Zpřístupněte aliasy claude/<model>, aby výběr modelů brány mohl vypsat katalog.",
+ "mcpServer": "Server MCP",
+ "mcpServerHint": "Zpřístupní endpoint /mcp agentním klientům. Nové instalace začínají vypnuté.",
"urlTokensTitle": "Odvolatelné URL tokeny",
"urlTokensDesc": "Pouze pro klienty bez hlaviček. URL tokeny mohou uniknout do historie a logů, proto je odvolejte, jakmile je nepotřebujete.",
"urlTokenLabel": "Popisek tokenu",
diff --git a/client/src/i18n/locales/da.json b/client/src/i18n/locales/da.json
index 51e14bda..55498479 100644
--- a/client/src/i18n/locales/da.json
+++ b/client/src/i18n/locales/da.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "API-nøgle påkrævet",
"claudeAliases": "Claude Code-opdagelsesaliasser",
"claudeAliasesHint": "Eksponér claude/<model>-aliasser, så gatewayens modelvælger kan vise kataloget.",
+ "mcpServer": "MCP-server",
+ "mcpServerHint": "Eksponerer /mcp-endpointet for agentklienter. Nye installationer starter slået fra.",
"urlTokensTitle": "Tilbagekaldelige URL-tokens",
"urlTokensDesc": "Kun til klienter uden headers. URL-tokens kan lække til historik og logs, så tilbagekald dem, når de ikke længere er nødvendige.",
"urlTokenLabel": "Token-etiket",
diff --git a/client/src/i18n/locales/de.json b/client/src/i18n/locales/de.json
index 5ad6a886..04f05074 100644
--- a/client/src/i18n/locales/de.json
+++ b/client/src/i18n/locales/de.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "API-Schlüssel erforderlich",
"claudeAliases": "Claude-Code-Erkennungsaliase",
"claudeAliasesHint": "Stellen Sie claude/<model>-Aliase bereit, damit die Modellauswahl des Gateways den Katalog auflisten kann.",
+ "mcpServer": "MCP-Server",
+ "mcpServerHint": "Stellt den /mcp-Endpunkt für Agent-Clients bereit. Neue Installationen starten deaktiviert.",
"urlTokensTitle": "Widerrufbare URL-Tokens",
"urlTokensDesc": "Nur für Clients ohne Header. URL-Tokens können in Verlauf und Protokolle gelangen. Widerrufen Sie sie daher, wenn sie nicht mehr benötigt werden.",
"urlTokenLabel": "Token-Bezeichnung",
diff --git a/client/src/i18n/locales/el.json b/client/src/i18n/locales/el.json
index c63710ca..68b3ca47 100644
--- a/client/src/i18n/locales/el.json
+++ b/client/src/i18n/locales/el.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "Απαιτείται κλειδί API",
"claudeAliases": "Ψευδώνυμα ανακάλυψης Claude Code",
"claudeAliasesHint": "Εκθέστε ψευδώνυμα claude/<model> ώστε ο επιλογέας μοντέλων της πύλης να εμφανίζει τον κατάλογο.",
+ "mcpServer": "Διακομιστής MCP",
+ "mcpServerHint": "Εκθέτει το endpoint /mcp σε πελάτες πρακτόρων. Οι νέες εγκαταστάσεις ξεκινούν απενεργοποιημένες.",
"urlTokensTitle": "Ανακλητά token URL",
"urlTokensDesc": "Μόνο για πελάτες χωρίς κεφαλίδες. Τα token URL μπορούν να διαρρεύσουν στο ιστορικό και στα αρχεία καταγραφής, γι' αυτό ανακαλέστε τα όταν δεν χρειάζονται πια.",
"urlTokenLabel": "Ετικέτα token",
diff --git a/client/src/i18n/locales/en.json b/client/src/i18n/locales/en.json
index 49004771..15843f3d 100644
--- a/client/src/i18n/locales/en.json
+++ b/client/src/i18n/locales/en.json
@@ -404,6 +404,8 @@
"ollamaKeyRequired": "API key required",
"claudeAliases": "Claude Code discovery aliases",
"claudeAliasesHint": "Expose claude/<model> aliases so the gateway model picker can list the catalog.",
+ "mcpServer": "MCP server",
+ "mcpServerHint": "Expose the /mcp endpoint for agent clients. New installs start with it off.",
"urlTokensTitle": "Revocable URL tokens",
"urlTokensDesc": "For headerless clients only. URL tokens can leak into history and logs, so revoke them when no longer needed.",
"urlTokenLabel": "Token label",
diff --git a/client/src/i18n/locales/es.json b/client/src/i18n/locales/es.json
index a9de4cac..64b76691 100644
--- a/client/src/i18n/locales/es.json
+++ b/client/src/i18n/locales/es.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "Se requiere clave de API",
"claudeAliases": "Alias de detección de Claude Code",
"claudeAliasesHint": "Expón alias claude/<model> para que el selector de modelos del gateway pueda listar el catálogo.",
+ "mcpServer": "Servidor MCP",
+ "mcpServerHint": "Expone el endpoint /mcp a los clientes de agentes. Las instalaciones nuevas empiezan desactivado.",
"urlTokensTitle": "Tokens de URL revocables",
"urlTokensDesc": "Solo para clientes sin cabeceras. Los tokens de URL pueden filtrarse al historial y a los registros, así que revócalos cuando ya no los necesites.",
"urlTokenLabel": "Etiqueta del token",
diff --git a/client/src/i18n/locales/fa.json b/client/src/i18n/locales/fa.json
index f443b00b..81c7a697 100644
--- a/client/src/i18n/locales/fa.json
+++ b/client/src/i18n/locales/fa.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "کلید API لازم است",
"claudeAliases": "نام های مستعار کشف Claude Code",
"claudeAliasesHint": "نام های مستعار claude/<model> را در دسترس قرار دهید تا انتخابگر مدل دروازه بتواند کاتالوگ را فهرست کند.",
+ "mcpServer": "سرور MCP",
+ "mcpServerHint": "نقطهٔ پایانی /mcp را برای کلاینت‌های عامل باز می‌کند. نصب‌های جدید خاموش شروع می‌شوند.",
"urlTokensTitle": "توکن های URL قابل لغو",
"urlTokensDesc": "فقط برای کلاینت های بدون هدر. توکن های URL ممکن است به تاریخچه و لاگ ها نشت کنند، پس وقتی دیگر لازم نیستند آنها را لغو کنید.",
"urlTokenLabel": "برچسب توکن",
diff --git a/client/src/i18n/locales/fi.json b/client/src/i18n/locales/fi.json
index ece29bd1..45afc51f 100644
--- a/client/src/i18n/locales/fi.json
+++ b/client/src/i18n/locales/fi.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "API-avain vaaditaan",
"claudeAliases": "Claude Coden löytämisaliakset",
"claudeAliasesHint": "Julkaise claude/<model>-aliakset, jotta yhdyskäytävän mallivalitsin voi listata katalogin.",
+ "mcpServer": "MCP-palvelin",
+ "mcpServerHint": "Julkaisee /mcp-päätepisteen agenttiasiakkaille. Uusissa asennuksissa se on aluksi pois päältä.",
"urlTokensTitle": "Peruutettavat URL-tokenit",
"urlTokensDesc": "Vain otsikottomille asiakkaille. URL-tokenit voivat vuotaa historiaan ja lokeihin, joten peruuta ne, kun niitä ei enää tarvita.",
"urlTokenLabel": "Tokenin nimi",
diff --git a/client/src/i18n/locales/fr.json b/client/src/i18n/locales/fr.json
index 9b666971..b5a78111 100644
--- a/client/src/i18n/locales/fr.json
+++ b/client/src/i18n/locales/fr.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "Clé API requise",
"claudeAliases": "Alias de découverte Claude Code",
"claudeAliasesHint": "Exposez des alias claude/<model> pour que le sélecteur de modèles de la passerelle puisse lister le catalogue.",
+ "mcpServer": "Serveur MCP",
+ "mcpServerHint": "Expose le point de terminaison /mcp aux clients agents. Désactivé au départ sur les nouvelles installations.",
"urlTokensTitle": "Tokens d'URL révocables",
"urlTokensDesc": "Réservé aux clients sans en-têtes. Les tokens d'URL peuvent fuiter dans l'historique et les journaux ; révoquez-les dès qu'ils ne sont plus nécessaires.",
"urlTokenLabel": "Libellé du token",
diff --git a/client/src/i18n/locales/gu.json b/client/src/i18n/locales/gu.json
index fd8605d8..dae428fa 100644
--- a/client/src/i18n/locales/gu.json
+++ b/client/src/i18n/locales/gu.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "API કી જરૂરી છે",
"claudeAliases": "Claude Code શોધ ઉપનામો",
"claudeAliasesHint": "ગેટવેનું મોડેલ પસંદગીકાર કેટલોગની યાદી બતાવી શકે તે માટે claude/<model> ઉપનામો ખુલ્લા કરો.",
+ "mcpServer": "MCP સર્વર",
+ "mcpServerHint": "એજન્ટ ક્લાયન્ટ માટે /mcp એન્ડપોઇન્ટ ખુલ્લું કરે છે. નવા ઇન્સ્ટોલમાં તે બંધ રહે છે.",
"urlTokensTitle": "રદ કરી શકાય તેવા URL ટોકન્સ",
"urlTokensDesc": "ફક્ત હેડર વગરના ક્લાયન્ટ્સ માટે. URL ટોકન્સ ઇતિહાસ અને લોગમાં લીક થઈ શકે છે, તેથી જ્યારે જરૂર ન રહે ત્યારે તેમને રદ કરો.",
"urlTokenLabel": "ટોકન લેબલ",
diff --git a/client/src/i18n/locales/ha.json b/client/src/i18n/locales/ha.json
index ba863811..da67dab5 100644
--- a/client/src/i18n/locales/ha.json
+++ b/client/src/i18n/locales/ha.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "Ana buƙatar maɓallin API",
"claudeAliases": "Sunayen gano na Claude Code",
"claudeAliasesHint": "Fitar da sunayen claude/<model> domin mazaɓin samfura na gateway ya iya lissafa kundin.",
+ "mcpServer": "Sabar MCP",
+ "mcpServerHint": "Yana buɗe ƙarshen /mcp ga abokan huldar wakilai. Sabbin shigarwa suna farawa a kashe.",
"urlTokensTitle": "Alamomin URL masu sokewa",
"urlTokensDesc": "Don abokan ciniki marasa header kawai. Alamomin URL na iya zuba cikin tarihi da rajistan ayyuka, don haka soke su idan ba a buƙatarsu.",
"urlTokenLabel": "Lakabin alama",
diff --git a/client/src/i18n/locales/he.json b/client/src/i18n/locales/he.json
index 099f7782..50cbb637 100644
--- a/client/src/i18n/locales/he.json
+++ b/client/src/i18n/locales/he.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "נדרש מפתח API",
"claudeAliases": "כינויי גילוי של Claude Code",
"claudeAliasesHint": "חשוף כינויי claude/<model> כדי שבורר המודלים של השער יוכל להציג את הקטלוג.",
+ "mcpServer": "שרת MCP",
+ "mcpServerHint": "חושף את נקודת הקצה /mcp ללקוחות סוכנים. התקנות חדשות מתחילות כשהוא כבוי.",
"urlTokensTitle": "טוקני URL ניתנים לביטול",
"urlTokensDesc": "ללקוחות ללא כותרות בלבד. טוקני URL עלולים לדלוף להיסטוריה וליומנים, לכן בטל אותם כשאינם נחוצים עוד.",
"urlTokenLabel": "תווית טוקן",
diff --git a/client/src/i18n/locales/hi.json b/client/src/i18n/locales/hi.json
index 498ae185..badb52d2 100644
--- a/client/src/i18n/locales/hi.json
+++ b/client/src/i18n/locales/hi.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "API कुंजी आवश्यक",
"claudeAliases": "Claude Code खोज उपनाम",
"claudeAliasesHint": "claude/<model> उपनाम उजागर करें ताकि गेटवे मॉडल चयनकर्ता कैटलॉग सूचीबद्ध कर सके।",
+ "mcpServer": "MCP सर्वर",
+ "mcpServerHint": "एजेंट क्लाइंट के लिए /mcp एंडपॉइंट खोलता है। नई इंस्टॉलेशन में यह बंद रहता है।",
"urlTokensTitle": "रद्द करने योग्य URL टोकन",
"urlTokensDesc": "केवल हेडर-रहित क्लाइंट के लिए। URL टोकन इतिहास और लॉग में लीक हो सकते हैं, इसलिए ज़रूरत न रहने पर उन्हें रद्द कर दें।",
"urlTokenLabel": "टोकन लेबल",
diff --git a/client/src/i18n/locales/hr.json b/client/src/i18n/locales/hr.json
index 89925b85..c78f7755 100644
--- a/client/src/i18n/locales/hr.json
+++ b/client/src/i18n/locales/hr.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "Potreban API ključ",
"claudeAliases": "Aliasi za otkrivanje Claude Codea",
"claudeAliasesHint": "Izložite claude/<model> aliase kako bi birač modela gatewaya mogao izlistati katalog.",
+ "mcpServer": "MCP poslužitelj",
+ "mcpServerHint": "Izlaže krajnju točku /mcp agentskim klijentima. Nove instalacije počinju isključene.",
"urlTokensTitle": "Opozivi URL tokeni",
"urlTokensDesc": "Samo za klijente bez zaglavlja. URL tokeni mogu procuriti u povijest i logove, pa ih opozovite kad više nisu potrebni.",
"urlTokenLabel": "Oznaka tokena",
diff --git a/client/src/i18n/locales/hu.json b/client/src/i18n/locales/hu.json
index 8ba8dc37..32e793fc 100644
--- a/client/src/i18n/locales/hu.json
+++ b/client/src/i18n/locales/hu.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "API kulcs szükséges",
"claudeAliases": "Claude Code felderítési aliasok",
"claudeAliasesHint": "Tedd elérhetővé a claude/<model> aliasokat, hogy az átjáró modellválasztója listázhassa a katalógust.",
+ "mcpServer": "MCP-kiszolgáló",
+ "mcpServerHint": "Elérhetővé teszi a /mcp végpontot az ügynökklienseknek. Új telepítéseknél alapból ki van kapcsolva.",
"urlTokensTitle": "Visszavonható URL tokenek",
"urlTokensDesc": "Csak fejléc nélküli kliensekhez. Az URL tokenek kiszivároghatnak az előzményekbe és a naplókba, ezért vond vissza őket, ha már nincs rájuk szükség.",
"urlTokenLabel": "Token címke",
diff --git a/client/src/i18n/locales/id.json b/client/src/i18n/locales/id.json
index 5ec11b01..9075548f 100644
--- a/client/src/i18n/locales/id.json
+++ b/client/src/i18n/locales/id.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "Perlu kunci API",
"claudeAliases": "Alias penemuan Claude Code",
"claudeAliasesHint": "Ekspos alias claude/<model> agar pemilih model gateway dapat menampilkan daftar katalog.",
+ "mcpServer": "Server MCP",
+ "mcpServerHint": "Membuka endpoint /mcp untuk klien agen. Instalasi baru dimulai dalam keadaan nonaktif.",
"urlTokensTitle": "Token URL yang dapat dicabut",
"urlTokensDesc": "Hanya untuk klien tanpa header. Token URL bisa bocor ke riwayat dan log, jadi cabut jika sudah tidak diperlukan.",
"urlTokenLabel": "Label token",
diff --git a/client/src/i18n/locales/ig.json b/client/src/i18n/locales/ig.json
index f03a74ac..f2ae323a 100644
--- a/client/src/i18n/locales/ig.json
+++ b/client/src/i18n/locales/ig.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "Achọrọ igodo API",
"claudeAliases": "Aha ọzọ nchọpụta Claude Code",
"claudeAliasesHint": "Gosipụta aha ọzọ claude/<model> ka onye nhọrọ ụdị nke ọnụ ụzọ nwee ike depụta katalọgụ.",
+ "mcpServer": "Sava MCP",
+ "mcpServerHint": "Na-emeghe ọnụ ụzọ /mcp maka ndị ahịa onyeisi ọrụ. Nwụnye ọhụrụ na-amalite na-agbanyụ.",
"urlTokensTitle": "Akara URL enwere ike ịkagbu",
"urlTokensDesc": "Naanị maka ndị ahịa na-enweghị nkụnye eji isi mee. Akara URL nwere ike ịbanye na akụkọ ihe mere eme na ndekọ, ya mere kagbuo ha mgbe achọghịzi ha.",
"urlTokenLabel": "Labelụ akara",
diff --git a/client/src/i18n/locales/it.json b/client/src/i18n/locales/it.json
index 5a6d590e..50224e34 100644
--- a/client/src/i18n/locales/it.json
+++ b/client/src/i18n/locales/it.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "Chiave API richiesta",
"claudeAliases": "Alias di scoperta per Claude Code",
"claudeAliasesHint": "Esponi gli alias claude/<model> così il selettore di modelli del gateway può elencare il catalogo.",
+ "mcpServer": "Server MCP",
+ "mcpServerHint": "Espone l'endpoint /mcp ai client agente. Le nuove installazioni partono disattivate.",
"urlTokensTitle": "Token URL revocabili",
"urlTokensDesc": "Solo per client senza header. I token URL possono finire nella cronologia e nei log, quindi revocali quando non servono più.",
"urlTokenLabel": "Etichetta del token",
diff --git a/client/src/i18n/locales/ja.json b/client/src/i18n/locales/ja.json
index 38566c75..680da14b 100644
--- a/client/src/i18n/locales/ja.json
+++ b/client/src/i18n/locales/ja.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "API キーが必要",
"claudeAliases": "Claude Code 検出エイリアス",
"claudeAliasesHint": "claude/<model> エイリアスを公開して、ゲートウェイのモデルピッカーがカタログを一覧表示できるようにします。",
+ "mcpServer": "MCP サーバー",
+ "mcpServerHint": "エージェントクライアント向けに /mcp エンドポイントを公開します。新規インストールでは既定でオフです。",
"urlTokensTitle": "取り消し可能な URL トークン",
"urlTokensDesc": "ヘッダーを使えないクライアント専用です。URL トークンは履歴やログに漏れる可能性があるため、不要になったら取り消してください。",
"urlTokenLabel": "トークンラベル",
diff --git a/client/src/i18n/locales/ka.json b/client/src/i18n/locales/ka.json
index 644d8c1b..144d38c8 100644
--- a/client/src/i18n/locales/ka.json
+++ b/client/src/i18n/locales/ka.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "საჭიროა API გასაღები",
"claudeAliases": "Claude Code აღმოჩენის ალიასები",
"claudeAliasesHint": "გამოაჩინეთ claude/<model> ალიასები, რომ გეითვეის მოდელის ამრჩევმა შეძლოს კატალოგის ჩამოთვლა.",
+ "mcpServer": "MCP სერვერი",
+ "mcpServerHint": "აქვეყნებს /mcp წერტილს აგენტური კლიენტებისთვის. ახალ ინსტალაციებზე თავიდან გამორთულია.",
"urlTokensTitle": "გაუქმებადი URL ტოკენები",
"urlTokensDesc": "მხოლოდ ჰედერების გარეშე კლიენტებისთვის. URL ტოკენები შეიძლება მოხვდეს ისტორიასა და ჟურნალებში, ამიტომ გააუქმეთ ისინი, როცა აღარ გჭირდებათ.",
"urlTokenLabel": "ტოკენის ლეიბლი",
diff --git a/client/src/i18n/locales/km.json b/client/src/i18n/locales/km.json
index 0bb72c64..15ee6858 100644
--- a/client/src/i18n/locales/km.json
+++ b/client/src/i18n/locales/km.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "ត្រូវការកូនសោ API",
"claudeAliases": "ឈ្មោះក្លែងសម្រាប់ការរកឃើញ Claude Code",
"claudeAliasesHint": "បង្ហាញឈ្មោះក្លែង claude/<model> ដើម្បីឱ្យឧបករណ៍ជ្រើសរើសម៉ូដែលរបស់ gateway អាចរាយកាតាឡុកបាន។",
+ "mcpServer": "ម៉ាស៊ីនមេ MCP",
+ "mcpServerHint": "បើកចំណុចបញ្ចប់ /mcp សម្រាប់កម្មវិធីភ្នាក់ងារ។ ការដំឡើងថ្មីចាប់ផ្ដើមដោយបិទ។",
"urlTokensTitle": "Token URL ដែលអាចដកហូតបាន",
"urlTokensDesc": "សម្រាប់តែ client ដែលគ្មាន header ប៉ុណ្ណោះ។ Token URL អាចលេចធ្លាយចូលទៅក្នុងប្រវត្តិ និងកំណត់ហេតុ ដូច្នេះដកហូតវានៅពេលលែងត្រូវការ។",
"urlTokenLabel": "ស្លាក token",
diff --git a/client/src/i18n/locales/kn.json b/client/src/i18n/locales/kn.json
index e7ff9372..a5acd3ac 100644
--- a/client/src/i18n/locales/kn.json
+++ b/client/src/i18n/locales/kn.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "API ಕೀ ಅಗತ್ಯವಿದೆ",
"claudeAliases": "Claude Code ಅನ್ವೇಷಣೆ ಅಲಿಯಾಸ್‌ಗಳು",
"claudeAliasesHint": "ಗೇಟ್‌ವೇ ಮಾದರಿ ಆಯ್ಕೆಗಾರ ಕ್ಯಾಟಲಾಗ್ ಅನ್ನು ಪಟ್ಟಿ ಮಾಡಲು claude/<model> ಅಲಿಯಾಸ್‌ಗಳನ್ನು ಬಹಿರಂಗಪಡಿಸಿ.",
+ "mcpServer": "MCP ಸರ್ವರ್",
+ "mcpServerHint": "ಏಜೆಂಟ್ ಕ್ಲೈಂಟ್‌ಗಳಿಗಾಗಿ /mcp ಎಂಡ್‌ಪಾಯಿಂಟ್ ತೆರೆಯುತ್ತದೆ. ಹೊಸ ಅನುಸ್ಥಾಪನೆಗಳಲ್ಲಿ ಇದು ಆಫ್ ಆಗಿರುತ್ತದೆ.",
"urlTokensTitle": "ಹಿಂಪಡೆಯಬಹುದಾದ URL ಟೋಕನ್‌ಗಳು",
"urlTokensDesc": "ಹೆಡರ್ ಇಲ್ಲದ ಕ್ಲೈಂಟ್‌ಗಳಿಗೆ ಮಾತ್ರ. URL ಟೋಕನ್‌ಗಳು ಇತಿಹಾಸ ಮತ್ತು ಲಾಗ್‌ಗಳಿಗೆ ಸೋರಿಕೆಯಾಗಬಹುದು, ಆದ್ದರಿಂದ ಅಗತ್ಯವಿಲ್ಲದಾಗ ಅವುಗಳನ್ನು ಹಿಂಪಡೆಯಿರಿ.",
"urlTokenLabel": "ಟೋಕನ್ ಲೇಬಲ್",
diff --git a/client/src/i18n/locales/ko.json b/client/src/i18n/locales/ko.json
index fb5ece3a..8874c091 100644
--- a/client/src/i18n/locales/ko.json
+++ b/client/src/i18n/locales/ko.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "API 키 필요",
"claudeAliases": "Claude Code 검색 별칭",
"claudeAliasesHint": "claude/<model> 별칭을 노출하여 게이트웨이 모델 선택기가 카탈로그를 나열할 수 있게 합니다.",
+ "mcpServer": "MCP 서버",
+ "mcpServerHint": "에이전트 클라이언트에 /mcp 엔드포인트를 노출합니다. 새로 설치하면 기본값은 꺼짐입니다.",
"urlTokensTitle": "취소 가능한 URL 토큰",
"urlTokensDesc": "헤더를 쓸 수 없는 클라이언트 전용입니다. URL 토큰은 기록과 로그에 유출될 수 있으므로 더 이상 필요하지 않으면 취소하세요.",
"urlTokenLabel": "토큰 라벨",
diff --git a/client/src/i18n/locales/lt.json b/client/src/i18n/locales/lt.json
index 308a059a..7d237bae 100644
--- a/client/src/i18n/locales/lt.json
+++ b/client/src/i18n/locales/lt.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "Reikalingas API raktas",
"claudeAliases": "Claude Code aptikimo aliasai",
"claudeAliasesHint": "Atskleiskite claude/<model> aliasus, kad šliuzo modelių parinkiklis galėtų pateikti katalogą.",
+ "mcpServer": "MCP serveris",
+ "mcpServerHint": "Atveria /mcp galinį tašką agentų klientams. Naujuose diegimuose iš pradžių išjungta.",
"urlTokensTitle": "Atšaukiami URL žetonai",
"urlTokensDesc": "Tik klientams be antraščių. URL žetonai gali nutekėti į istoriją ir žurnalus, todėl atšaukite juos, kai nebereikia.",
"urlTokenLabel": "Žetono etiketė",
diff --git a/client/src/i18n/locales/ml.json b/client/src/i18n/locales/ml.json
index 1bfca015..a833d5b8 100644
--- a/client/src/i18n/locales/ml.json
+++ b/client/src/i18n/locales/ml.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "API കീ ആവശ്യമാണ്",
"claudeAliases": "Claude Code കണ്ടെത്തൽ അപരനാമങ്ങൾ",
"claudeAliasesHint": "ഗേറ്റ്‌വേ മോഡൽ പിക്കറിന് കാറ്റലോഗ് ലിസ്റ്റ് ചെയ്യാൻ claude/<model> അപരനാമങ്ങൾ തുറന്നുകൊടുക്കുക.",
+ "mcpServer": "MCP സെർവർ",
+ "mcpServerHint": "ഏജന്റ് ക്ലയന്റുകൾക്കായി /mcp എൻഡ്‌പോയിന്റ് തുറക്കുന്നു. പുതിയ ഇൻസ്റ്റാളേഷനുകളിൽ ഇത് ഓഫാണ്.",
"urlTokensTitle": "റദ്ദാക്കാവുന്ന URL ടോക്കണുകൾ",
"urlTokensDesc": "ഹെഡർ ഇല്ലാത്ത ക്ലയൻ്റുകൾക്ക് മാത്രം. URL ടോക്കണുകൾ ചരിത്രത്തിലേക്കും ലോഗുകളിലേക്കും ചോർന്നേക്കാം, അതിനാൽ ആവശ്യമില്ലാതാകുമ്പോൾ അവ റദ്ദാക്കുക.",
"urlTokenLabel": "ടോക്കൺ ലേബൽ",
diff --git a/client/src/i18n/locales/mr.json b/client/src/i18n/locales/mr.json
index 268d8e67..8fe90ead 100644
--- a/client/src/i18n/locales/mr.json
+++ b/client/src/i18n/locales/mr.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "API की आवश्यक",
"claudeAliases": "Claude Code शोध उपनावे",
"claudeAliasesHint": "गेटवे मॉडेल निवडकर्ता कॅटलॉग सूचीबद्ध करू शकेल यासाठी claude/<model> उपनावे उघड करा.",
+ "mcpServer": "MCP सर्व्हर",
+ "mcpServerHint": "एजंट क्लायंटसाठी /mcp एंडपॉइंट उघडते. नवीन इंस्टॉलेशनमध्ये ते बंद असते.",
"urlTokensTitle": "रद्द करण्यायोग्य URL टोकन",
"urlTokensDesc": "फक्त हेडर-रहित क्लायंटसाठी. URL टोकन इतिहास आणि लॉगमध्ये गळती होऊ शकतात, म्हणून गरज नसताना ती रद्द करा.",
"urlTokenLabel": "टोकन लेबल",
diff --git a/client/src/i18n/locales/ms.json b/client/src/i18n/locales/ms.json
index 63d3064d..1c6afb79 100644
--- a/client/src/i18n/locales/ms.json
+++ b/client/src/i18n/locales/ms.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "Kunci API diperlukan",
"claudeAliases": "Alias penemuan Claude Code",
"claudeAliasesHint": "Dedahkan alias claude/<model> supaya pemilih model gateway dapat menyenaraikan katalog.",
+ "mcpServer": "Pelayan MCP",
+ "mcpServerHint": "Mendedahkan titik akhir /mcp kepada klien ejen. Pemasangan baharu bermula dalam keadaan dimatikan.",
"urlTokensTitle": "Token URL boleh dibatalkan",
"urlTokensDesc": "Untuk klien tanpa pengepala sahaja. Token URL boleh bocor ke dalam sejarah dan log, jadi batalkannya apabila tidak lagi diperlukan.",
"urlTokenLabel": "Label token",
diff --git a/client/src/i18n/locales/my.json b/client/src/i18n/locales/my.json
index 20f5aa3b..6337222c 100644
--- a/client/src/i18n/locales/my.json
+++ b/client/src/i18n/locales/my.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "API ကီး လိုအပ်သည်",
"claudeAliases": "Claude Code ရှာဖွေမှု အမည်ပွားများ",
"claudeAliasesHint": "Gateway မော်ဒယ်ရွေးချယ်ကိရိယာက catalog ကို စာရင်းပြနိုင်ရန် claude/<model> အမည်ပွားများကို ဖော်ပြပေးပါ။",
+ "mcpServer": "MCP ဆာဗာ",
+ "mcpServerHint": "အေးဂျင့်ကလိုင်းယင့်များအတွက် /mcp အဆုံးမှတ်ကို ဖွင့်ပေးသည်။ တပ်ဆင်မှုအသစ်များတွင် ပိတ်ထားသည်။",
"urlTokensTitle": "ရုပ်သိမ်းနိုင်သော URL တိုကင်များ",
"urlTokensDesc": "Header မပါသော client များအတွက်သာ ဖြစ်သည်။ URL တိုကင်များသည် မှတ်တမ်းနှင့် log များထဲသို့ ပေါက်ကြားနိုင်သဖြင့် မလိုအပ်တော့ပါက ရုပ်သိမ်းပါ။",
"urlTokenLabel": "တိုကင် တံဆိပ်",
diff --git a/client/src/i18n/locales/ne.json b/client/src/i18n/locales/ne.json
index 6d0ab6f5..4fedbb02 100644
--- a/client/src/i18n/locales/ne.json
+++ b/client/src/i18n/locales/ne.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "API कुञ्जी आवश्यक",
"claudeAliases": "Claude Code खोज उपनामहरू",
"claudeAliasesHint": "गेटवे मोडेल चयनकर्ताले क्याटलग सूचीबद्ध गर्न सकोस् भनेर claude/<model> उपनामहरू उपलब्ध गराउनुहोस्।",
+ "mcpServer": "MCP सर्भर",
+ "mcpServerHint": "एजेन्ट क्लाइन्टका लागि /mcp एन्डपोइन्ट खोल्छ। नयाँ इन्स्टलमा यो बन्द हुन्छ।",
"urlTokensTitle": "रद्द गर्न सकिने URL टोकनहरू",
"urlTokensDesc": "हेडरविहीन क्लाइन्टहरूका लागि मात्र। URL टोकनहरू इतिहास र लगहरूमा चुहिन सक्छन्, त्यसैले आवश्यक नपरेपछि रद्द गर्नुहोस्।",
"urlTokenLabel": "टोकन लेबल",
diff --git a/client/src/i18n/locales/nl.json b/client/src/i18n/locales/nl.json
index b7f63647..11c32f84 100644
--- a/client/src/i18n/locales/nl.json
+++ b/client/src/i18n/locales/nl.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "API-sleutel vereist",
"claudeAliases": "Claude Code-detectiealiassen",
"claudeAliasesHint": "Stel claude/<model>-aliassen beschikbaar zodat de modelkiezer van de gateway de catalogus kan tonen.",
+ "mcpServer": "MCP-server",
+ "mcpServerHint": "Stelt het /mcp-eindpunt beschikbaar voor agentclients. Nieuwe installaties beginnen uitgeschakeld.",
"urlTokensTitle": "Intrekbare URL-tokens",
"urlTokensDesc": "Alleen voor clients zonder headers. URL-tokens kunnen in geschiedenis en logs terechtkomen, dus trek ze in zodra ze niet meer nodig zijn.",
"urlTokenLabel": "Tokenlabel",
diff --git a/client/src/i18n/locales/no.json b/client/src/i18n/locales/no.json
index 36ae7c6b..c85fe4e6 100644
--- a/client/src/i18n/locales/no.json
+++ b/client/src/i18n/locales/no.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "API-nøkkel kreves",
"claudeAliases": "Oppdagingsaliaser for Claude Code",
"claudeAliasesHint": "Eksponer claude/<model>-aliaser slik at gatewayens modellvelger kan liste opp katalogen.",
+ "mcpServer": "MCP-server",
+ "mcpServerHint": "Eksponerer /mcp-endepunktet for agentklienter. Nye installasjoner starter avslått.",
"urlTokensTitle": "Tilbakekallbare URL-tokener",
"urlTokensDesc": "Kun for klienter uten headere. URL-tokener kan lekke inn i historikk og logger, så tilbakekall dem når de ikke lenger trengs.",
"urlTokenLabel": "Tokenetikett",
diff --git a/client/src/i18n/locales/or.json b/client/src/i18n/locales/or.json
index fe05a9bd..f971a0ca 100644
--- a/client/src/i18n/locales/or.json
+++ b/client/src/i18n/locales/or.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "API କୀ ଆବଶ୍ୟକ",
"claudeAliases": "Claude Code ଆବିଷ୍କାର ଉପନାମଗୁଡ଼ିକ",
"claudeAliasesHint": "ଗେଟୱେ ମଡେଲ ଚୟନକାରୀ କାଟାଲଗ୍ ତାଲିକାଭୁକ୍ତ କରିପାରିବା ପାଇଁ claude/<model> ଉପନାମଗୁଡ଼ିକୁ ଉପଲବ୍ଧ କରାନ୍ତୁ।",
+ "mcpServer": "MCP ସର୍ଭର",
+ "mcpServerHint": "ଏଜେଣ୍ଟ କ୍ଲାଏଣ୍ଟ ପାଇଁ /mcp ଏଣ୍ଡପଏଣ୍ଟ ଖୋଲେ। ନୂଆ ଇନଷ୍ଟଲରେ ଏହା ବନ୍ଦ ଥାଏ।",
"urlTokensTitle": "ପ୍ରତ୍ୟାହାରଯୋଗ୍ୟ URL ଟୋକେନ୍‌ଗୁଡ଼ିକ",
"urlTokensDesc": "କେବଳ ହେଡର୍-ବିହୀନ କ୍ଲାଏଣ୍ଟଙ୍କ ପାଇଁ। URL ଟୋକେନ୍ ଇତିହାସ ଏବଂ ଲଗରେ ଲିକ୍ ହୋଇପାରେ, ତେଣୁ ଆଉ ଆବଶ୍ୟକ ନ ହେଲେ ସେଗୁଡ଼ିକୁ ପ୍ରତ୍ୟାହାର କରନ୍ତୁ।",
"urlTokenLabel": "ଟୋକେନ୍ ଲେବଲ୍",
diff --git a/client/src/i18n/locales/pa.json b/client/src/i18n/locales/pa.json
index c22b9099..2072afd6 100644
--- a/client/src/i18n/locales/pa.json
+++ b/client/src/i18n/locales/pa.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "API ਕੁੰਜੀ ਲੋੜੀਂਦੀ ਹੈ",
"claudeAliases": "Claude Code ਖੋਜ ਉਪਨਾਮ",
"claudeAliasesHint": "claude/<model> ਉਪਨਾਮ ਉਪਲਬਧ ਕਰਾਓ ਤਾਂ ਜੋ ਗੇਟਵੇ ਮਾਡਲ ਚੋਣਕਾਰ ਕੈਟਾਲਾਗ ਦੀ ਸੂਚੀ ਦਿਖਾ ਸਕੇ।",
+ "mcpServer": "MCP ਸਰਵਰ",
+ "mcpServerHint": "ਏਜੰਟ ਕਲਾਇੰਟਾਂ ਲਈ /mcp ਐਂਡਪੌਇੰਟ ਖੋਲ੍ਹਦਾ ਹੈ। ਨਵੀਆਂ ਇੰਸਟਾਲੇਸ਼ਨਾਂ ਵਿੱਚ ਇਹ ਬੰਦ ਰਹਿੰਦਾ ਹੈ।",
"urlTokensTitle": "ਰੱਦ ਕਰਨ ਯੋਗ URL ਟੋਕਨ",
"urlTokensDesc": "ਸਿਰਫ਼ ਹੈਡਰ-ਰਹਿਤ ਕਲਾਇੰਟਾਂ ਲਈ। URL ਟੋਕਨ ਇਤਿਹਾਸ ਅਤੇ ਲੌਗਾਂ ਵਿੱਚ ਲੀਕ ਹੋ ਸਕਦੇ ਹਨ, ਇਸ ਲਈ ਲੋੜ ਨਾ ਰਹਿਣ 'ਤੇ ਇਨ੍ਹਾਂ ਨੂੰ ਰੱਦ ਕਰ ਦਿਓ।",
"urlTokenLabel": "ਟੋਕਨ ਲੇਬਲ",
diff --git a/client/src/i18n/locales/pl.json b/client/src/i18n/locales/pl.json
index c830d01d..feddd5a9 100644
--- a/client/src/i18n/locales/pl.json
+++ b/client/src/i18n/locales/pl.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "Wymagany klucz API",
"claudeAliases": "Aliasy wykrywania Claude Code",
"claudeAliasesHint": "Udostępnij aliasy claude/<model>, aby selektor modeli bramy mógł wyświetlić katalog.",
+ "mcpServer": "Serwer MCP",
+ "mcpServerHint": "Udostępnia punkt końcowy /mcp klientom agentowym. Nowe instalacje startują z wyłączonym.",
"urlTokensTitle": "Odwoływalne tokeny URL",
"urlTokensDesc": "Tylko dla klientów bez nagłówków. Tokeny URL mogą wyciec do historii i logów, więc odwołuj je, gdy nie są już potrzebne.",
"urlTokenLabel": "Etykieta tokenu",
diff --git a/client/src/i18n/locales/pt-BR.json b/client/src/i18n/locales/pt-BR.json
index b707f641..cdc049d2 100644
--- a/client/src/i18n/locales/pt-BR.json
+++ b/client/src/i18n/locales/pt-BR.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "Chave de API obrigatória",
"claudeAliases": "Aliases de descoberta do Claude Code",
"claudeAliasesHint": "Exponha aliases claude/<model> para que o seletor de modelos do gateway possa listar o catálogo.",
+ "mcpServer": "Servidor MCP",
+ "mcpServerHint": "Expõe o endpoint /mcp para clientes de agente. Instalações novas começam desligadas.",
"urlTokensTitle": "Tokens de URL revogáveis",
"urlTokensDesc": "Apenas para clientes sem cabeçalhos. Tokens de URL podem vazar para o histórico e os logs; revogue-os quando não forem mais necessários.",
"urlTokenLabel": "Rótulo do token",
diff --git a/client/src/i18n/locales/pt-PT.json b/client/src/i18n/locales/pt-PT.json
index 03072f06..52e8e505 100644
--- a/client/src/i18n/locales/pt-PT.json
+++ b/client/src/i18n/locales/pt-PT.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "Chave de API obrigatória",
"claudeAliases": "Aliases de descoberta do Claude Code",
"claudeAliasesHint": "Exponha aliases claude/<model> para que o seletor de modelos do gateway possa listar o catálogo.",
+ "mcpServer": "Servidor MCP",
+ "mcpServerHint": "Expõe o ponto final /mcp aos clientes de agente. As instalações novas começam desligadas.",
"urlTokensTitle": "Tokens de URL revogáveis",
"urlTokensDesc": "Apenas para clientes sem cabeçalhos. Os tokens de URL podem ser expostos no histórico e nos registos, por isso revogue-os quando já não forem necessários.",
"urlTokenLabel": "Etiqueta do token",
diff --git a/client/src/i18n/locales/ro.json b/client/src/i18n/locales/ro.json
index a4d217bf..266b5188 100644
--- a/client/src/i18n/locales/ro.json
+++ b/client/src/i18n/locales/ro.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "Cheie API necesară",
"claudeAliases": "Aliasuri de descoperire Claude Code",
"claudeAliasesHint": "Expune aliasurile claude/<model> pentru ca selectorul de modele al gateway-ului să poată lista catalogul.",
+ "mcpServer": "Server MCP",
+ "mcpServerHint": "Expune endpointul /mcp către clienții agent. Instalările noi pornesc dezactivate.",
"urlTokensTitle": "Tokenuri URL revocabile",
"urlTokensDesc": "Doar pentru clienți fără anteturi. Tokenurile URL pot ajunge în istoric și în loguri, așa că revocă-le când nu mai sunt necesare.",
"urlTokenLabel": "Etichetă token",
diff --git a/client/src/i18n/locales/ru.json b/client/src/i18n/locales/ru.json
index 1d383d99..1484225e 100644
--- a/client/src/i18n/locales/ru.json
+++ b/client/src/i18n/locales/ru.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "Требуется API-ключ",
"claudeAliases": "Алиасы обнаружения Claude Code",
"claudeAliasesHint": "Публикуйте алиасы claude/<model>, чтобы селектор моделей шлюза мог отобразить каталог.",
+ "mcpServer": "Сервер MCP",
+ "mcpServerHint": "Открывает эндпоинт /mcp для агентных клиентов. В новых установках он выключен.",
"urlTokensTitle": "Отзываемые URL-токены",
"urlTokensDesc": "Только для клиентов без заголовков. URL-токены могут попасть в историю и логи, поэтому отзывайте их, когда они больше не нужны.",
"urlTokenLabel": "Метка токена",
diff --git a/client/src/i18n/locales/si.json b/client/src/i18n/locales/si.json
index 22362f64..3bf4a9c7 100644
--- a/client/src/i18n/locales/si.json
+++ b/client/src/i18n/locales/si.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "API යතුර අවශ්‍යයි",
"claudeAliases": "Claude Code සොයාගැනීමේ අන්වර්ථ නාම",
"claudeAliasesHint": "ද්වාරයේ ආකෘති තෝරකයට නාමාවලිය ලැයිස්තුගත කළ හැකි වන පරිදි claude/<model> අන්වර්ථ නාම නිරාවරණය කරන්න.",
+ "mcpServer": "MCP සේවාදායකය",
+ "mcpServerHint": "නියෝජිත සේවාලාභීන් සඳහා /mcp අන්ත ලක්ෂ්‍යය විවෘත කරයි. නව ස්ථාපනවල එය ක්‍රියාවිරහිතව ආරම්භ වේ.",
"urlTokensTitle": "අවලංගු කළ හැකි URL ටෝකන",
"urlTokensDesc": "ශීර්ෂක රහිත සේවාලාභීන් සඳහා පමණි. URL ටෝකන ඉතිහාසයට සහ ලොග වෙත කාන්දු විය හැකි බැවින්, තවදුරටත් අවශ්‍ය නොවන විට ඒවා අවලංගු කරන්න.",
"urlTokenLabel": "ටෝකන ලේබලය",
diff --git a/client/src/i18n/locales/sk.json b/client/src/i18n/locales/sk.json
index 0136d8a4..64d31e51 100644
--- a/client/src/i18n/locales/sk.json
+++ b/client/src/i18n/locales/sk.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "Vyžaduje sa API kľúč",
"claudeAliases": "Aliasy zisťovania Claude Code",
"claudeAliasesHint": "Sprístupnite aliasy claude/<model>, aby výber modelov brány mohol zobraziť katalóg.",
+ "mcpServer": "Server MCP",
+ "mcpServerHint": "Sprístupní endpoint /mcp agentným klientom. Nové inštalácie začínajú vypnuté.",
"urlTokensTitle": "Odvolateľné URL tokeny",
"urlTokensDesc": "Iba pre klientov bez hlavičiek. URL tokeny môžu uniknúť do histórie a logov, preto ich odvolajte, keď už nie sú potrebné.",
"urlTokenLabel": "Označenie tokenu",
diff --git a/client/src/i18n/locales/sr.json b/client/src/i18n/locales/sr.json
index beeb9f8e..2fb5203d 100644
--- a/client/src/i18n/locales/sr.json
+++ b/client/src/i18n/locales/sr.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "Потребан је API кључ",
"claudeAliases": "Алијаси за откривање Claude Code-а",
"claudeAliasesHint": "Изложите claude/<model> алијасе како би бирач модела мрежног пролаза могао да прикаже каталог.",
+ "mcpServer": "MCP сервер",
+ "mcpServerHint": "Излаже крајњу тачку /mcp агентским клијентима. Нове инсталације почињу искључене.",
"urlTokensTitle": "Опозиви URL токени",
"urlTokensDesc": "Само за клијенте без заглавља. URL токени могу да процуре у историју и логове, па их опозовите када више нису потребни.",
"urlTokenLabel": "Ознака токена",
diff --git a/client/src/i18n/locales/sv.json b/client/src/i18n/locales/sv.json
index e4fcc4c7..df5cc319 100644
--- a/client/src/i18n/locales/sv.json
+++ b/client/src/i18n/locales/sv.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "API-nyckel krävs",
"claudeAliases": "Upptäcktsalias för Claude Code",
"claudeAliasesHint": "Exponera claude/<model>-alias så att gatewayens modellväljare kan lista katalogen.",
+ "mcpServer": "MCP-server",
+ "mcpServerHint": "Exponerar /mcp-slutpunkten för agentklienter. Nya installationer startar avstängda.",
"urlTokensTitle": "Återkallbara URL-token",
"urlTokensDesc": "Endast för klienter utan headers. URL-token kan läcka till historik och loggar, så återkalla dem när de inte längre behövs.",
"urlTokenLabel": "Tokenetikett",
diff --git a/client/src/i18n/locales/sw.json b/client/src/i18n/locales/sw.json
index aca98e66..fb413d51 100644
--- a/client/src/i18n/locales/sw.json
+++ b/client/src/i18n/locales/sw.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "Ufunguo wa API unahitajika",
"claudeAliases": "Lakabu za ugunduzi za Claude Code",
"claudeAliasesHint": "Onyesha lakabu za claude/<model> ili kichaguzi cha miundo cha lango kiweze kuorodhesha katalogi.",
+ "mcpServer": "Seva ya MCP",
+ "mcpServerHint": "Hufungua kiungo /mcp kwa wateja wa mawakala. Usakinishaji mpya huanza ukiwa umezimwa.",
"urlTokensTitle": "Tokeni za URL zinazoweza kubatilishwa",
"urlTokensDesc": "Kwa wateja wasio na vichwa pekee. Tokeni za URL zinaweza kuvuja kwenye historia na kumbukumbu, kwa hivyo zibatilishe zisipohitajika tena.",
"urlTokenLabel": "Lebo ya tokeni",
diff --git a/client/src/i18n/locales/ta.json b/client/src/i18n/locales/ta.json
index 53c967c7..79b32304 100644
--- a/client/src/i18n/locales/ta.json
+++ b/client/src/i18n/locales/ta.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "API விசை தேவை",
"claudeAliases": "Claude Code கண்டறிதல் மாற்றுப்பெயர்கள்",
"claudeAliasesHint": "கேட்வே மாதிரி தேர்வி கேட்டலாக்கைப் பட்டியலிட claude/<model> மாற்றுப்பெயர்களை வெளிப்படுத்தவும்.",
+ "mcpServer": "MCP சேவையகம்",
+ "mcpServerHint": "ஏஜென்ட் கிளையன்ட்களுக்கு /mcp முனையைத் திறக்கிறது. புதிய நிறுவல்களில் இது அணைக்கப்பட்டிருக்கும்.",
"urlTokensTitle": "ரத்து செய்யக்கூடிய URL டோக்கன்கள்",
"urlTokensDesc": "தலைப்புகள் இல்லாத கிளையண்டுகளுக்கு மட்டும். URL டோக்கன்கள் வரலாறு மற்றும் பதிவுகளில் கசியக்கூடும், எனவே தேவையில்லாதபோது அவற்றை ரத்து செய்யவும்.",
"urlTokenLabel": "டோக்கன் லேபிள்",
diff --git a/client/src/i18n/locales/te.json b/client/src/i18n/locales/te.json
index eb413476..dbc797f2 100644
--- a/client/src/i18n/locales/te.json
+++ b/client/src/i18n/locales/te.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "API కీ అవసరం",
"claudeAliases": "Claude Code డిస్కవరీ అలియాస్‌లు",
"claudeAliasesHint": "గేట్‌వే మోడల్ పికర్ కేటలాగ్‌ను జాబితా చేయగలిగేలా claude/<model> అలియాస్‌లను బహిర్గతం చేయండి.",
+ "mcpServer": "MCP సర్వర్",
+ "mcpServerHint": "ఏజెంట్ క్లయింట్‌ల కోసం /mcp ఎండ్‌పాయింట్‌ను తెరుస్తుంది. కొత్త ఇన్‌స్టాలేషన్‌లలో ఇది ఆఫ్‌లో ఉంటుంది.",
"urlTokensTitle": "రద్దు చేయగల URL టోకెన్లు",
"urlTokensDesc": "హెడర్ లేని క్లయింట్ల కోసం మాత్రమే. URL టోకెన్లు హిస్టరీ మరియు లాగ్‌లలోకి లీక్ కావచ్చు, కాబట్టి ఇక అవసరం లేనప్పుడు వాటిని రద్దు చేయండి.",
"urlTokenLabel": "టోకెన్ లేబుల్",
diff --git a/client/src/i18n/locales/th.json b/client/src/i18n/locales/th.json
index 3057eec1..241c45aa 100644
--- a/client/src/i18n/locales/th.json
+++ b/client/src/i18n/locales/th.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "ต้องใช้กุญแจ API",
"claudeAliases": "นามแฝงการค้นหาของ Claude Code",
"claudeAliasesHint": "เปิดเผยนามแฝง claude/<model> เพื่อให้ตัวเลือกโมเดลของเกตเวย์แสดงรายการแค็ตตาล็อกได้",
+ "mcpServer": "เซิร์ฟเวอร์ MCP",
+ "mcpServerHint": "เปิดปลายทาง /mcp ให้ไคลเอนต์เอเจนต์ใช้งาน การติดตั้งใหม่จะเริ่มต้นโดยปิดไว้",
"urlTokensTitle": "โทเค็น URL ที่เพิกถอนได้",
"urlTokensDesc": "สำหรับไคลเอนต์ที่ไม่มีส่วนหัวเท่านั้น โทเค็น URL อาจรั่วไหลไปยังประวัติและบันทึก ดังนั้นให้เพิกถอนเมื่อไม่ต้องการใช้อีกต่อไป",
"urlTokenLabel": "ป้ายกำกับโทเค็น",
diff --git a/client/src/i18n/locales/tl.json b/client/src/i18n/locales/tl.json
index 32fa6487..136d6fc9 100644
--- a/client/src/i18n/locales/tl.json
+++ b/client/src/i18n/locales/tl.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "Kailangan ng API key",
"claudeAliases": "Mga discovery alias ng Claude Code",
"claudeAliasesHint": "Ilantad ang mga claude/<model> na alias para mailista ng model picker ng gateway ang catalog.",
+ "mcpServer": "MCP server",
+ "mcpServerHint": "Ilalantad ang /mcp endpoint para sa mga agent client. Naka-off ito sa mga bagong install.",
"urlTokensTitle": "Mga nare-revoke na URL token",
"urlTokensDesc": "Para lamang sa mga client na walang header. Maaaring tumagas ang mga URL token sa history at mga log, kaya i-revoke ang mga ito kapag hindi na kailangan.",
"urlTokenLabel": "Label ng token",
diff --git a/client/src/i18n/locales/tr.json b/client/src/i18n/locales/tr.json
index 5b080fd1..f0c93963 100644
--- a/client/src/i18n/locales/tr.json
+++ b/client/src/i18n/locales/tr.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "API anahtarı gerekli",
"claudeAliases": "Claude Code keşif takma adları",
"claudeAliasesHint": "Ağ geçidi model seçicisinin kataloğu listeleyebilmesi için claude/<model> takma adlarını açığa çıkarın.",
+ "mcpServer": "MCP sunucusu",
+ "mcpServerHint": "/mcp uç noktasını aracı istemcilere açar. Yeni kurulumlarda kapalı başlar.",
"urlTokensTitle": "İptal edilebilir URL belirteçleri",
"urlTokensDesc": "Yalnızca başlık gönderemeyen istemciler için. URL belirteçleri geçmişe ve günlüklere sızabilir; bu yüzden artık gerekmediğinde iptal edin.",
"urlTokenLabel": "Belirteç etiketi",
diff --git a/client/src/i18n/locales/uk.json b/client/src/i18n/locales/uk.json
index 56634138..8e34ea56 100644
--- a/client/src/i18n/locales/uk.json
+++ b/client/src/i18n/locales/uk.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "Потрібен ключ API",
"claudeAliases": "Псевдоніми виявлення Claude Code",
"claudeAliasesHint": "Відкрийте псевдоніми claude/<model>, щоб вибирач моделей шлюзу міг показати каталог.",
+ "mcpServer": "Сервер MCP",
+ "mcpServerHint": "Відкриває кінцеву точку /mcp для агентних клієнтів. У нових встановленнях вимкнено.",
"urlTokensTitle": "Відкличні URL-токени",
"urlTokensDesc": "Лише для клієнтів без заголовків. URL-токени можуть потрапити в історію та журнали, тому відкликайте їх, коли вони більше не потрібні.",
"urlTokenLabel": "Мітка токена",
diff --git a/client/src/i18n/locales/ur.json b/client/src/i18n/locales/ur.json
index 28669035..f29a1dce 100644
--- a/client/src/i18n/locales/ur.json
+++ b/client/src/i18n/locales/ur.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "API کلید درکار ہے۔",
"claudeAliases": "Claude Code ڈسکوری عرفی نام",
"claudeAliasesHint": "claude/<model> عرفی نام ظاہر کریں تاکہ گیٹ وے ماڈل منتخب کنندہ کیٹلاگ کی فہرست دکھا سکے۔",
+ "mcpServer": "MCP سرور",
+ "mcpServerHint": "ایجنٹ کلائنٹس کے لیے /mcp اینڈ پوائنٹ کھولتا ہے۔ نئی تنصیبات میں یہ بند رہتا ہے۔",
"urlTokensTitle": "قابلِ منسوخ URL ٹوکنز",
"urlTokensDesc": "صرف بغیر ہیڈر والے کلائنٹس کے لیے۔ URL ٹوکنز ہسٹری اور لاگز میں لیک ہو سکتے ہیں، اس لیے ضرورت نہ رہنے پر انہیں منسوخ کر دیں۔",
"urlTokenLabel": "ٹوکن لیبل",
diff --git a/client/src/i18n/locales/uz.json b/client/src/i18n/locales/uz.json
index 639601d0..ca34adaa 100644
--- a/client/src/i18n/locales/uz.json
+++ b/client/src/i18n/locales/uz.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "API kaliti talab qilinadi",
"claudeAliases": "Claude Code aniqlash taxalluslari",
"claudeAliasesHint": "Shlyuz model tanlagichi katalogni ro'yxatlashi uchun claude/<model> taxalluslarini oching.",
+ "mcpServer": "MCP serveri",
+ "mcpServerHint": "Agent mijozlari uchun /mcp yakuniy nuqtasini ochadi. Yangi o‘rnatishlarda u o‘chiq bo‘ladi.",
"urlTokensTitle": "Bekor qilinadigan URL tokenlari",
"urlTokensDesc": "Faqat sarlavhasiz mijozlar uchun. URL tokenlari tarix va jurnallarga sizib chiqishi mumkin, shuning uchun kerak bo'lmaganda ularni bekor qiling.",
"urlTokenLabel": "Token yorlig'i",
diff --git a/client/src/i18n/locales/vi.json b/client/src/i18n/locales/vi.json
index f0ba55f4..f077ac5a 100644
--- a/client/src/i18n/locales/vi.json
+++ b/client/src/i18n/locales/vi.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "Yêu cầu khóa API",
"claudeAliases": "Bí danh khám phá Claude Code",
"claudeAliasesHint": "Hiển thị bí danh claude/<model> để bộ chọn mô hình của cổng có thể liệt kê danh mục.",
+ "mcpServer": "Máy chủ MCP",
+ "mcpServerHint": "Mở endpoint /mcp cho các client tác nhân. Bản cài mới mặc định tắt.",
"urlTokensTitle": "Mã thông báo URL có thể thu hồi",
"urlTokensDesc": "Chỉ dành cho các ứng dụng khách không có tiêu đề. Mã thông báo URL có thể bị lộ vào lịch sử và nhật ký, vì vậy hãy thu hồi khi không còn cần thiết.",
"urlTokenLabel": "Nhãn mã thông báo",
diff --git a/client/src/i18n/locales/yo.json b/client/src/i18n/locales/yo.json
index 627de45c..38a28887 100644
--- a/client/src/i18n/locales/yo.json
+++ b/client/src/i18n/locales/yo.json
@@ -550,6 +550,8 @@
"ollamaKeyRequired": "A nilo bọtini API",
"claudeAliases": "Awọn inagijẹ wiwa Claude Code",
"claudeAliasesHint": "Fi awọn inagijẹ claude/<model> han ki oluyan awoṣe ẹnu-ọna le ṣe atokọ katalogu naa.",
+ "mcpServer": "Olupin MCP",
+ "mcpServerHint": "Ó ń ṣí ojú-òpin /mcp fún àwọn oníbàárà aṣojú. Àwọn fifi-sori tuntun máa ń bẹ̀rẹ̀ ní pípa.",
"urlTokensTitle": "Awọn tokini URL ti a le fagile",
"urlTokensDesc": "Fun awọn alabara ti ko ni akọsori nikan. Awọn tokini URL le jo sinu itan-akọọlẹ ati awọn akọsilẹ, nitorinaa fagile wọn nigbati wọn ko ba nilo mọ.",
"urlTokenLabel": "Aami tokini",
diff --git a/client/src/i18n/locales/zh-CN.json b/client/src/i18n/locales/zh-CN.json
index 47e049aa..ab184935 100644
--- a/client/src/i18n/locales/zh-CN.json
+++ b/client/src/i18n/locales/zh-CN.json
@@ -554,6 +554,8 @@
"ollamaKeyRequired": "需要 API 密钥",
"claudeAliases": "Claude Code 发现别名",
"claudeAliasesHint": "公开 claude/<model> 别名,以便网关模型选择器列出目录。",
+ "mcpServer": "MCP 服务器",
+ "mcpServerHint": "向智能体客户端开放 /mcp 端点。新安装默认关闭。",
"urlTokensTitle": "可撤销的 URL 令牌",
"urlTokensDesc": "仅供无法发送请求头的客户端使用。URL 令牌可能泄露到历史记录和日志中,不再需要时请及时撤销。",
"urlTokenLabel": "令牌标签",
diff --git a/client/src/i18n/locales/zh-TW.json b/client/src/i18n/locales/zh-TW.json
index 63e07ed1..ce4e7c9c 100644
--- a/client/src/i18n/locales/zh-TW.json
+++ b/client/src/i18n/locales/zh-TW.json
@@ -554,6 +554,8 @@
"ollamaKeyRequired": "需要 API 金鑰",
"claudeAliases": "Claude Code 探索別名",
"claudeAliasesHint": "公開 claude/<model> 別名,讓閘道的模型選擇器能列出目錄。",
+ "mcpServer": "MCP 伺服器",
+ "mcpServerHint": "向代理客戶端開放 /mcp 端點。新安裝預設關閉。",
"urlTokensTitle": "可撤銷的 URL Token",
"urlTokensDesc": "僅供無法傳送標頭的用戶端使用。URL Token 可能外洩到歷史記錄和日誌中,不再需要時請撤銷。",
"urlTokenLabel": "Token 標籤",
diff --git a/docs/clients/01-agent-clients.md b/docs/clients/01-agent-clients.md
index 93311ba7..a8ff52bd 100644
--- a/docs/clients/01-agent-clients.md
+++ b/docs/clients/01-agent-clients.md
@@ -221,7 +221,22 @@ telemetry.
On top of inference, the router is an **MCP server**: agents can introspect it mid-session
(usable models and the params each one honors, provider health, usage and cache stats,
-routing strategy). For Claude Code:
+routing strategy).
+
+The MCP surface is a setting rather than an always-on endpoint (#925). **Fresh installs
+start with it off**; installs that already had provider keys configured when they upgraded
+keep it on, so an existing Claude Code or Cline session does not break on upgrade. Toggle
+it on the Keys page under **Agent compatibility**, or from the API:
+
+```bash
+curl -X PUT http://localhost:3001/api/settings/enable-mcp \
+ -H "Authorization: Bearer <dashboard-token>" -H "Content-Type: application/json" \
+ -d '{"enabled": true}'
+```
+
+While it is off, every verb on `/mcp` answers `403` with a JSON-RPC error saying so.
+
+For Claude Code:
```bash
claude mcp add --transport http freellmapi http://localhost:3001/mcp \
diff --git a/docs/i18n/zh-CN/docs/clients/01-agent-clients.md b/docs/i18n/zh-CN/docs/clients/01-agent-clients.md
index 18d46915..e43da22d 100644
--- a/docs/i18n/zh-CN/docs/clients/01-agent-clients.md
+++ b/docs/i18n/zh-CN/docs/clients/01-agent-clients.md
@@ -132,7 +132,19 @@ http://localhost:3001/v1/t/<token>/models
在推理之上,路由器还是个 **MCP 服务器**:智能体能在会话中途内省它
(可用模型及各模型支持的参数、提供方健康度、用量与缓存统计、
-路由策略)。对 Claude Code:
+路由策略)。
+
+MCP 接口是一项设置,而非始终开启的端点(#925)。**全新安装默认关闭**;升级时已配置提供方密钥的安装会保持开启,这样已有的 Claude Code 或 Cline 会话不会在升级后中断。可在「密钥」页的**智能体兼容性**里开关,也可以走 API:
+
+```bash
+curl -X PUT http://localhost:3001/api/settings/enable-mcp \
+ -H "Authorization: Bearer <dashboard-token>" -H "Content-Type: application/json" \
+ -d '{"enabled": true}'
+```
+
+关闭期间,`/mcp` 的所有方法都会返回 `403` 和一条说明用的 JSON-RPC 错误。
+
+对 Claude Code:
```bash
claude mcp add --transport http freellmapi http://localhost:3001/mcp \
diff --git a/server/src/__tests__/db/migrate/roundtrip.test.ts b/server/src/__tests__/db/migrate/roundtrip.test.ts
index 0761bc52..2c9d2245 100644
--- a/server/src/__tests__/db/migrate/roundtrip.test.ts
+++ b/server/src/__tests__/db/migrate/roundtrip.test.ts
@@ -35,6 +35,7 @@ const PROFILE_AUTO_INCLUDE_FILENAME = '20260823_000004_profile_auto_include.ts';
const IDEMPOTENCY_CLAIMS_FILENAME = '20260901_000001_idempotency_claims.ts';
const QUOTA_OBSERVATION_LOOKUP_FILENAME = '20260901_000002_quota_observation_lookup.ts';
const ANALYTICS_LATENCY_PERCENTILE_INDEX_FILENAME = '20260902_000001_analytics_latency_percentile_index.ts';
+const MCP_ENABLED_DEFAULT_FILENAME = '20260903_000001_mcp_enabled_default.ts';
interface SchemaRow {
type: string;
@@ -116,6 +117,7 @@ describe('migration round trip', () => {
IDEMPOTENCY_CLAIMS_FILENAME,
QUOTA_OBSERVATION_LOOKUP_FILENAME,
ANALYTICS_LATENCY_PERCENTILE_INDEX_FILENAME,
+ MCP_ENABLED_DEFAULT_FILENAME,
]);
} finally {
db.close();
@@ -146,6 +148,16 @@ describe('migration round trip', () => {
VALUES ('custom', '127.0.0.1:11434', 'x', 'x', 'x', 'http://127.0.0.1:11434/v1')
`).run();
+ // Same again for the /mcp lifecycle seed (#925): it reads api_keys, and
+ // with the key above present its post-migration state is enabled ('1').
+ // The first up ran against an empty api_keys and wrote '0', so pin the
+ // post-seed value here for down (row removed) and up (row rewritten) to
+ // round trip.
+ db.prepare(`
+ INSERT INTO settings (key, value) VALUES ('enable_mcp', '1')
+ ON CONFLICT(key) DO UPDATE SET value = excluded.value
+ `).run();
+
const fullState = snapshotAppState(db);
await runDownToBaseline(db);
diff --git a/server/src/__tests__/routes/mcp.test.ts b/server/src/__tests__/routes/mcp.test.ts
index 7fe4ac0e..54d6c7f9 100644
--- a/server/src/__tests__/routes/mcp.test.ts
+++ b/server/src/__tests__/routes/mcp.test.ts
@@ -1,7 +1,7 @@
import { describe, it, expect, beforeAll } from 'vitest';
import type { Express } from 'express';
import { createApp } from '../../app.js';
-import { initDb, getDb, getUnifiedApiKey } from '../../db/index.js';
+import { initDb, getDb, getUnifiedApiKey, setSetting } from '../../db/index.js';
let app: Express;
@@ -34,6 +34,8 @@ describe('MCP server (/mcp, stateless Streamable HTTP)', () => {
process.env.ENCRYPTION_KEY = '0'.repeat(64);
initDb(':memory:');
app = createApp();
+ // MCP is opt-in since #925 — these tests exercise the tool surface itself.
+ setSetting('enable_mcp', '1');
});
it('rejects requests without the unified key', async () => {
diff --git a/server/src/__tests__/routes/settings-mcp.test.ts b/server/src/__tests__/routes/settings-mcp.test.ts
new file mode 100644
index 00000000..cebe41b3
--- /dev/null
+++ b/server/src/__tests__/routes/settings-mcp.test.ts
@@ -0,0 +1,166 @@
+import { describe, it, expect, beforeAll } from 'vitest';
+import Database from 'better-sqlite3';
+import type { Express } from 'express';
+import { createApp } from '../../app.js';
+import { initDb, getSetting, getUnifiedApiKey } from '../../db/index.js';
+import { up as seedMcpDefault } from '../../db/migrations/20260903_000001_mcp_enabled_default.js';
+import { mintDashboardToken } from '../helpers/auth.js';
+
+async function request(app: Express, method: string, path: string, body: any, token: string) {
+ const server = app.listen(0, '127.0.0.1');
+ if (!server.listening) await new Promise<void>(resolve => server.once('listening', () => resolve()));
+ const addr = server.address() as any;
+ const res = await fetch(`http://127.0.0.1:${addr.port}${path}`, {
+ method,
+ headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${token}` },
+ body: body === undefined ? undefined : JSON.stringify(body),
+ });
+ const raw = await res.text();
+ server.close();
+ let json: any = null;
+ try { json = JSON.parse(raw); } catch {}
+ return { status: res.status, body: json };
+}
+
+describe('/api/settings/enable-mcp', () => {
+ let app: Express;
+ let token: string;
+
+ beforeAll(() => {
+ process.env.ENCRYPTION_KEY = '0'.repeat(64);
+ initDb(':memory:');
+ app = createApp();
+ token = mintDashboardToken();
+ });
+
+ it('reports false on a fresh install', async () => {
+ const { status, body } = await request(app, 'GET', '/api/settings/enable-mcp', undefined, token);
+ expect(status).toBe(200);
+ expect(body).toEqual({ enabled: false });
+ });
+
+ it('stores and returns the configured enabled flag', async () => {
+ const put = await request(app, 'PUT', '/api/settings/enable-mcp', { enabled: true }, token);
+ expect(put.status).toBe(200);
+ expect(put.body).toEqual({ enabled: true });
+ expect(getSetting('enable_mcp')).toBe('1');
+
+ const get = await request(app, 'GET', '/api/settings/enable-mcp', undefined, token);
+ expect(get.body).toEqual(put.body);
+ });
+
+ it('accepts false to disable', async () => {
+ await request(app, 'PUT', '/api/settings/enable-mcp', { enabled: true }, token);
+ const put = await request(app, 'PUT', '/api/settings/enable-mcp', { enabled: false }, token);
+ expect(put.status).toBe(200);
+ expect(put.body).toEqual({ enabled: false });
+ expect(getSetting('enable_mcp')).toBe('0');
+ });
+
+ const rejected: Array<[string, any]> = [
+ ['non-boolean enabled', { enabled: 'yes' }],
+ ['null enabled', { enabled: null }],
+ ];
+
+ for (const [label, payload] of rejected) {
+ it(`rejects ${label} with a 400`, async () => {
+ const { status, body } = await request(app, 'PUT', '/api/settings/enable-mcp', payload, token);
+ expect(status).toBe(400);
+ expect(body.error.type).toBe('invalid_request_error');
+ });
+ }
+});
+
+describe('/mcp lifecycle gate (#925)', () => {
+ let app: Express;
+ let token: string;
+ let unifiedKey: string;
+
+ beforeAll(() => {
+ process.env.ENCRYPTION_KEY = '0'.repeat(64);
+ initDb(':memory:');
+ app = createApp();
+ token = mintDashboardToken();
+ unifiedKey = getUnifiedApiKey();
+ });
+
+ it('off by default: POST /mcp answers 403 without touching auth', async () => {
+ const { status, body } = await request(app, 'POST', '/mcp', { jsonrpc: '2.0', id: 1, method: 'ping' }, unifiedKey);
+ expect(status).toBe(403);
+ expect(body.error.code).toBe(-32000);
+ expect(body.id).toBe(1);
+ });
+
+ // A disabled server must not answer "405, POST instead" on the other verbs:
+ // that reads as "the server is here, you are holding it wrong".
+ it('off by default: GET and DELETE /mcp answer 403 too', async () => {
+ const get = await request(app, 'GET', '/mcp', undefined, unifiedKey);
+ expect(get.status).toBe(403);
+ expect(get.body.error.code).toBe(-32000);
+
+ const del = await request(app, 'DELETE', '/mcp', undefined, unifiedKey);
+ expect(del.status).toBe(403);
+ expect(del.body.error.code).toBe(-32000);
+ });
+
+ it('serves JSON-RPC once enabled, rejects wrong keys, and takes the toggle down immediately', async () => {
+ const put = await request(app, 'PUT', '/api/settings/enable-mcp', { enabled: true }, token);
+ expect(put.status).toBe(200);
+
+ const ok = await request(app, 'POST', '/mcp', { jsonrpc: '2.0', id: 1, method: 'ping' }, unifiedKey);
+ expect(ok.status).toBe(200);
+ expect(ok.body.result).toBeDefined();
+
+ // Enabled, stateless: the other verbs are back to their 405 explanation.
+ const get = await request(app, 'GET', '/mcp', undefined, unifiedKey);
+ expect(get.status).toBe(405);
+
+ const bad = await request(app, 'POST', '/mcp', { jsonrpc: '2.0', id: 2, method: 'ping' }, 'freellmapi-not-the-key');
+ expect(bad.status).toBe(401);
+
+ await request(app, 'PUT', '/api/settings/enable-mcp', { enabled: false }, token);
+ const off = await request(app, 'POST', '/mcp', { jsonrpc: '2.0', id: 3, method: 'ping' }, unifiedKey);
+ expect(off.status).toBe(403);
+ });
+});
+
+// The stored default is what decides whether an upgrade is a silent breakage.
+describe('enable_mcp default seed (#925)', () => {
+ function makeDb(): Database.Database {
+ const db = new Database(':memory:');
+ db.exec(`
+ CREATE TABLE settings (key TEXT PRIMARY KEY, value TEXT NOT NULL);
+ CREATE TABLE api_keys (id INTEGER PRIMARY KEY AUTOINCREMENT, platform TEXT NOT NULL);
+ `);
+ return db;
+ }
+
+ function stored(db: Database.Database): string | undefined {
+ const row = db.prepare("SELECT value FROM settings WHERE key = 'enable_mcp'").get() as { value: string } | undefined;
+ return row?.value;
+ }
+
+ it('starts off on a fresh install (no provider keys yet)', () => {
+ const db = makeDb();
+ seedMcpDefault(db as any);
+ expect(stored(db)).toBe('0');
+ db.close();
+ });
+
+ it('stays on for an install that already had provider keys', () => {
+ const db = makeDb();
+ db.prepare("INSERT INTO api_keys (platform) VALUES ('groq')").run();
+ seedMcpDefault(db as any);
+ expect(stored(db)).toBe('1');
+ db.close();
+ });
+
+ it('never overwrites a value the operator already chose', () => {
+ const db = makeDb();
+ db.prepare("INSERT INTO api_keys (platform) VALUES ('groq')").run();
+ db.prepare("INSERT INTO settings (key, value) VALUES ('enable_mcp', '0')").run();
+ seedMcpDefault(db as any);
+ expect(stored(db)).toBe('0');
+ db.close();
+ });
+});
diff --git a/server/src/db/migrate/defaults.ts b/server/src/db/migrate/defaults.ts
index ee9382d8..b3d9cdc9 100644
--- a/server/src/db/migrate/defaults.ts
+++ b/server/src/db/migrate/defaults.ts
@@ -30,6 +30,7 @@ import * as profileAutoInclude from '../migrations/20260823_000004_profile_auto_
import * as idempotencyClaims from '../migrations/20260901_000001_idempotency_claims.js';
import * as quotaObservationLookup from '../migrations/20260901_000002_quota_observation_lookup.js';
import * as analyticsLatencyPercentileIndex from '../migrations/20260902_000001_analytics_latency_percentile_index.js';
+import * as mcpEnabledDefault from '../migrations/20260903_000001_mcp_enabled_default.js';
export interface MigrationModule {
up(db: Db): void;
@@ -72,6 +73,7 @@ export const PROFILE_AUTO_INCLUDE_FILENAME = '20260823_000004_profile_auto_inclu
export const IDEMPOTENCY_CLAIMS_FILENAME = '20260901_000001_idempotency_claims.ts';
export const QUOTA_OBSERVATION_LOOKUP_FILENAME = '20260901_000002_quota_observation_lookup.ts';
export const ANALYTICS_LATENCY_PERCENTILE_INDEX_FILENAME = '20260902_000001_analytics_latency_percentile_index.ts';
+export const MCP_ENABLED_DEFAULT_FILENAME = '20260903_000001_mcp_enabled_default.ts';
export const DEFAULT_MIGRATIONS: readonly DefaultMigration[] = [
{ filename: LEGACY_BASELINE_FILENAME, module: legacyBaseline },
@@ -105,4 +107,5 @@ export const DEFAULT_MIGRATIONS: readonly DefaultMigration[] = [
{ filename: IDEMPOTENCY_CLAIMS_FILENAME, module: idempotencyClaims },
{ filename: QUOTA_OBSERVATION_LOOKUP_FILENAME, module: quotaObservationLookup },
{ filename: ANALYTICS_LATENCY_PERCENTILE_INDEX_FILENAME, module: analyticsLatencyPercentileIndex },
+ { filename: MCP_ENABLED_DEFAULT_FILENAME, module: mcpEnabledDefault },
];
diff --git a/server/src/db/migrations/20260903_000001_mcp_enabled_default.ts b/server/src/db/migrations/20260903_000001_mcp_enabled_default.ts
new file mode 100644
index 00000000..cbc75341
--- /dev/null
+++ b/server/src/db/migrations/20260903_000001_mcp_enabled_default.ts
@@ -0,0 +1,42 @@
+// Migration: seed the /mcp lifecycle default (#925, MVP-1)
+// Created: 2026-09-03
+//
+// DOWN: reversible
+//
+// The MCP introspection server used to be unconditionally on. #925 makes it a
+// setting, and asks for off-by-default — but flipping it off for everyone would
+// silently break every Claude Code / Cline session already pointed at /mcp, and
+// the failure would look like a broken gateway rather than a new switch.
+//
+// So the default is decided once, here, from what the database already looks
+// like when this migration runs:
+//
+// - provider keys present -> an install that has been in use, and may well
+// have an MCP client attached: seed '1' (on), so
+// the upgrade changes nothing until the operator
+// turns it off.
+// - no provider keys -> a fresh install running the whole migration
+// stack against an empty database: seed '0'
+// (off), which is the #925 default.
+//
+// An operator's own value always wins: if the row already exists (they set it
+// through /api/settings/enable-mcp before upgrading, say) it is left alone.
+
+import type { Db } from '../types.js';
+
+const SETTING_KEY = 'enable_mcp';
+
+export function up(db: Db): void {
+ const existing = db.prepare('SELECT value FROM settings WHERE key = ?').get(SETTING_KEY);
+ if (existing) return;
+
+ const row = db.prepare('SELECT COUNT(*) AS count FROM api_keys').get() as { count: number };
+ const isExistingInstall = row.count > 0;
+
+ db.prepare('INSERT INTO settings (key, value) VALUES (?, ?)')
+ .run(SETTING_KEY, isExistingInstall ? '1' : '0');
+}
+
+export function down(db: Db): void {
+ db.prepare('DELETE FROM settings WHERE key = ?').run(SETTING_KEY);
+}
diff --git a/server/src/routes/mcp.ts b/server/src/routes/mcp.ts
index 7de7db39..67ff9e1d 100644
--- a/server/src/routes/mcp.ts
+++ b/server/src/routes/mcp.ts
@@ -1,6 +1,6 @@
import { Router } from 'express';
-import type { Request, Response } from 'express';
-import { getDb, getUnifiedApiKey } from '../db/index.js';
+import type { NextFunction, Request, Response } from 'express';
+import { getDb, getUnifiedApiKey, getSetting } from '../db/index.js';
import { extractApiToken, timingSafeStringEqual } from './proxy.js';
import { buildModelListing } from '../services/model-listing.js';
import { supportedParametersForPlatforms } from '../lib/sampling-params.js';
@@ -317,6 +317,33 @@ function authenticate(req: Request, res: Response): boolean {
return true;
}
+// ── Lifecycle configuration (#925, MVP-1) ───────────────────────────────────
+// The MCP surface exposes provider health, usage stats and routing controls to
+// anything holding the unified key, so it is a configured surface rather than
+// an always-on one: /api/settings/enable-mcp (and the toggle on the Keys page)
+// turns it on and off. The stored default is decided once, by migration:
+// installs that already had provider keys when they upgraded keep it on, fresh
+// installs start with it off.
+export const MCP_ENABLED_SETTING = 'enable_mcp';
+
+export function isMcpServerEnabled(): boolean {
+ return getSetting(MCP_ENABLED_SETTING) === '1';
+}
+
+// Gate every verb, not just POST: a disabled server must not answer "405, POST
+// instead" on GET/DELETE either. Runs before auth so a disabled server says so
+// plainly, without hinting whether the presented key would have been valid, and
+// reads the setting per request so the toggle applies without a restart.
+mcpRouter.use((req: Request, res: Response, next: NextFunction) => {
+ if (isMcpServerEnabled()) {
+ next();
+ return;
+ }
+ const body = req.body;
+ const id = body && typeof body === 'object' && !Array.isArray(body) && body.id !== undefined ? body.id : null;
+ res.status(403).json(rpcError(id, -32000, 'MCP server is disabled. Turn it on from the dashboard (Keys -> Agent compatibility) or with PUT /api/settings/enable-mcp {"enabled":true}.'));
+});
+
mcpRouter.post('/', (req: Request, res: Response) => {
if (!authenticate(req, res)) return;
diff --git a/server/src/routes/settings.ts b/server/src/routes/settings.ts
index ded2832a..00ec63cf 100644
--- a/server/src/routes/settings.ts
+++ b/server/src/routes/settings.ts
@@ -24,6 +24,7 @@ import {
setCompressionConfig,
} from '../services/compression/config.js';
import { getHeadroomThresholds, setHeadroomThresholds } from '../services/router.js';
+import { MCP_ENABLED_SETTING, isMcpServerEnabled } from './mcp.js';
import { z } from 'zod';
import { getAppVersion } from '../lib/app-version.js';
import {
@@ -131,6 +132,27 @@ settingsRouter.put('/fusion', (req: Request, res: Response) => {
res.json({ config: saved, maxK: getFusionMaxK() });
});
+// ── MCP server lifecycle (#925, MVP-1) ──────────────────────────────────────
+// Config surface for the /mcp introspection server. The Keys page renders this
+// as a switch under Agent compatibility; the stored default is seeded once by
+// migration so upgrades keep serving the clients they already had.
+
+settingsRouter.get('/enable-mcp', (_req: Request, res: Response) => {
+ res.json({ enabled: isMcpServerEnabled() });
+});
+
+const enableMcpSchema = z.object({ enabled: z.boolean() });
+
+settingsRouter.put('/enable-mcp', (req: Request, res: Response) => {
+ const parsed = enableMcpSchema.safeParse(req.body);
+ if (!parsed.success) {
+ res.status(400).json({ error: { message: 'Invalid MCP setting: enabled must be a boolean.', type: 'invalid_request_error' } });
+ return;
+ }
+ setSetting(MCP_ENABLED_SETTING, parsed.data.enabled ? '1' : '0');
+ res.json({ enabled: parsed.data.enabled });
+});
+
// Get the Claude Code model map (opus/sonnet/haiku/default → 'auto' | model_id).
// Drives how the Anthropic /v1/messages route resolves Claude Code's built-in
// model names against the free pool.