Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Studio: per-tool MCP switches at the end of Settings > Agents (#15629)
Etherldecd94ae0509
diff --git a/studio/MCP.md b/studio/MCP.mdindex fd678d6ddb4..ab2202eb09c 100644--- a/studio/MCP.md+++ b/studio/MCP.md@@ -79,7 +79,7 @@ your API key, so it sees what that key may see and nothing more.### Turn it onThe server is off by default. While it is off, `/mcp/` answers 404. The Unsloth-Unsloth owner turns it on in Settings > API with **Allow agent connections**.+Studio owner turns it on in Settings > Agents with **Allow agent connections**.Starting Unsloth Studio with `UNSLOTH_STUDIO_ENABLE_MCP=1` also turns it on andlocks the switch, which then reads "Set by UNSLOTH_STUDIO_ENABLE_MCP."@@ -305,6 +305,21 @@ Follow every long job with `get_job(kind=…, id=…, wait_s=…)`: it checks evStop work with `cancel`.Unsloth Studio runs one export at a time, so `export_model` is refused while another export runs, and cancelling an export job stops only that job's own step.+### Choose tools++Every tool is on by default, including tools added by a later update. The+Unsloth Studio owner turns single tools off in Settings > Agents with **Choose tools**.+The choice covers the whole installation and every API key. A tool that is off+is left out of `tools/list`, and a call to it fails with+`[tool_disabled] <tool> is turned off in Unsloth Studio. The owner can turn it on in Settings > Agents.`+A prompt is hidden while a tool it reads (`studio_status` or `list_models`) is+off. The forced switch from `UNSLOTH_STUDIO_ENABLE_MCP=1` does not lock the tool+choices.++Agents read the tool list when they connect, so an agent that is already+connected keeps showing a tool you turned off until it reconnects. Its calls to+that tool are refused at once.+### Media and filesGenerated images, audio and videos are saved to Unsloth Studio's galleries, the same asdiff --git a/studio/backend/mcp_server.py b/studio/backend/mcp_server.pyindex 4b17fad62e0..7bd95c57e83 100644--- a/studio/backend/mcp_server.py+++ b/studio/backend/mcp_server.py@@ -8,6 +8,7 @@ from __future__ import annotationsfrom fastmcp import FastMCPfrom studio_mcp import prompts+from studio_mcp.tool_access import StudioToolAccessfrom studio_mcp.tools import (audio,cancel,@@ -42,24 +43,41 @@ INSTRUCTIONS = " ".join()+TOOL_MODULES = (+ status,+ models,+ text,+ images,+ audio,+ video,+ jobs,+ data,+ training,+ export,+ library,+ cancel,+)+++def tool_catalog() -> list[dict[str, str]]:+ """Every tool as ``{name, area}`` in registration order; the area is its module's short name."""+ return [+ {"name": tool.__name__, "area": module.__name__.rsplit(".", 1)[-1]}+ for module in TOOL_MODULES+ for tool, *_ in module.TOOLS+ ]+++def tool_names() -> tuple[str, ...]:+ return tuple(entry["name"] for entry in tool_catalog())++def create_studio_mcp() -> FastMCP:"""Create the Unsloth MCP server and register the high-value tools."""mcp = FastMCP("Unsloth Studio", instructions = INSTRUCTIONS)+ mcp.add_middleware(StudioToolAccess())- for module in (- status,- models,- text,- images,- audio,- video,- jobs,- data,- training,- export,- library,- cancel,- ):+ for module in TOOL_MODULES:for tool, annotations, *schema in module.TOOLS:mcp.tool(tool, annotations = annotations, **({"output_schema": schema[0]} if schema else {})diff --git a/studio/backend/routes/settings.py b/studio/backend/routes/settings.pyindex 8034c651ff9..4ed7c8fc6da 100644--- a/studio/backend/routes/settings.py+++ b/studio/backend/routes/settings.py@@ -190,7 +190,12 @@ from utils.keyless_api_access import (get_keyless_api_access_settings,set_keyless_api_access,)-from utils.mcp_access import forced_by_env, is_mcp_enabled, set_mcp_enabled+from utils.mcp_access import (+ UnknownMcpToolError,+ forced_by_env,+ owner_record as mcp_owner_record,+ set_mcp_settings,+)from utils.preview_sharing_settings import (DEFAULT_PREVIEW_SHARING_ENABLED,get_preview_sharing_enabled,@@ -4169,7 +4174,28 @@ class KeylessApiAccessResponse(BaseModel):class McpAccessPayload(BaseModel):- enabled: StrictBool+ # Either or both; a bare ``enabled`` comes from an older client.+ enabled: Optional[StrictBool] = None+ disabled_tools: Optional[list[StrictStr]] = None+ # One tool's switch, merged into the stored list on the server so concurrent toggles both land.+ tool_states: Optional[dict[StrictStr, StrictBool]] = None++ @model_validator(mode = "after")+ def at_least_one(self):+ if not self.model_fields_set:+ raise ValueError("Send enabled, disabled_tools or tool_states.")+ if {"disabled_tools", "tool_states"} <= self.model_fields_set:+ raise ValueError("Send disabled_tools or tool_states, not both.")+ for name in self.model_fields_set:+ if getattr(self, name) is None:+ raise ValueError(f"{name} cannot be null.")+ return self+++class McpToolSetting(BaseModel):+ name: str+ area: str+ enabled: boolclass McpAccessResponse(BaseModel):@@ -4177,6 +4203,8 @@ class McpAccessResponse(BaseModel):forced_by_env: bool# Display only: where an agent should point. Agents connect to whatever address reaches this server.url: str+ # Null when unreadable, so a client never saves a full list from a fake "every tool off" view.+ tools: Optional[list[McpToolSetting]]class PreviewSharingPayload(BaseModel):@@ -4667,10 +4695,21 @@ def _require_ui_session_for_mcp(via_api_key: bool = Depends(authenticated_via_apdef _mcp_access_response(request: Request) -> McpAccessResponse:+ from mcp_server import tool_catalog++ record = mcp_owner_record()+ tools = None+ if record is not None:+ disabled = record[1]+ tools = [+ McpToolSetting(**entry, enabled = disabled is not None and entry["name"] not in disabled)+ for entry in tool_catalog()+ ]return McpAccessResponse(- enabled = is_mcp_enabled(),+ enabled = forced_by_env() or (record is not None and record[0]),forced_by_env = forced_by_env(),url = str(request.base_url).rstrip("/") + "/mcp/",+ tools = tools,)@@ -4690,12 +4729,26 @@ def update_mcp_access(current_subject: str = Depends(get_current_subject),_ui_session: None = Depends(_require_ui_session_for_mcp),) -> McpAccessResponse:- """Turn agent access over MCP on or off for the whole installation."""- if forced_by_env():+ """Turn agent access over MCP on or off for the whole installation, and choose which tools agents get."""+ # The env var forces only the switch; the owner still picks tools.+ if payload.enabled is not None and forced_by_env():raise HTTPException(status_code = 409, detail = "Set by UNSLOTH_STUDIO_ENABLE_MCP.")- enabled = set_mcp_enabled(payload.enabled)- logger.info("settings.mcp_access_updated subject=%s enabled=%s", current_subject, enabled)- return _mcp_access_response(request)+ try:+ set_mcp_settings(+ enabled = payload.enabled,+ disabled_tools = payload.disabled_tools,+ tool_states = payload.tool_states,+ )+ except UnknownMcpToolError as exc:+ raise HTTPException(status_code = 422, detail = str(exc))+ response = _mcp_access_response(request)+ logger.info(+ "settings.mcp_access_updated subject=%s enabled=%s disabled=%s",+ current_subject,+ response.enabled,+ None if response.tools is None else sum(not tool.enabled for tool in response.tools),+ )+ return responsedef _is_bundled_avatar_url(value: str) -> bool:diff --git a/studio/backend/studio_mcp/prompts.py b/studio/backend/studio_mcp/prompts.pyindex c13f3449c41..90bf11c355b 100644--- a/studio/backend/studio_mcp/prompts.py+++ b/studio/backend/studio_mcp/prompts.py@@ -199,3 +199,9 @@ PROMPTS = ((make_short_film, "Make a short film"),(build_dataset_and_train, "Build a dataset and train"),)++# Tools each prompt calls itself to read live facts; the prompt is hidden while any of them is off.+PROMPT_REQUIRES = {+ "make_short_film": frozenset({"studio_status", "list_models"}),+ "build_dataset_and_train": frozenset({"studio_status", "list_models"}),+}diff --git a/studio/backend/studio_mcp/tool_access.py b/studio/backend/studio_mcp/tool_access.pynew file mode 100644index 00000000000..d818adf5061--- /dev/null+++ b/studio/backend/studio_mcp/tool_access.py@@ -0,0 +1,65 @@+# SPDX-License-Identifier: AGPL-3.0-only+# Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0++"""Hide and refuse the MCP tools the owner turned off in Settings > Agents, and the prompts that read them. The list is installation-wide and read as the owner, so it works with or without a request."""++from __future__ import annotations++import asyncio+from typing import Optional++from fastmcp.exceptions import PromptError+from fastmcp.server.middleware import Middleware++from studio_mcp.errors import tool_error+from studio_mcp.prompts import PROMPT_REQUIRES+from utils import mcp_access++TAG = "tool_disabled"+++def disabled_message(name: str) -> str:+ return f"{name} is turned off in Unsloth Studio. The owner can turn it on in Settings > Agents."+++async def _disabled() -> Optional[frozenset[str]]:+ return await asyncio.to_thread(mcp_access.disabled_tools)+++def _off(name: str, disabled: Optional[frozenset[str]]) -> bool:+ return disabled is None or name in disabled+++def _prompt_off(name: str, disabled: Optional[frozenset[str]]) -> list[str]:+ return sorted(tool for tool in PROMPT_REQUIRES.get(name, ()) if _off(tool, disabled))+++class StudioToolAccess(Middleware):+ async def on_list_tools(self, context, call_next):+ tools = await call_next(context)+ disabled = await _disabled()+ return [tool for tool in tools if not _off(tool.name, disabled)]++ async def on_call_tool(self, context, call_next):+ from mcp_server import tool_names++ name = context.message.name+ # An unregistered name falls through to fastmcp's own "Unknown tool".+ if name in tool_names() and _off(name, await _disabled()):+ raise tool_error(disabled_message(name), tag = TAG)+ return await call_next(context)++ async def on_list_prompts(self, context, call_next):+ prompts = await call_next(context)+ disabled = await _disabled()+ return [prompt for prompt in prompts if not _prompt_off(prompt.name, disabled)]++ async def on_get_prompt(self, context, call_next):+ name = context.message.name+ off = _prompt_off(name, await _disabled())+ if off:+ raise PromptError(+ f"[{TAG}] The {name} prompt needs {', '.join(off)}, turned off in Unsloth Studio. "+ "The owner can turn them on in Settings > Agents."+ )+ return await call_next(context)diff --git a/studio/backend/tests/test_mcp_access_route.py b/studio/backend/tests/test_mcp_access_route.pyindex 59a2328853c..973ce80ab94 100644--- a/studio/backend/tests/test_mcp_access_route.py+++ b/studio/backend/tests/test_mcp_access_route.py@@ -5,11 +5,18 @@ import pytestfrom fastapi import FastAPIfrom fastapi.testclient import TestClient+import storage.studio_db as studio_dbfrom auth import policy, storagefrom auth.authentication import create_access_token+from mcp_server import tool_catalogfrom routes import settingsfrom utils.keyless_api_access import set_keyless_api_access-from utils.mcp_access import ENV_FORCE, get_mcp_enabled+from utils.mcp_access import (+ ENV_FORCE,+ MCP_DISABLED_TOOLS_SETTING_KEY,+ MCP_ENABLED_SETTING_KEY,+ get_mcp_enabled,+)from .mcp_harness import isolated_auth, owner_auth # noqa: F401 (fixtures)@@ -58,6 +65,7 @@ def test_the_owner_session_reads_and_turns_it_on(client):"enabled": False,"forced_by_env": False,"url": "http://127.0.0.1:8888/mcp/",+ "tools": [{**entry, "enabled": True} for entry in tool_catalog()],}put = client.put(URL, json = {"enabled": True}, headers = _owner_session())@@ -94,6 +102,7 @@ def _keyless(headers):OWNER_ONLY = "Only the installation owner can do this"[email protected]("body", [{"enabled": True}, {"disabled_tools": ["cancel"]}])@pytest.mark.parametrize("method", ["GET", "PUT"])@pytest.mark.parametrize("make_headers,detail",@@ -105,11 +114,12 @@ OWNER_ONLY = "Only the installation owner can do this"],ids = ["owner-api-key", "keyless", "keyless-dummy-bearer", "managed-account-session"],)-def test_anything_but_the_owners_ui_session_is_refused(client, method, make_headers, detail):- response = client.request(method, URL, json = {"enabled": True}, headers = make_headers())+def test_anything_but_the_owners_ui_session_is_refused(client, method, make_headers, detail, body):+ response = client.request(method, URL, json = body, headers = make_headers())assert response.status_code == 403assert response.json()["detail"] == detailassert get_mcp_enabled() is False+ assert _stored() == {}def test_a_put_while_forced_by_env_is_a_conflict(client, monkeypatch):@@ -122,3 +132,130 @@ def test_a_put_while_forced_by_env_is_a_conflict(client, monkeypatch):assert response.status_code == 409assert response.json()["detail"] == "Set by UNSLOTH_STUDIO_ENABLE_MCP."assert get_mcp_enabled() is False+ assert _stored() == {}+++def _stored():+ return studio_db.get_app_settings([MCP_ENABLED_SETTING_KEY, MCP_DISABLED_TOOLS_SETTING_KEY])+++def _off(response):+ return [tool["name"] for tool in response.json()["tools"] if not tool["enabled"]]+++def test_the_owner_turns_tools_off_and_back_on(client):+ put = client.put(URL, json = {"disabled_tools": ["voices", "cancel"]}, headers = _owner_session())+ assert put.status_code == 200, put.text+ assert _off(put) == ["voices", "cancel"]+ assert [tool["name"] for tool in put.json()["tools"]] == [e["name"] for e in tool_catalog()]+ assert put.json()["enabled"] is False+ assert _stored() == {MCP_DISABLED_TOOLS_SETTING_KEY: ["cancel", "voices"]}+ assert _off(client.get(URL, headers = _owner_session())) == ["voices", "cancel"]++ both = client.put(URL, json = {"enabled": True, "disabled_tools": []}, headers = _owner_session())+ assert both.status_code == 200, both.text+ assert both.json()["enabled"] is True and _off(both) == []+ assert _stored() == {MCP_ENABLED_SETTING_KEY: True, MCP_DISABLED_TOOLS_SETTING_KEY: []}+++def test_two_windows_toggling_different_tools_both_land(client):+ # Each window read the same snapshot; a whole-list PUT from the second would drop the first.+ a = client.put(URL, json = {"tool_states": {"voices": False}}, headers = _owner_session())+ b = client.put(URL, json = {"tool_states": {"cancel": False}}, headers = _owner_session())+ assert a.status_code == b.status_code == 200, (a.text, b.text)+ assert _stored() == {MCP_DISABLED_TOOLS_SETTING_KEY: ["cancel", "voices"]}+ on = client.put(URL, json = {"tool_states": {"voices": True}}, headers = _owner_session())+ assert _off(on) == ["cancel"]+++def test_concurrent_tool_states_all_land(client):+ from concurrent.futures import ThreadPoolExecutor++ names = [entry["name"] for entry in tool_catalog()][:8]+ with ThreadPoolExecutor(8) as pool:+ codes = list(+ pool.map(+ lambda name: client.put(+ URL, json = {"tool_states": {name: False}}, headers = _owner_session()+ ).status_code,+ names,+ )+ )+ assert codes == [200] * len(names)+ assert _stored() == {MCP_DISABLED_TOOLS_SETTING_KEY: sorted(names)}+++ "body",+ [+ {},+ {"something": True},+ {"disabled_tools": None},+ {"disabled_tools": "cancel"},+ {"disabled_tools": ["cancel", 1]},+ {"enabled": None, "disabled_tools": ["cancel"]},+ {"enabled": True, "disabled_tools": ["cancel", "nope"]},+ {"tool_states": None},+ {"tool_states": {"nope": False}},+ {"tool_states": {"cancel": "off"}},+ {"tool_states": {"cancel": False}, "disabled_tools": []},+ ],+)+def test_a_bad_body_is_a_422_and_writes_nothing(client, body):+ response = client.put(URL, json = body, headers = _owner_session())+ assert response.status_code == 422, response.text+ assert _stored() == {}+ if "nope" in str(body) and "disabled_tools" in body:+ assert response.json()["detail"] == "Unknown Unsloth Studio MCP tool: nope"++[email protected]("body", [{"disabled_tools": ["chat"]}, {"tool_states": {"chat": False}}])+def test_a_stale_stored_name_is_ignored_then_dropped(client, body):+ studio_db.upsert_app_settings({MCP_DISABLED_TOOLS_SETTING_KEY: ["gone_tool", "cancel"]})+ assert _off(client.get(URL, headers = _owner_session())) == ["cancel"]+ put = client.put(URL, json = body, headers = _owner_session())+ assert put.status_code == 200, put.text+ kept = ["chat"] if "disabled_tools" in body else ["cancel", "chat"]+ assert _stored() == {MCP_DISABLED_TOOLS_SETTING_KEY: kept}++[email protected]("stored", ["x", {}])+def test_an_unreadable_stored_list_shows_every_tool_off_until_a_change_rewrites_it(client, stored):+ studio_db.upsert_app_settings({MCP_DISABLED_TOOLS_SETTING_KEY: stored})+ got = client.get(URL, headers = _owner_session())+ assert got.status_code == 200, got.text+ assert _off(got) == [entry["name"] for entry in tool_catalog()]+ response = client.put(URL, json = {"tool_states": {"cancel": True}}, headers = _owner_session())+ assert response.status_code == 200, response.text+ everything_else = sorted(e["name"] for e in tool_catalog() if e["name"] != "cancel")+ assert _stored() == {MCP_DISABLED_TOOLS_SETTING_KEY: everything_else}+++def test_tools_can_be_chosen_while_forced_by_env(client, monkeypatch):+ monkeypatch.setenv(ENV_FORCE, "1")+ put = client.put(URL, json = {"disabled_tools": ["cancel"]}, headers = _owner_session())+ assert put.status_code == 200, put.text+ assert put.json()["enabled"] is True and put.json()["forced_by_env"] is True+ assert _off(put) == ["cancel"]+ assert _stored() == {MCP_DISABLED_TOOLS_SETTING_KEY: ["cancel"]}++ for body in ({"enabled": False}, {"enabled": True, "disabled_tools": []}):+ response = client.put(URL, json = body, headers = _owner_session())+ assert response.status_code == 409+ assert response.json()["detail"] == "Set by UNSLOTH_STUDIO_ENABLE_MCP."+ assert _stored() == {MCP_DISABLED_TOOLS_SETTING_KEY: ["cancel"]}+++def test_an_unreadable_snapshot_sends_no_tool_list(client, monkeypatch):+ from utils import mcp_access++ mcp_access._reset_cache()++ def broken():+ raise RuntimeError("database is locked")++ monkeypatch.setattr(mcp_access, "_read_from_db", broken)+ body = client.get(URL, headers = _owner_session()).json()+ # null, never 23 tools that only look turned off: a toggle built on that view would save it.+ assert body["tools"] is None+ assert body["enabled"] is Falsediff --git a/studio/backend/tests/test_mcp_access_setting.py b/studio/backend/tests/test_mcp_access_setting.pyindex 3e2fb406a9d..2e98016c213 100644--- a/studio/backend/tests/test_mcp_access_setting.py+++ b/studio/backend/tests/test_mcp_access_setting.py@@ -8,11 +8,16 @@ from utils import mcp_accessfrom utils.account_context import OWNER, AccountContext, run_asfrom utils.mcp_access import (ENV_FORCE,+ MCP_DISABLED_TOOLS_SETTING_KEY,MCP_ENABLED_SETTING_KEY,+ UnknownMcpToolError,+ disabled_tools,forced_by_env,get_mcp_enabled,is_mcp_enabled,set_mcp_enabled,+ set_mcp_settings,+ tool_enabled,)ALICE = AccountContext("a" * 32, "alice")@@ -72,9 +77,15 @@ def test_a_db_error_reads_false(monkeypatch):def broken(*args, **kwargs):raise RuntimeError("database is locked")- monkeypatch.setattr(studio_db, "get_app_setting", broken)+ real = studio_db.get_app_settings+ monkeypatch.setattr(studio_db, "get_app_settings", broken)assert get_mcp_enabled() is Falseassert is_mcp_enabled() is False+ assert disabled_tools() is None+ assert tool_enabled("studio_status") is False+ monkeypatch.setattr(studio_db, "get_app_settings", real)+ assert get_mcp_enabled() is True+ assert disabled_tools() == frozenset()def test_a_non_bool_stored_value_reads_false():@@ -102,3 +113,112 @@ def test_a_managed_account_reads_the_owners_value():mcp_access._reset_cache()assert run_as(ALICE, studio_db.get_app_setting, MCP_ENABLED_SETTING_KEY, None) is Noneassert run_as(ALICE, get_mcp_enabled) is True+++def _stored():+ return studio_db.get_app_settings([MCP_ENABLED_SETTING_KEY, MCP_DISABLED_TOOLS_SETTING_KEY])+++def test_the_tool_list_defaults_empty_and_is_stored_sorted_unique_and_read_live():+ assert disabled_tools() == frozenset() and tool_enabled("cancel") is True+ set_mcp_settings(disabled_tools = ["voices", "cancel", "cancel"])+ assert _stored() == {MCP_DISABLED_TOOLS_SETTING_KEY: ["cancel", "voices"]}+ assert disabled_tools() == {"cancel", "voices"}+ assert tool_enabled("cancel") is False and tool_enabled("chat") is True+ set_mcp_settings(disabled_tools = [])+ assert tool_enabled("cancel") is True+++def test_both_values_go_in_one_upsert(monkeypatch):+ calls = []+ real = studio_db.upsert_app_settings++ def spy(settings, **kwargs):+ calls.append(dict(settings))+ return real(settings, **kwargs)++ monkeypatch.setattr(studio_db, "upsert_app_settings", spy)+ set_mcp_settings(enabled = True, disabled_tools = ["chat"])+ assert calls == [{MCP_ENABLED_SETTING_KEY: True, MCP_DISABLED_TOOLS_SETTING_KEY: ["chat"]}]+ assert get_mcp_enabled() is True and disabled_tools() == {"chat"}+++ "call,error",+ [+ (lambda: set_mcp_settings(disabled_tools = ["nope"]), UnknownMcpToolError),+ (lambda: set_mcp_settings(disabled_tools = "cancel"), ValueError),+ (lambda: set_mcp_settings(disabled_tools = ["cancel", 1]), ValueError),+ (lambda: set_mcp_settings(), ValueError),+ (lambda: set_mcp_settings(enabled = "true", disabled_tools = ["cancel"]), ValueError),+ (lambda: run_as(ALICE, set_mcp_settings, disabled_tools = ["cancel"]), ValueError),+ ],+ ids = ["unknown", "string", "non-string", "nothing", "bad-enabled", "managed-account"],+)+def test_a_bad_tool_write_stores_nothing(call, error):+ with pytest.raises(error):+ call()+ assert _stored() == {}+ assert disabled_tools() == frozenset()++[email protected]("stored", ["x", {}, None, 3, {"cancel": True}])+def test_an_unreadable_tool_list_turns_every_tool_off(stored):+ studio_db.upsert_app_settings(+ {MCP_ENABLED_SETTING_KEY: True, MCP_DISABLED_TOOLS_SETTING_KEY: stored}+ )+ assert disabled_tools() is None+ assert tool_enabled("studio_status") is False+ assert get_mcp_enabled() is True+++def test_non_string_and_stale_names_are_ignored_on_read():+ studio_db.upsert_app_settings(+ {MCP_DISABLED_TOOLS_SETTING_KEY: [1, None, "gone_tool", "cancel"]}+ )+ assert disabled_tools() == {"gone_tool", "cancel"}+ assert tool_enabled("cancel") is False and tool_enabled("chat") is True+++def test_a_managed_account_reads_the_owners_tool_list():+ run_as(OWNER, set_mcp_settings, disabled_tools = ["cancel"])+ mcp_access._reset_cache()+ assert run_as(ALICE, studio_db.get_app_settings, [MCP_DISABLED_TOOLS_SETTING_KEY]) == {}+ assert run_as(ALICE, disabled_tools) == {"cancel"}+ assert run_as(ALICE, tool_enabled, "cancel") is False+++def test_a_read_that_overlaps_a_write_is_retried_not_reported_off(monkeypatch):+ set_mcp_settings(enabled = True, disabled_tools = ["cancel"])+ mcp_access._reset_cache()+ real = mcp_access._read_from_db+ calls = []++ def racing_read():+ calls.append(1)+ if len(calls) == 1:+ # Another thread's write lands while this read is in flight.+ with mcp_access._cache_lock:+ mcp_access._generation += 1+ return real()++ monkeypatch.setattr(mcp_access, "_read_from_db", racing_read)+ assert disabled_tools() == frozenset({"cancel"})+ assert get_mcp_enabled() is True+ assert len(calls) == 2+++def test_a_read_that_keeps_racing_writes_still_fails_closed(monkeypatch):+ set_mcp_settings(enabled = True)+ mcp_access._reset_cache()+ real = mcp_access._read_from_db++ def always_racing():+ with mcp_access._cache_lock:+ mcp_access._generation += 1+ return real()++ monkeypatch.setattr(mcp_access, "_read_from_db", always_racing)+ assert mcp_access.owner_record() is None+ assert disabled_tools() is None+ assert get_mcp_enabled() is Falsediff --git a/studio/backend/tests/test_mcp_gate.py b/studio/backend/tests/test_mcp_gate.pyindex d69dc81c9a4..8e46a2463ed 100644--- a/studio/backend/tests/test_mcp_gate.py+++ b/studio/backend/tests/test_mcp_gate.py@@ -538,3 +538,68 @@ def test_oauth_discovery_is_a_404_not_the_app_shell(tmp_path, path):root = client.get("/")assert root.status_code == 200assert "<title>studio</title>" in root.text+++def _rpc(http, body, headers):+ response = http.post("/mcp/", json = body, headers = {**MCP_HEADERS, **headers})+ assert response.status_code == 200, response.text+ data = [line[5:].strip() for line in response.text.splitlines() if line.startswith("data:")]+ return json.loads(data[-1])["result"]+++def _settings_and_mcp():+ """The settings router beside the real /mcp, gate and middleware included."""+ from routes import settings++ mcp_app = create_studio_mcp().http_app(path = "/", stateless_http = True)+ app = FastAPI(lifespan = mcp_app.lifespan)+ app.include_router(settings.router, prefix = "/api/settings")+ app.mount("/mcp", StudioMcpGate(mcp_app))+ for name, value in {+ "server_port": 8888,+ "cloudflare_url": None,+ "bind_host": "127.0.0.1",+ "secure": False,+ "remote_access_is_colab": False,+ "lan_access_is_colab": False,+ "lan_access_secure_launch": False,+ }.items():+ setattr(app.state, name, value)+ return app+++def test_a_turned_off_tool_leaves_the_listing_live_and_its_call_is_refused(live_key):+ from mcp_server import tool_names++ key = bearer(live_key)+ owner = bearer(create_access_token(subject = storage.DEFAULT_ADMIN_USERNAME))+ # Valid arguments: the SDK checks arguments against a tool it listed before the middleware runs.+ cancel = {+ **LISTING,+ "id": 3,+ "method": "tools/call",+ "params": {"name": "cancel", "arguments": {"kind": "chat", "id": "x"}},+ }+ with TestClient(_settings_and_mcp(), **LOCAL) as http:++ def listed():+ return [tool["name"] for tool in _rpc(http, LISTING, key)["tools"]]++ def put(names):+ response = http.put(+ "/api/settings/mcp-access", json = {"disabled_tools": names}, headers = owner+ )+ assert response.status_code == 200, response.text++ assert listed() == list(tool_names())+ put(["cancel"])+ assert listed() == [name for name in tool_names() if name != "cancel"]+ refused = _rpc(http, cancel, key)+ assert refused["isError"] is True+ assert refused["content"][0]["text"] == (+ "[tool_disabled] cancel is turned off in Unsloth Studio. "+ "The owner can turn it on in Settings > Agents."+ )+ put([])+ assert listed() == list(tool_names())+ assert "tool_disabled" not in json.dumps(_rpc(http, cancel, key))diff --git a/studio/backend/tests/test_mcp_prompts.py b/studio/backend/tests/test_mcp_prompts.pyindex bda5db9b3c9..4f45cf91f82 100644--- a/studio/backend/tests/test_mcp_prompts.py+++ b/studio/backend/tests/test_mcp_prompts.py@@ -241,3 +241,47 @@ def test_prompts_over_http(stubbed, monkeypatch):assert "JSON string" not in json.dumps(listed)text = got["messages"][0]["content"]["text"]assert "unsloth/LTX-small (12.0 GB)" in text and "GPU 0 21.5 GB free" in text+++def list_models_off():+ from utils import mcp_access+ from utils.mcp_access import set_mcp_settings++ mcp_access._reset_cache()+ set_mcp_settings(disabled_tools = ["list_models"])+ yield+ mcp_access._reset_cache()+++def test_every_prompt_names_the_tools_it_reads():+ assert set(prompts.PROMPT_REQUIRES) == {prompt.__name__ for prompt, _title in prompts.PROMPTS}+ assert all(required <= _tool_names() for required in prompts.PROMPT_REQUIRES.values())+++ "name, args", [("make_short_film", {"idea": "x"}), ("build_dataset_and_train", {"goal": "x"})]+)+def test_a_prompt_is_hidden_while_a_tool_it_reads_is_off(stubbed, list_models_off, name, args):+ from fastmcp.exceptions import PromptError++ assert asyncio.run(create_studio_mcp().list_prompts()) == []+ with pytest.raises(PromptError, match = r"^\[tool_disabled\] The \w+ prompt needs list_models"):+ _render(name, args)+ assert stubbed == []+++def test_a_hidden_prompt_over_http(stubbed, list_models_off, monkeypatch):+ with TestClient(served(create_studio_mcp(), fake_studio(), monkeypatch = monkeypatch)) as http:+ assert _rpc(http, "prompts/list", {})["prompts"] == []+ body = {+ "jsonrpc": "2.0",+ "id": 1,+ "method": "prompts/get",+ "params": {"name": "make_short_film", "arguments": {"idea": "a fox"}},+ }+ headers = {**MCP_HEADERS, "Authorization": f"Bearer {TEST_TOKEN}"}+ response = http.post("/mcp/", json = body, headers = headers)+ data = [json.loads(line[5:]) for line in response.text.splitlines() if line.startswith("data:")]+ assert "result" not in data[-1]+ assert "[tool_disabled]" in data[-1]["error"]["message"]diff --git a/studio/backend/tests/test_mcp_server.py b/studio/backend/tests/test_mcp_server.pyindex 7441a6a39c1..c9f9c09c390 100644--- a/studio/backend/tests/test_mcp_server.py+++ b/studio/backend/tests/test_mcp_server.py@@ -5,7 +5,12 @@ import asyncioimport pytest-from mcp_server import INSTRUCTIONS, create_studio_mcp+from fastmcp.exceptions import ToolError++import storage.studio_db as studio_db+from mcp_server import INSTRUCTIONS, TOOL_MODULES, create_studio_mcp, tool_catalog, tool_names+from utils import mcp_access+from utils.mcp_access import MCP_DISABLED_TOOLS_SETTING_KEY, set_mcp_settingsREAD_ONLY = {"embed",@@ -142,3 +147,51 @@ def test_instructions_point_agents_at_the_workflow():assert len(INSTRUCTIONS) <= 1900for absent in ("wait_s", "alongside", "signed"):assert absent not in INSTRUCTIONS, absent+++def fresh_access():+ mcp_access._reset_cache()+ yield+ mcp_access._reset_cache()+++def test_the_catalog_is_the_registered_tools_in_order(fresh_access):+ registered = [+ tool.name for tool in asyncio.run(create_studio_mcp().list_tools(run_middleware = False))+ ]+ assert [entry["name"] for entry in tool_catalog()] == registered+ assert list(tool_names()) == registered+ assert len(registered) == 23+ areas = {module.__name__.rsplit(".", 1)[-1] for module in TOOL_MODULES}+ assert {entry["area"] for entry in tool_catalog()} == areas+ assert tool_catalog()[0] == {"name": "studio_status", "area": "status"}+ assert tool_catalog()[-1] == {"name": "cancel", "area": "cancel"}+++def test_by_default_the_middleware_lists_every_tool(fresh_access):+ mcp = create_studio_mcp()+ wrapped = asyncio.run(mcp.list_tools())+ bare = asyncio.run(mcp.list_tools(run_middleware = False))+ assert [tool.name for tool in wrapped] == [tool.name for tool in bare]+++def test_a_turned_off_tool_is_hidden_and_refused_in_process(fresh_access):+ set_mcp_settings(disabled_tools = ["cancel", "chat"])+ mcp = create_studio_mcp()+ listed = [tool.name for tool in asyncio.run(mcp.list_tools())]+ assert listed == [name for name in tool_names() if name not in {"cancel", "chat"}]+ with pytest.raises(+ ToolError, match = r"^\[tool_disabled\] chat is turned off in Unsloth Studio\."+ ):+ asyncio.run(mcp.call_tool("chat", {"prompt": "hi"}))++[email protected]("stored", ["x", {}, None, 3])+def test_an_unreadable_tool_list_turns_every_tool_off(fresh_access, stored):+ studio_db.upsert_app_settings({MCP_DISABLED_TOOLS_SETTING_KEY: stored})+ mcp_access._reset_cache()+ mcp = create_studio_mcp()+ assert asyncio.run(mcp.list_tools()) == []+ with pytest.raises(ToolError, match = r"^\[tool_disabled\] studio_status "):+ asyncio.run(mcp.call_tool("studio_status", {}))diff --git a/studio/backend/tests/test_mcp_upgrade_compat.py b/studio/backend/tests/test_mcp_upgrade_compat.pyindex 1f7c3174248..efbe433a54a 100644--- a/studio/backend/tests/test_mcp_upgrade_compat.py+++ b/studio/backend/tests/test_mcp_upgrade_compat.py@@ -96,6 +96,19 @@ def test_the_installed_fastmcp_meets_the_declared_floor():assert (major, minor) >= (4, 1), f"fastmcp {version} is below the declared >=4.1.5"+def test_the_middleware_hooks_tool_access_overrides_still_exist():+ """StudioToolAccess hides turned-off tools and prompts through these four hooks."""+ from fastmcp.exceptions import PromptError+ from fastmcp.server.middleware import Middleware++ from studio_mcp.tool_access import StudioToolAccess++ for hook in ("on_list_tools", "on_call_tool", "on_list_prompts", "on_get_prompt"):+ assert callable(getattr(Middleware, hook, None)), hook+ assert hook in vars(StudioToolAccess), hook+ assert issubclass(PromptError, Exception)++def test_tool_errors_are_still_distinguishable_from_transport_errors():"""The whole keep-or-drop-the-session decision rests on this import."""from fastmcp.exceptions import ToolErrordiff --git a/studio/backend/utils/mcp_access.py b/studio/backend/utils/mcp_access.pyindex 30df095f2cd..9c9fdd853e1 100644--- a/studio/backend/utils/mcp_access.py+++ b/studio/backend/utils/mcp_access.py@@ -1,26 +1,40 @@# SPDX-License-Identifier: AGPL-3.0-only# Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0-"""Installation-wide switch for agent access to Unsloth Studio over MCP (``/mcp``). Off by default; the owner turns it on from Settings, and ``UNSLOTH_STUDIO_ENABLE_MCP=1`` forces it on. The value is read as the owner, so a managed account's API key sees the owner's switch and not its own settings database, and an unreadable setting counts as off."""+"""Installation-wide switch for agent access to Unsloth Studio over MCP (``/mcp``), and the tools the owner turned off. Off by default; the owner turns it on from Settings, and ``UNSLOTH_STUDIO_ENABLE_MCP=1`` forces it on. Both values are read as the owner, so a managed account's API key sees the owner's choices and not its own settings database. An unreadable switch counts as off and an unreadable tool list as every tool off."""from __future__ import annotationsimport osimport threadingimport time-from typing import Any, Optional+from typing import Any, Iterable, Optional+from loggers import get_loggerfrom utils.account_context import OWNER, is_owner_context, run_as+logger = get_logger(__name__)+MCP_ENABLED_SETTING_KEY = "studio_mcp_enabled"+MCP_DISABLED_TOOLS_SETTING_KEY = "studio_mcp_disabled_tools"ENV_FORCE = "UNSLOTH_STUDIO_ENABLE_MCP"+# (enabled, disabled tool names); None for the names means the stored value is unreadable.+_Record = tuple[bool, Optional[frozenset[str]]]+# The gate asks on every /mcp request; each read opens its own sqlite connection._CACHE_TTL_S = 1.0-_cached: Optional[tuple[float, bool]] = None+_RACE_RETRIES = 3+_cached: Optional[tuple[float, _Record]] = None# Bumped by every write, so a read that started before it is never published._generation = 0_cache_lock = threading.Lock()+# Serialises read-modify-write of the tool list, so two windows toggling different tools both land.+_write_lock = threading.Lock()+++class UnknownMcpToolError(ValueError):+ passdef _reset_cache() -> None:@@ -34,48 +48,134 @@ def forced_by_env() -> bool:return os.environ.get(ENV_FORCE) == "1"-def _read_from_db() -> bool:- from storage.studio_db import get_app_setting- return run_as(OWNER, get_app_setting, MCP_ENABLED_SETTING_KEY, None) is True+def _parse_disabled(value: Any) -> Optional[frozenset[str]]:+ if not isinstance(value, list):+ logger.warning(+ f"Unreadable {MCP_DISABLED_TOOLS_SETTING_KEY} ({type(value).__name__}); every MCP tool counts as off."+ )+ return None+ return frozenset(name for name in value if isinstance(name, str))+++def _read_from_db() -> _Record:+ from storage.studio_db import get_app_settings+ values = run_as(+ OWNER, get_app_settings, [MCP_ENABLED_SETTING_KEY, MCP_DISABLED_TOOLS_SETTING_KEY]+ )+ return (+ values.get(MCP_ENABLED_SETTING_KEY) is True,+ _parse_disabled(values.get(MCP_DISABLED_TOOLS_SETTING_KEY, [])),+ )+++def owner_record() -> Optional[_Record]:+ """One cached snapshot of (stored switch, turned-off tools), or None when the read failed or kept racing writes."""+ global _cached+ # Retry a read that overlaps a write: one save must not briefly hide every tool from agents.+ for _ in range(_RACE_RETRIES):+ with _cache_lock:+ cached = _cached+ if cached is not None and time.monotonic() - cached[0] < _CACHE_TTL_S:+ return cached[1]+ generation = _generation+ try:+ record = _read_from_db()+ except Exception:+ return None+ with _cache_lock:+ if generation == _generation:+ _cached = (time.monotonic(), record)+ return record+ return Nonedef get_mcp_enabled() -> bool:"""The owner's stored switch, ignoring the environment. Fails closed."""- global _cached- with _cache_lock:- cached = _cached- if cached is not None and time.monotonic() - cached[0] < _CACHE_TTL_S:- return cached[1]- generation = _generation- try:- enabled = _read_from_db()- except Exception:- return False- with _cache_lock:- if generation == _generation:- _cached = (time.monotonic(), enabled)- else:- enabled = False- return enabled+ record = owner_record()+ return record is not None and record[0]def is_mcp_enabled() -> bool:return forced_by_env() or get_mcp_enabled()-def set_mcp_enabled(enabled: Any) -> bool:- global _cached, _generation+def disabled_tools() -> Optional[frozenset[str]]:+ """Names the owner turned off, or None when every tool counts as off."""+ record = owner_record()+ return None if record is None else record[1]+++def tool_enabled(name: str) -> bool:+ disabled = disabled_tools()+ return disabled is not None and name not in disabled+++def _check_names(names: Iterable[str]) -> None:+ from mcp_server import tool_names+ known = set(tool_names())+ for name in names:+ if name not in known:+ raise UnknownMcpToolError(f"Unknown Unsloth Studio MCP tool: {name}")+++def set_mcp_settings(+ *,+ enabled: Optional[bool] = None,+ disabled_tools: Optional[Iterable[str]] = None,+ tool_states: Optional[dict[str, bool]] = None,+) -> None:+ """Write the switch, the turned-off tools (whole list, or ``tool_states`` merged into the stored one), or both."""if not is_owner_context():raise ValueError("Only the installation owner can change agent access over MCP.")- if not isinstance(enabled, bool):- raise ValueError("Agent access over MCP must be true or false.")+ if disabled_tools is not None and tool_states is not None:+ raise ValueError("Send disabled_tools or tool_states, not both.")+ with _write_lock:+ if tool_states is not None:+ if not all(isinstance(k, str) and isinstance(v, bool) for k, v in tool_states.items()):+ raise ValueError("tool_states maps tool names to true or false.")+ _check_names(tool_states)+ from mcp_server import tool_names++ known = set(tool_names())+ stored = _read_from_db()[1]+ # Unreadable counts as all off, as the GET shows it; names this build no longer serves are dropped.+ stored = known if stored is None else stored & known+ disabled_tools = (stored - {n for n, on in tool_states.items() if on}) | {+ n for n, on in tool_states.items() if not on+ }+ _write(enabled, disabled_tools)+++def _write(enabled: Optional[bool], disabled_tools: Optional[Iterable[str]]) -> None:+ global _cached, _generation+ settings: dict[str, Any] = {}+ if enabled is not None:+ if not isinstance(enabled, bool):+ raise ValueError("Agent access over MCP must be true or false.")+ settings[MCP_ENABLED_SETTING_KEY] = enabled+ if disabled_tools is not None:+ if isinstance(disabled_tools, (str, bytes)):+ raise ValueError("Turned-off MCP tools must be a list of tool names.")+ names = list(disabled_tools)+ if not all(isinstance(name, str) for name in names):+ raise ValueError("Turned-off MCP tools must be a list of tool names.")+ _check_names(names)+ settings[MCP_DISABLED_TOOLS_SETTING_KEY] = sorted(set(names))+ if not settings:+ raise ValueError("Nothing to change.")from storage.studio_db import upsert_app_settingstry:- upsert_app_settings({MCP_ENABLED_SETTING_KEY: enabled}, read_back = False)+ upsert_app_settings(settings, read_back = False)finally:# Invalidate even on failure: the write may have committed.with _cache_lock:_generation += 1_cached = None+++def set_mcp_enabled(enabled: Any) -> bool:+ if enabled is None:+ raise ValueError("Agent access over MCP must be true or false.")+ set_mcp_settings(enabled = enabled)return enableddiff --git a/studio/frontend/src/features/settings/api/mcp-access.ts b/studio/frontend/src/features/settings/api/mcp-access.tsindex 0921bbbf811..17a06c0cd4d 100644--- a/studio/frontend/src/features/settings/api/mcp-access.ts+++ b/studio/frontend/src/features/settings/api/mcp-access.ts@@ -6,18 +6,28 @@ import { readFastApiError } from "@/lib/format-fastapi-error";const MCP_ACCESS_PATH = "/api/settings/mcp-access";+export type McpToolSetting = {+ name: string;+ /** the tool's module, used to group rows */+ area: string;+ enabled: boolean;+};+export type McpAccessSettings = {enabled: boolean;/** UNSLOTH_STUDIO_ENABLE_MCP=1 forces this on and disables the switch */forcedByEnv: boolean;/** backend-reported URL used as the snippet fallback */url: string;+ /** null when an older backend sends no tool list */+ tools: McpToolSetting[] | null;};type ApiMcpAccessSettings = {enabled: boolean;forced_by_env: boolean;url: string;+ tools?: McpToolSetting[];};export function mcpAccessFromApi(@@ -27,18 +37,33 @@ export function mcpAccessFromApi(enabled: settings.enabled,forcedByEnv: settings.forced_by_env,url: settings.url,+ tools: Array.isArray(settings.tools)+ ? settings.tools.map(({ name, area, enabled }) => ({+ name,+ area,+ enabled,+ }))+ : null,};}-async function request(+// One request at a time, page-wide: the server may finish two in-flight writes in either order,+// and a read sent during a write can answer with the value before it.+let queue: Promise<unknown> = Promise.resolve();++function request(fallback: string,init?: RequestInit,): Promise<McpAccessSettings> {- const res = await authFetch(MCP_ACCESS_PATH, init);- if (!res.ok) {- throw new Error(await readFastApiError(res, fallback));- }- return mcpAccessFromApi(await res.json());+ const run = queue.then(async () => {+ const res = await authFetch(MCP_ACCESS_PATH, init);+ if (!res.ok) {+ throw new Error(await readFastApiError(res, fallback));+ }+ return mcpAccessFromApi(await res.json());+ });+ queue = run.catch(() => undefined);+ return run;}export function loadMcpAccess(): Promise<McpAccessSettings> {@@ -52,3 +77,14 @@ export function updateMcpAccess(enabled: boolean): Promise<McpAccessSettings> {body: JSON.stringify({ enabled }),});}++/** Turns tools on or off by name; the server merges them into the stored list. */+export function updateMcpTools(+ states: Readonly<Record<string, boolean>>,+): Promise<McpAccessSettings> {+ return request("Failed to update agent access tools", {+ method: "PUT",+ headers: { "Content-Type": "application/json" },+ body: JSON.stringify({ tool_states: states }),+ });+}diff --git a/studio/frontend/src/features/settings/components/mcp-access-section.tsx b/studio/frontend/src/features/settings/components/mcp-access-section.tsxindex e971e030ea5..246ff88a896 100644--- a/studio/frontend/src/features/settings/components/mcp-access-section.tsx+++ b/studio/frontend/src/features/settings/components/mcp-access-section.tsx@@ -2,6 +2,7 @@// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0import { SegmentedPill } from "@/components/segmented-control";+import { Button } from "@/components/ui/button";import {Select,SelectContent,@@ -20,6 +21,7 @@ import {type ReactElement,useEffect,useId,+ useRef,useState,useSyncExternalStore,} from "react";@@ -27,7 +29,9 @@ import {type McpAccessSettings,loadMcpAccess,updateMcpAccess,+ updateMcpTools,} from "../api/mcp-access";+import { useSettingsDialogStore } from "../stores/settings-dialog-store";import {type ExampleOs,useSettingsPanelPrefsStore,@@ -40,6 +44,7 @@ import {buildMcpSnippet,hasMcpSnippet,} from "./mcp-agent-snippet";+import { McpToolsDialog } from "./mcp-tools-dialog";import { SettingsRow } from "./settings-row";import { readUseTunnelPref, subscribeUseTunnelPref } from "./tunnel-preference";@@ -65,6 +70,16 @@ export function McpAccessSection({const [settings, setSettings] = useState<McpAccessSettings | null>(null);const [busy, setBusy] = useState(false);const [error, setError] = useState<string | null>(null);+ const [toolsOpen, setToolsOpen] = useState(false);+ // Newest save (switch or tools); each reply is a full snapshot, so an older one must not land last.+ const saveRequest = useRef(0);+ const [toolsError, setToolsError] = useState<string | null>(null);+ const sectionRef = useRef<HTMLDivElement | null>(null);+ const scrollTarget = useSettingsDialogStore((s) => s.scrollTarget);+ const consumeScrollTarget = useSettingsDialogStore(+ (s) => s.consumeScrollTarget,+ );+ const loaded = settings !== null || error !== null;const deviceType = usePlatformStore((s) => s.deviceType);const cloudflareUrl = usePlatformStore((s) => s.cloudflareUrl);const serverUrl = usePlatformStore((s) => s.serverUrl);@@ -97,14 +112,21 @@ export function McpAccessSection({}, []);const apply = async (enabled: boolean) => {+ const request = ++saveRequest.current;setBusy(true);setError(null);try {- setSettings(await updateMcpAccess(enabled));+ const next = await updateMcpAccess(enabled);+ if (request === saveRequest.current) {+ setSettings(next);+ }} catch (err) {// resync because a rejected update may leave the server value unknown.try {- setSettings(await loadMcpAccess());+ const next = await loadMcpAccess();+ if (request === saveRequest.current) {+ setSettings(next);+ }} catch (refreshError) {console.warn("Couldn't refresh agent access settings after a rejected change.",@@ -117,6 +139,53 @@ export function McpAccessSection({}};+ // Settings > API links here; wait for the first load, since the card renders nothing before it.+ useEffect(() => {+ if (scrollTarget !== "agents-mcp" || !loaded) return;+ const frame = window.requestAnimationFrame(() => {+ sectionRef.current?.scrollIntoView({ block: "start", behavior: "smooth" });+ consumeScrollTarget("agents-mcp");+ });+ return () => window.cancelAnimationFrame(frame);+ }, [consumeScrollTarget, scrollTarget, loaded]);++ const saveTools = async (states: Record<string, boolean>) => {+ const request = ++saveRequest.current;+ setToolsError(null);+ setSettings((current) =>+ current?.tools+ ? {+ ...current,+ tools: current.tools.map((tool) =>+ Object.hasOwn(states, tool.name)+ ? { ...tool, enabled: states[tool.name] }+ : tool,+ ),+ }+ : current,+ );+ try {+ const next = await updateMcpTools(states);+ if (request === saveRequest.current) {+ setSettings(next);+ }+ } catch (err) {+ // resync because a rejected update may leave the server value unknown.+ try {+ const next = await loadMcpAccess();+ if (request === saveRequest.current) {+ setSettings(next);+ }+ } catch (refreshError) {+ console.warn(+ "Couldn't refresh the MCP tools after a rejected change.",+ refreshError,+ );+ }+ setToolsError(errorMessage(err) ?? t("settings.mcp.tools.saveError"));+ }+ };+// subscribe to same-tab tunnel changes from the API examples.const useTunnel = useSyncExternalStore(subscribeUseTunnelPref,@@ -144,6 +213,7 @@ export function McpAccessSection({return (<div+ ref={sectionRef}data-settings-label={t("settings.apiKeys.mcp.title")}className="flex min-w-0 flex-col">@@ -177,6 +247,28 @@ export function McpAccessSection({/></SettingsRow>+ {/* null on an older backend that sends no tool list. */}+ {settings.tools ? (+ <SettingsRow+ label={t("settings.mcp.tools.title")}+ description={t("settings.mcp.tools.count", {+ on: settings.tools.filter((tool) => tool.enabled).length,+ total: settings.tools.length,+ })}+ >+ <Button+ variant="outline"+ size="sm"+ onClick={() => {+ setToolsError(null);+ setToolsOpen(true);+ }}+ >+ {t("settings.mcp.tools.choose")}+ </Button>+ </SettingsRow>+ ) : null}+{snippet ? (<><SettingsRow label={t("settings.apiKeys.mcp.agent")}>@@ -262,6 +354,16 @@ export function McpAccessSection({) : null}</>) : null}++ {settings?.tools ? (+ <McpToolsDialog+ open={toolsOpen}+ onOpenChange={setToolsOpen}+ tools={settings.tools}+ error={toolsError}+ onSave={(states) => void saveTools(states)}+ />+ ) : null}</div>);}diff --git a/studio/frontend/src/features/settings/components/mcp-tool-labels.ts b/studio/frontend/src/features/settings/components/mcp-tool-labels.tsnew file mode 100644index 00000000000..7bb32393265--- /dev/null+++ b/studio/frontend/src/features/settings/components/mcp-tool-labels.ts@@ -0,0 +1,134 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0++import type { TranslationKey } from "@/i18n";++export const MCP_TOOL_LABEL_KEYS: Readonly<Record<string, TranslationKey>> = {+ studio_status: "settings.mcp.toolLabels.studioStatus",+ list_models: "settings.mcp.toolLabels.listModels",+ load_model: "settings.mcp.toolLabels.loadModel",+ unload_model: "settings.mcp.toolLabels.unloadModel",+ plan_load: "settings.mcp.toolLabels.planLoad",+ download_model: "settings.mcp.toolLabels.downloadModel",+ chat: "settings.mcp.toolLabels.chat",+ embed: "settings.mcp.toolLabels.embed",+ system_one: "settings.mcp.toolLabels.systemOne",+ generate_image: "settings.mcp.toolLabels.generateImage",+ generate_audio: "settings.mcp.toolLabels.generateAudio",+ transcribe: "settings.mcp.toolLabels.transcribe",+ analyze_audio: "settings.mcp.toolLabels.analyzeAudio",+ generate_video: "settings.mcp.toolLabels.generateVideo",+ run_recipe: "settings.mcp.toolLabels.runRecipe",+ get_job: "settings.mcp.toolLabels.getJob",+ datasets: "settings.mcp.toolLabels.datasets",+ start_training: "settings.mcp.toolLabels.startTraining",+ list_training_runs: "settings.mcp.toolLabels.listTrainingRuns",+ export_model: "settings.mcp.toolLabels.exportModel",+ list_media: "settings.mcp.toolLabels.listMedia",+ voices: "settings.mcp.toolLabels.voices",+ cancel: "settings.mcp.toolLabels.cancel",+};++export const MCP_TOOL_DESCRIPTION_KEYS: Readonly<Record<string, TranslationKey>> = {+ studio_status: "settings.mcp.toolDescriptions.studioStatus",+ list_models: "settings.mcp.toolDescriptions.listModels",+ load_model: "settings.mcp.toolDescriptions.loadModel",+ unload_model: "settings.mcp.toolDescriptions.unloadModel",+ plan_load: "settings.mcp.toolDescriptions.planLoad",+ download_model: "settings.mcp.toolDescriptions.downloadModel",+ chat: "settings.mcp.toolDescriptions.chat",+ embed: "settings.mcp.toolDescriptions.embed",+ system_one: "settings.mcp.toolDescriptions.systemOne",+ generate_image: "settings.mcp.toolDescriptions.generateImage",+ generate_audio: "settings.mcp.toolDescriptions.generateAudio",+ transcribe: "settings.mcp.toolDescriptions.transcribe",+ analyze_audio: "settings.mcp.toolDescriptions.analyzeAudio",+ generate_video: "settings.mcp.toolDescriptions.generateVideo",+ run_recipe: "settings.mcp.toolDescriptions.runRecipe",+ get_job: "settings.mcp.toolDescriptions.getJob",+ datasets: "settings.mcp.toolDescriptions.datasets",+ start_training: "settings.mcp.toolDescriptions.startTraining",+ list_training_runs: "settings.mcp.toolDescriptions.listTrainingRuns",+ export_model: "settings.mcp.toolDescriptions.exportModel",+ list_media: "settings.mcp.toolDescriptions.listMedia",+ voices: "settings.mcp.toolDescriptions.voices",+ cancel: "settings.mcp.toolDescriptions.cancel",+};++/** A tool this build doesn't know yet gets null, and shows its raw name. */+export function mcpToolLabelKey(name: string): TranslationKey | null {+ return Object.hasOwn(MCP_TOOL_LABEL_KEYS, name)+ ? MCP_TOOL_LABEL_KEYS[name]+ : null;+}++export function mcpToolDescriptionKey(name: string): TranslationKey | null {+ return Object.hasOwn(MCP_TOOL_DESCRIPTION_KEYS, name)+ ? MCP_TOOL_DESCRIPTION_KEYS[name]+ : null;+}++type McpToolGroupId =+ | "models"+ | "generate"+ | "training"+ | "library"+ | "jobs"+ | "other";++// Backend areas (each tool module's short name) folded into a few groups.+const MCP_TOOL_GROUPS: readonly {+ id: McpToolGroupId;+ labelKey: TranslationKey;+ areas: readonly string[];+}[] = [+ {+ id: "models",+ labelKey: "settings.mcp.tools.groups.models",+ areas: ["status", "models"],+ },+ {+ id: "generate",+ labelKey: "settings.mcp.tools.groups.generate",+ areas: ["text", "images", "audio", "video"],+ },+ {+ id: "training",+ labelKey: "settings.mcp.tools.groups.training",+ areas: ["training", "export"],+ },+ {+ id: "library",+ labelKey: "settings.mcp.tools.groups.library",+ areas: ["data", "library"],+ },+ {+ id: "jobs",+ labelKey: "settings.mcp.tools.groups.jobs",+ areas: ["jobs", "cancel"],+ },+];++export type McpToolGroup<T> = {+ id: McpToolGroupId;+ labelKey: TranslationKey;+ tools: T[];+};++/** Tools in group order, keeping server order inside a group. Areas this build doesn't know go last. */+export function groupMcpTools<T extends { area: string }>(+ tools: readonly T[],+): McpToolGroup<T>[] {+ const groups: McpToolGroup<T>[] = MCP_TOOL_GROUPS.map((group) => ({+ id: group.id,+ labelKey: group.labelKey,+ tools: tools.filter((tool) => group.areas.includes(tool.area)),+ }));+ const known = new Set(MCP_TOOL_GROUPS.flatMap((group) => group.areas));+ groups.push({+ id: "other",+ labelKey: "settings.mcp.tools.groups.other",+ tools: tools.filter((tool) => !known.has(tool.area)),+ });+ return groups.filter((group) => group.tools.length > 0);+}diff --git a/studio/frontend/src/features/settings/components/mcp-tools-dialog.tsx b/studio/frontend/src/features/settings/components/mcp-tools-dialog.tsxnew file mode 100644index 00000000000..a24200a453c--- /dev/null+++ b/studio/frontend/src/features/settings/components/mcp-tools-dialog.tsx@@ -0,0 +1,328 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0++import { Button } from "@/components/ui/button";+import {+ Dialog,+ DialogContent,+ DialogDescription,+ DialogFooter,+ DialogHeader,+ DialogTitle,+} from "@/components/ui/dialog";+import {+ Tooltip,+ TooltipContent,+ TooltipTrigger,+} from "@/components/ui/tooltip";+import { useT } from "@/i18n";+import { AiSpeechIcon, TestTubeOutlineIcon } from "@/lib/hugeicons-derived";+import { Tick02Icon } from "@/lib/tick-icon";+import { cn } from "@/lib/utils";+import {+ AiBrain01Icon,+ Album02Icon,+ Cancel01Icon,+ ChartLineData01Icon,+ CheckmarkSquare02Icon,+ ChefHatIcon,+ DashboardSpeed01Icon,+ Database01Icon,+ Download01Icon,+ FlimSlateIcon,+ HeadphonesIcon,+ Image03Icon,+ LayersIcon,+ McpServerIcon,+ Message01Icon,+ Mic01Icon,+ PackageIcon,+ PlayCircleIcon,+ SlidersHorizontalIcon,+ SpeechToTextIcon,+ StopIcon,+ TaskDone01Icon,+} from "@hugeicons/core-free-icons";+import { HugeiconsIcon, type IconSvgElement } from "@hugeicons/react";+import {+ type ReactElement,+ useEffect,+ useState,+} from "react";+import type { McpToolSetting } from "../api/mcp-access";+import {+ groupMcpTools,+ mcpToolDescriptionKey,+ mcpToolLabelKey,+} from "./mcp-tool-labels";++const TOOL_ICONS: Readonly<Record<string, IconSvgElement>> = {+ studio_status: DashboardSpeed01Icon,+ list_models: AiBrain01Icon,+ load_model: PlayCircleIcon,+ unload_model: StopIcon,+ plan_load: SlidersHorizontalIcon,+ download_model: Download01Icon,+ chat: Message01Icon,+ embed: LayersIcon,+ system_one: CheckmarkSquare02Icon,+ generate_image: Image03Icon,+ generate_audio: AiSpeechIcon,+ transcribe: SpeechToTextIcon,+ analyze_audio: HeadphonesIcon,+ generate_video: FlimSlateIcon,+ run_recipe: ChefHatIcon,+ get_job: TaskDone01Icon,+ datasets: Database01Icon,+ start_training: TestTubeOutlineIcon,+ list_training_runs: ChartLineData01Icon,+ export_model: PackageIcon,+ list_media: Album02Icon,+ voices: Mic01Icon,+ cancel: Cancel01Icon,+};++function toolIcon(name: string): IconSvgElement {+ return Object.hasOwn(TOOL_ICONS, name) ? TOOL_ICONS[name] : McpServerIcon;+}++/** One row for many tools: the whole row is the button, and its right side says what a click does. */+function GroupToggle({+ tools,+ label,+ prominent = false,+ onSet,+}: {+ tools: readonly McpToolSetting[];+ label: string;+ prominent?: boolean;+ onSet: (names: readonly string[], on: boolean) => void;+}): ReactElement {+ const t = useT();+ const on = tools.filter((tool) => tool.enabled).length;+ const allOn = on === tools.length;+ return (+ <button+ type="button"+ // Some or none on turns every tool on; only an all-on group turns off.+ onClick={() =>+ onSet(+ tools+ .filter((tool) => tool.enabled === allOn)+ .map((tool) => tool.name),+ !allOn,+ )+ }+ className={cn(+ "group/toggle flex shrink-0 cursor-pointer items-center gap-2 rounded-full pe-3 text-start outline-none transition-colors duration-150 focus-visible:ring-3 focus-visible:ring-ring/40 motion-reduce:transition-none",+ prominent+ ? "min-h-11 gap-2.5 bg-wash-4 ps-4 hover:bg-wash-6"+ : "min-h-8 ps-3 hover:bg-wash-4",+ )}+ >+ <span+ className={cn(+ "text-ui-14 text-foreground",+ prominent ? "font-medium" : "font-semibold",+ )}+ >+ {label}+ </span>+ <span className="text-ui-12 tabular-nums text-muted-foreground">+ {t("settings.mcp.tools.count", { on, total: tools.length })}+ </span>+ <span className="ms-auto text-ui-13 text-muted-foreground transition-colors duration-150 group-hover/toggle:text-foreground motion-reduce:transition-none">+ {t(+ allOn+ ? "settings.mcp.tools.selectNone"+ : "settings.mcp.tools.selectAll",+ )}+ </span>+ </button>+ );+}++function ToolChip({+ tool,+ onToggle,+}: {+ tool: McpToolSetting;+ onToggle: (on: boolean) => void;+}): ReactElement {+ const t = useT();+ const labelKey = mcpToolLabelKey(tool.name);+ const descriptionKey = mcpToolDescriptionKey(tool.name);+ const label = labelKey ? t(labelKey) : tool.name;+ const on = tool.enabled;+ const chip = (+ <button+ type="button"+ role="checkbox"+ aria-checked={on}+ data-mcp-tool={tool.name}+ onClick={() => onToggle(!on)}+ className={cn(+ "relative flex min-h-9 w-full min-w-0 cursor-pointer select-none items-center gap-2.5 rounded-full py-1.5 ps-3.5 pe-8 text-start outline-none transition-colors duration-150 focus-visible:ring-3 focus-visible:ring-ring/40 motion-reduce:transition-none",+ on+ ? "bg-wash-9 text-foreground dark:bg-wash-14"+ : "bg-wash-4 text-muted-foreground hover:bg-wash-6 hover:text-foreground",+ )}+ >+ <span className="flex size-4 shrink-0 items-center justify-center [&_svg]:size-4">+ <HugeiconsIcon icon={toolIcon(tool.name)} strokeWidth={1.75} />+ </span>+ <span+ className={cn(+ "min-w-0 flex-1 truncate text-ui-13",+ labelKey ? null : "font-mono",+ )}+ >+ {label}+ </span>+ {on ? (+ <HugeiconsIcon+ icon={Tick02Icon}+ strokeWidth={2}+ aria-hidden={true}+ className="pointer-events-none absolute end-2.5 size-4"+ />+ ) : null}+ </button>+ );+ // A tool this build doesn't know already shows its raw name and has nothing to add.+ if (!descriptionKey) {+ return chip;+ }+ return (+ <Tooltip>+ <TooltipTrigger asChild={true}>{chip}</TooltipTrigger>+ <TooltipContent className="flex max-w-64 flex-col gap-0.5 text-start">+ <span>{t(descriptionKey)}</span>+ <span className="font-mono text-ui-11 opacity-60">{tool.name}</span>+ </TooltipContent>+ </Tooltip>+ );+}++function useMoreBelow(): [(el: HTMLDivElement | null) => void, boolean] {+ // A callback ref: the dialog content mounts after this component's first effect.+ const [el, setEl] = useState<HTMLDivElement | null>(null);+ const [more, setMore] = useState(false);+ useEffect(() => {+ if (!el) {+ return;+ }+ const update = () =>+ setMore(el.scrollTop + el.clientHeight < el.scrollHeight - 1);+ update();+ el.addEventListener("scroll", update, { passive: true });+ const observer = new ResizeObserver(update);+ observer.observe(el);+ return () => {+ el.removeEventListener("scroll", update);+ observer.disconnect();+ };+ }, [el]);+ return [setEl, more];+}++/** Grouped tool chips for the tools served at /mcp/. Saves each change at once. */+export function McpToolsDialog({+ open,+ onOpenChange,+ tools,+ error,+ onSave,+}: {+ open: boolean;+ onOpenChange: (open: boolean) => void;+ tools: readonly McpToolSetting[];+ error: string | null;+ /** Receives the tools to change, by name; the server merges them into its list. */+ onSave: (states: Record<string, boolean>) => void;+}): ReactElement {+ const t = useT();+ const groups = groupMcpTools(tools);+ const [listRef, moreBelow] = useMoreBelow();++ // Send only the tools that change, so a toggle elsewhere at the same time still lands.+ const setEnabled = (names: readonly string[], on: boolean) => {+ if (names.length > 0) {+ onSave(Object.fromEntries(names.map((name) => [name, on])));+ }+ };++ return (+ <Dialog open={open} onOpenChange={onOpenChange}>+ {/* Header and footer stay put; only the tool list scrolls, and only on short windows. */}+ <DialogContent+ className="flex flex-col gap-5 overflow-hidden outline-none sm:max-w-2xl"+ // Focus the dialog itself: Enter on "All tools" would flip every tool, and a focused+ // chip would pop its tooltip. Tab still lands on the first control.+ onOpenAutoFocus={(event) => {+ event.preventDefault();+ (event.currentTarget as HTMLElement).focus();+ }}+ >+ <DialogHeader className="pe-8">+ <DialogTitle>{t("settings.mcp.tools.dialogTitle")}</DialogTitle>+ <DialogDescription>+ {t("settings.mcp.tools.description")}+ </DialogDescription>+ </DialogHeader>++ {error ? (+ <p className="text-xs leading-snug text-destructive">{error}</p>+ ) : null}++ <div+ ref={listRef}+ data-testid="mcp-tools"+ className="@container -mx-7 flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto scroll-rounded px-7"+ >+ <GroupToggle+ tools={tools}+ label={t("settings.mcp.tools.allTools")}+ prominent={true}+ onSet={setEnabled}+ />+ {groups.map((group) => (+ <section+ key={group.id}+ data-mcp-tool-group={group.id}+ aria-label={t(group.labelKey)}+ className="flex flex-col gap-1.5"+ >+ <GroupToggle+ tools={group.tools}+ label={t(group.labelKey)}+ onSet={setEnabled}+ />+ <div className="grid grid-cols-1 gap-1.5 @sm:grid-cols-2 @xl:grid-cols-3">+ {group.tools.map((tool) => (+ <ToolChip+ key={tool.name}+ tool={tool}+ onToggle={(next) => setEnabled([tool.name], next)}+ />+ ))}+ </div>+ </section>+ ))}+ </div>++ {/* A rule shows only while more of the list is below, so nothing hides behind the footer. */}+ <DialogFooter+ className={cn(+ "-mx-7 -mt-5 flex-row justify-end border-t px-7 pt-5",+ moreBelow ? "border-border" : "border-transparent",+ )}+ >+ <Button variant="dark" onClick={() => onOpenChange(false)}>+ {t("common.done")}+ </Button>+ </DialogFooter>+ </DialogContent>+ </Dialog>+ );+}diff --git a/studio/frontend/src/features/settings/components/unsloth-studio-mcp-row.tsx b/studio/frontend/src/features/settings/components/unsloth-studio-mcp-row.tsxnew file mode 100644index 00000000000..13edbf6fb22--- /dev/null+++ b/studio/frontend/src/features/settings/components/unsloth-studio-mcp-row.tsx@@ -0,0 +1,62 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0++import { useT } from "@/i18n";+import { ChevronRightStandardIcon } from "@/lib/chevron-icons";+import { McpServerIcon } from "@hugeicons/core-free-icons";+import { HugeiconsIcon } from "@hugeicons/react";+import { type ReactElement, useEffect, useState } from "react";+import { loadMcpAccess } from "../api/mcp-access";+import { useSettingsDialogStore } from "../stores/settings-dialog-store";+import { SettingsRow } from "./settings-row";++/** Agent access status with a link to its settings at the end of Settings > Agents. Owner-only callers. */+export function UnslothStudioMcpRow(): ReactElement {+ const t = useT();+ const [enabled, setEnabled] = useState<boolean | null>(null);++ useEffect(() => {+ let live = true;+ loadMcpAccess().then(+ (next) => live && setEnabled(next.enabled),+ (err) => console.warn("Couldn't load the Unsloth MCP status.", err),+ );+ return () => {+ live = false;+ };+ }, []);++ const status =+ enabled === null+ ? " "+ : enabled+ ? t("settings.mcp.status.on")+ : t("settings.mcp.status.off");++ return (+ <SettingsRow+ icon={+ <HugeiconsIcon+ icon={McpServerIcon}+ strokeWidth={1.75}+ className="size-[calc(18px*var(--ui-space-scale,1))]"+ />+ }+ label={t("settings.apiKeys.mcp.title")}+ description={status}+ >+ <button+ type="button"+ onClick={() =>+ useSettingsDialogStore+ .getState()+ .openDialog("agents", { scrollTarget: "agents-mcp" })+ }+ className="inline-flex items-center gap-1 rounded-full px-1.5 py-0.5 text-ui-11 font-medium text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"+ >+ {t("settings.mcp.apiKeysRow.open")}+ <HugeiconsIcon icon={ChevronRightStandardIcon} className="size-3" />+ </button>+ </SettingsRow>+ );+}diff --git a/studio/frontend/src/features/settings/settings-search.ts b/studio/frontend/src/features/settings/settings-search.tsindex 04ceb208bdd..5ff444e951b 100644--- a/studio/frontend/src/features/settings/settings-search.ts+++ b/studio/frontend/src/features/settings/settings-search.ts@@ -284,6 +284,8 @@ export const SETTINGS_SEARCH_INDEX: Record<SettingsTab, TranslationKey[]> = {"settings.agents.remote.title","settings.agents.passthrough.title","settings.agents.dryRun.title",+ "settings.mcp.title",+ "settings.apiKeys.mcp.title",],connections: [],voice: [diff --git a/studio/frontend/src/features/settings/stores/settings-dialog-store.ts b/studio/frontend/src/features/settings/stores/settings-dialog-store.tsindex 4ba69d45570..2455d3ce892 100644--- a/studio/frontend/src/features/settings/stores/settings-dialog-store.ts+++ b/studio/frontend/src/features/settings/stores/settings-dialog-store.ts@@ -29,6 +29,7 @@ export type SettingsTab = (typeof SETTINGS_TABS)[number];export type SettingsScrollTarget =| "about-updates"+ | "agents-mcp"| "api-keys-audio-api"| "api-keys-media-api"| "api-keys-training-api"@@ -182,6 +183,7 @@ function loadInitialTab(): SettingsTab {const SCROLL_TARGET_TAB: Record<SettingsScrollTarget, SettingsTab> = {"chat-composer": "chat","about-updates": "about",+ "agents-mcp": "agents","api-keys-audio-api": "api-keys","api-keys-media-api": "api-keys","api-keys-training-api": "api-keys",diff --git a/studio/frontend/src/features/settings/tabs/agents-tab.tsx b/studio/frontend/src/features/settings/tabs/agents-tab.tsxindex aac08fb2694..b9dfde9b577 100644--- a/studio/frontend/src/features/settings/tabs/agents-tab.tsx+++ b/studio/frontend/src/features/settings/tabs/agents-tab.tsx@@ -80,12 +80,14 @@ import {UNSLOTH_START_DOCS_URL,detailsFor,} from "../components/coding-agent-list";+import { McpAccessSection } from "../components/mcp-access-section";import { SettingsSection } from "../components/settings-section";import {isChatGenerativeHubModel,isClassifierOrRerankerHubModel,isSpeechOnlyHubModel,} from "../lib/agent-hub-model.ts";+import { useSettingsDialogStore } from "../stores/settings-dialog-store";import {type ExampleOs,useSettingsPanelPrefsStore,@@ -1513,6 +1515,22 @@ export function AgentsTab() {<CommandBlock command={shellCommands.dryRun} /></div></SettingsSection>++ <SettingsSection title={t("settings.mcp.title")}>+ <McpAccessSection apiKey={freshApiKey} />+ <p className="pt-1 text-xs leading-snug text-muted-foreground">+ {t("settings.mcp.keyHint")}{" "}+ <button+ type="button"+ className="rounded-sm font-medium text-foreground underline underline-offset-2 transition-colors hover:text-primary focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"+ onClick={() =>+ useSettingsDialogStore.getState().setActiveTab("api-keys")+ }+ >+ {t("settings.mcp.createKey")}+ </button>+ </p>+ </SettingsSection></div>);}diff --git a/studio/frontend/src/features/settings/tabs/api-keys-tab.tsx b/studio/frontend/src/features/settings/tabs/api-keys-tab.tsxindex 58ea8c8c0b5..a27c2aa363c 100644--- a/studio/frontend/src/features/settings/tabs/api-keys-tab.tsx+++ b/studio/frontend/src/features/settings/tabs/api-keys-tab.tsx@@ -30,12 +30,12 @@ import {import { CreateKeyForm } from "../components/create-key-form";import { KeyRevealCard } from "../components/key-reveal-card";import { KeylessApiAccessLink } from "../components/keyless-api-access-link";-import { McpAccessSection } from "../components/mcp-access-section";import { ModelAliasesSection } from "../components/model-aliases-section";import { ModelAutoSwitchSection } from "../components/model-auto-switch-section";import { ModelMemorySection } from "../components/model-memory-section";import { MonitorLink } from "../components/monitor-link";import { SettingsSection } from "../components/settings-section";+import { UnslothStudioMcpRow } from "../components/unsloth-studio-mcp-row";import { ApiExamplesPanel } from "../components/api-example-tabs";import { useApiTunnelPref } from "../components/usage-examples";import { useKeylessExampleAccess } from "../hooks/use-keyless-example-access";@@ -262,7 +262,7 @@ export function ApiKeysTab() {{/* Installation-wide, so owner-only routes. */}<SettingsSection title="Access & monitoring">- {isOwner ? <McpAccessSection apiKey={freshKey} /> : null}+ {isOwner ? <UnslothStudioMcpRow /> : null}{isOwner ? <KeylessApiAccessLink /> : null}<MonitorLink hideHeading={true} /></SettingsSection>diff --git a/studio/frontend/src/i18n/locales/ar.ts b/studio/frontend/src/i18n/locales/ar.tsindex b57c2b388a4..ec4fe513aa0 100644--- a/studio/frontend/src/i18n/locales/ar.ts+++ b/studio/frontend/src/i18n/locales/ar.ts@@ -3407,6 +3407,88 @@ export const ar = {description:"الوصول إلى Unsloth من أجهزتك الأخرى عبر شبكتك المحلية أو عنوان URL عام مؤقت.",},+ mcp: {+ title: "Unsloth MCP",+ keyHint: "يسجّل الوكلاء الدخول بمفتاح API لـ Unsloth.",+ createKey: "إنشاء مفتاح API",+ tools: {+ title: "الأدوات",+ count: "{on} من {total} مفعّلة",+ choose: "اختيار الأدوات",+ dialogTitle: "أدوات Unsloth MCP",+ allTools: "كل الأدوات",+ selectAll: "تحديد الكل",+ selectNone: "عدم تحديد أي شيء",+ description:+ "كل أداة تتركها مفعّلة تُضاف إلى ما يقرؤه الوكلاء قبل أن يبدؤوا، لذا أوقف ما لا تحتاجه. لا يرى الوكلاء أي أداة متوقفة أبدًا، وتُرفض استدعاءاتها. يرى الوكلاء المتصلون بالفعل التغيير عند إعادة الاتصال.",+ saveError: "تعذّر حفظ إعداد أداة Unsloth MCP.",+ groups: {+ models: "النماذج",+ generate: "التوليد",+ training: "التدريب والتصدير",+ library: "البيانات والمكتبة",+ jobs: "المهام",+ other: "أخرى",+ },+ },+ status: {+ on: "مفعّل",+ off: "متوقف",+ },+ apiKeysRow: {+ open: "فتح في الوكلاء",+ },+ toolLabels: {+ studioStatus: "الحالة",+ listModels: "عرض النماذج",+ loadModel: "تحميل نموذج",+ unloadModel: "إلغاء تحميل نموذج",+ planLoad: "تخطيط التحميل",+ downloadModel: "تنزيل نموذج",+ chat: "محادثة",+ embed: "تضمين النص",+ systemOne: "نموذج القرار",+ generateImage: "توليد الصور",+ generateAudio: "توليد الصوت",+ transcribe: "تحويل الكلام إلى نص",+ analyzeAudio: "تحليل الصوت",+ generateVideo: "توليد الفيديو",+ runRecipe: "تشغيل Data Recipe",+ getJob: "حالة المهمة",+ datasets: "مجموعات البيانات",+ startTraining: "بدء التدريب",+ listTrainingRuns: "عمليات التدريب",+ exportModel: "تصدير النموذج",+ listMedia: "الوسائط المحفوظة",+ voices: "الأصوات",+ cancel: "إلغاء العمل",+ },+ toolDescriptions: {+ studioStatus: "معرفة ما هو محمّل ويعمل ومتاح على هذا الحاسوب.",+ listModels: "عرض النماذج التي يمكن للوكلاء تحميلها.",+ loadModel: "تحميل نموذج ليتمكن الوكلاء من المحادثة أو التوليد به.",+ unloadModel: "إلغاء تحميل نموذج لتحرير الذاكرة.",+ planLoad: "معاينة حجم التنزيل والذاكرة المطلوبة دون تحميل.",+ downloadModel: "تنزيل نموذج من Hugging Face.",+ chat: "المحادثة مع النموذج المحمّل.",+ embed: "تحويل النص إلى متجهات، أو ترتيب النصوص حسب التشابه.",+ systemOne: "طرح أسئلة نعم أو لا أو اختيار أو تقييم على نموذج القرار.",+ generateImage: "توليد صور وحفظها في المعرض.",+ generateAudio: "توليد كلام أو صوت آخر.",+ transcribe: "تحويل الكلام إلى نص.",+ analyzeAudio: "فحص المتحدثين والتوقيت ومطابقة المقطع لنص مكتوب.",+ generateVideo: "توليد فيديو.",+ runRecipe: "تشغيل Data Recipe لبناء مجموعة بيانات.",+ getJob: "متابعة مهمة طويلة حتى تنتهي.",+ datasets: "عرض مجموعات البيانات ورفعها.",+ startTraining: "بدء عملية ضبط دقيق.",+ listTrainingRuns: "عرض عمليات التدريب ونتائجها.",+ exportModel: "تصدير نموذج مدرّب، مثلًا إلى GGUF.",+ listMedia: "تصفح الصور والمقاطع الصوتية والفيديو المحفوظة.",+ voices: "عرض الأصوات أو حفظها أو إعادة تسميتها أو حذفها.",+ cancel: "إيقاف عمل جارٍ، مثل تدريب أو تصدير.",+ },+ },apiKeys: {title: "API",description: "الوصول إلى Unsloth عبر واجهة API المتوافقة مع OpenAI.",@@ -3572,14 +3654,14 @@ export const ar = {},mcp: {title: "وصول الوكلاء (MCP)",- description: "اسمح لوكلاء البرمجة مثل Claude Code وCodex باستخدام Unsloth عبر MCP. يسجّل الوكلاء الدخول بمفتاح API لـ Unsloth من هذه الصفحة.",+ description: "اسمح لوكلاء البرمجة مثل Claude Code وCodex باستخدام Unsloth عبر MCP.",enable: "السماح باتصالات الوكلاء",enableDescription: "يخدم /mcp/ للطلبات التي تحمل مفتاح API لـ Unsloth.",lockedByEnv: "مضبوط بواسطة {name}.",loadError: "تعذّر تحميل إعدادات وصول الوكلاء.",saveError: "تعذّر حفظ إعداد وصول الوكلاء.",agent: "الوكيل",- exportKeyHint: "اضبط {name} على مفتاح API لـ Unsloth من هذه الصفحة قبل تشغيل الوكيل.",+ exportKeyHint: "اضبط {name} على مفتاح API لـ Unsloth قبل تشغيل الوكيل.",configFileHint: "أضف هذا إلى {path}.",keywords: "mcp model context protocol agents claude codex tools وكلاء وكيل أدوات بروتوكول سياق النموذج",},diff --git a/studio/frontend/src/i18n/locales/cs.ts b/studio/frontend/src/i18n/locales/cs.tsindex 420b0ac6b3b..1d67e4efcc6 100644--- a/studio/frontend/src/i18n/locales/cs.ts+++ b/studio/frontend/src/i18n/locales/cs.ts@@ -3886,7 +3886,7 @@ export const cs = {mcp: {title: "Přístup agentů (MCP)",description:- "Umožněte agentům pro programování, jako jsou Claude Code a Codex, používat Unsloth přes MCP. Agenti se přihlašují klíčem API Unsloth z této stránky.",+ "Umožněte agentům pro programování, jako jsou Claude Code a Codex, používat Unsloth přes MCP.",enable: "Povolit připojení agentů",enableDescription:"Obsluhuje /mcp/ pro požadavky, které obsahují klíč API Unsloth.",@@ -3895,12 +3895,94 @@ export const cs = {saveError: "Nastavení přístupu agentů se nepodařilo uložit.",agent: "Agent",exportKeyHint:- "Před spuštěním agenta nastavte {name} na klíč API Unsloth z této stránky.",+ "Před spuštěním agenta nastavte {name} na klíč API Unsloth.",configFileHint: "Přidejte toto do souboru {path}.",keywords:"mcp model context protocol agents agenti claude codex tools nástroje",},},+ mcp: {+ title: "Unsloth MCP",+ keyHint: "Agenti se přihlašují pomocí API klíče Unsloth.",+ createKey: "Vytvořit API klíč",+ tools: {+ title: "Nástroje",+ count: "Zapnuto {on} z {total}",+ choose: "Vybrat nástroje",+ dialogTitle: "Nástroje Unsloth MCP",+ allTools: "Všechny nástroje",+ selectAll: "Vybrat vše",+ selectNone: "Nevybrat nic",+ description:+ "Každý zapnutý nástroj přidává k tomu, co agenti čtou před začátkem, takže vypněte ty, které nepotřebujete. Agenti vypnutý nástroj nikdy nevidí a jeho volání jsou odmítnuta. Už připojení agenti uvidí změnu po opětovném připojení.",+ saveError: "Nastavení nástrojů Unsloth MCP se nepodařilo uložit.",+ groups: {+ models: "Modely",+ generate: "Generování",+ training: "Trénování a export",+ library: "Data a knihovna",+ jobs: "Úlohy",+ other: "Ostatní",+ },+ },+ status: {+ on: "Zapnuto",+ off: "Vypnuto",+ },+ apiKeysRow: {+ open: "Otevřít v Agentech",+ },+ toolLabels: {+ studioStatus: "Stav",+ listModels: "Seznam modelů",+ loadModel: "Načíst model",+ unloadModel: "Uvolnit model",+ planLoad: "Naplánovat načtení",+ downloadModel: "Stáhnout model",+ chat: "Chat",+ embed: "Vložit text",+ systemOne: "Rozhodovací model",+ generateImage: "Generovat obrázky",+ generateAudio: "Generovat zvuk",+ transcribe: "Přepsat",+ analyzeAudio: "Analyzovat zvuk",+ generateVideo: "Generovat video",+ runRecipe: "Spustit Data Recipe",+ getJob: "Stav úlohy",+ datasets: "Datasety",+ startTraining: "Spustit trénování",+ listTrainingRuns: "Běhy trénování",+ exportModel: "Exportovat model",+ listMedia: "Uložená média",+ voices: "Hlasy",+ cancel: "Zrušit práci",+ },+ toolDescriptions: {+ studioStatus: "Zjistit, co je na tomto počítači načtené, běží a je volné.",+ listModels: "Vypsat modely, které mohou agenti načíst.",+ loadModel: "Načíst model, aby s ním agenti mohli chatovat nebo generovat.",+ unloadModel: "Uvolnit model a získat paměť.",+ planLoad: "Zobrazit velikost stahování a paměť načtení bez načítání.",+ downloadModel: "Stáhnout model z Hugging Face.",+ chat: "Chatovat s načteným modelem.",+ embed: "Převést text na vektory nebo seřadit texty podle podobnosti.",+ systemOne: "Položit rozhodovacímu modelu otázky ano/ne, výběrové nebo hodnoticí.",+ generateImage: "Generovat obrázky a ukládat je do galerie.",+ generateAudio: "Generovat řeč nebo jiný zvuk.",+ transcribe: "Převést řeč na text.",+ analyzeAudio: "Zkontrolovat mluvčí, časování a shodu klipu se scénářem.",+ generateVideo: "Vygenerovat video.",+ runRecipe: "Spustit Data Recipe a vytvořit datovou sadu.",+ getJob: "Sledovat dlouhou úlohu až do konce.",+ datasets: "Vypsat a nahrát datové sady.",+ startTraining: "Spustit fine-tuning.",+ listTrainingRuns: "Vypsat tréninky a jejich výsledky.",+ exportModel: "Exportovat natrénovaný model, například do GGUF.",+ listMedia: "Procházet uložené obrázky, zvuky a videa.",+ voices: "Vypsat, uložit, přejmenovat nebo smazat hlasy.",+ cancel: "Zastavit běžící práci, třeba trénink nebo export.",+ },+ },about: {title: "O aplikaci",description:diff --git a/studio/frontend/src/i18n/locales/de.ts b/studio/frontend/src/i18n/locales/de.tsindex d6e66f5841a..c6ec65d8ae5 100644--- a/studio/frontend/src/i18n/locales/de.ts+++ b/studio/frontend/src/i18n/locales/de.ts@@ -3453,6 +3453,88 @@ export const de = {description:"Erreiche dieses Unsloth von deinen anderen Geräten über dein lokales Netzwerk oder eine temporäre öffentliche URL.",},+ mcp: {+ title: "Unsloth MCP",+ keyHint: "Agenten melden sich mit einem Unsloth-Studio-API-Schlüssel an.",+ createKey: "API-Schlüssel erstellen",+ tools: {+ title: "Tools",+ count: "{on} von {total} an",+ choose: "Tools auswählen",+ dialogTitle: "Unsloth MCP-Tools",+ allTools: "Alle Tools",+ selectAll: "Alle auswählen",+ selectNone: "Keine auswählen",+ description:+ "Jedes eingeschaltete Tool vergrößert, was Agents vor dem Start lesen, also schalte aus, was du nicht brauchst. Agents sehen ausgeschaltete Tools nie, und Aufrufe werden abgelehnt. Bereits verbundene Agents sehen die Änderung nach dem erneuten Verbinden.",+ saveError: "Die Einstellung für das Unsloth MCP-Tool konnte nicht gespeichert werden.",+ groups: {+ models: "Modelle",+ generate: "Generieren",+ training: "Training und Export",+ library: "Daten und Bibliothek",+ jobs: "Jobs",+ other: "Sonstiges",+ },+ },+ status: {+ on: "An",+ off: "Aus",+ },+ apiKeysRow: {+ open: "In Agenten öffnen",+ },+ toolLabels: {+ studioStatus: "Status",+ listModels: "Modelle auflisten",+ loadModel: "Modell laden",+ unloadModel: "Modell entladen",+ planLoad: "Laden planen",+ downloadModel: "Modell herunterladen",+ chat: "Chat",+ embed: "Text einbetten",+ systemOne: "Entscheidungsmodell",+ generateImage: "Bilder erzeugen",+ generateAudio: "Audio erzeugen",+ transcribe: "Transkribieren",+ analyzeAudio: "Audio analysieren",+ generateVideo: "Video erzeugen",+ runRecipe: "Data Recipe ausführen",+ getJob: "Auftragsstatus",+ datasets: "Datensätze",+ startTraining: "Training starten",+ listTrainingRuns: "Trainingsläufe",+ exportModel: "Modell exportieren",+ listMedia: "Gespeicherte Medien",+ voices: "Stimmen",+ cancel: "Arbeit abbrechen",+ },+ toolDescriptions: {+ studioStatus: "Prüfen, was auf diesem Computer geladen ist, läuft und frei ist.",+ listModels: "Die Modelle auflisten, die Agents laden können.",+ loadModel: "Ein Modell laden, damit Agents damit chatten oder generieren.",+ unloadModel: "Ein Modell entladen, um Speicher freizugeben.",+ planLoad: "Downloadgröße und Speicherbedarf eines Ladevorgangs ansehen, ohne zu laden.",+ downloadModel: "Ein Modell von Hugging Face herunterladen.",+ chat: "Mit dem geladenen Modell chatten.",+ embed: "Text in Vektoren umwandeln oder Texte nach Ähnlichkeit ordnen.",+ systemOne: "Dem Entscheidungsmodell Ja/Nein-, Auswahl- oder Bewertungsfragen stellen.",+ generateImage: "Bilder generieren und in der Galerie speichern.",+ generateAudio: "Sprache oder anderes Audio generieren.",+ transcribe: "Sprache in Text umwandeln.",+ analyzeAudio: "Sprecher, Timing und Übereinstimmung eines Clips mit einem Skript prüfen.",+ generateVideo: "Ein Video generieren.",+ runRecipe: "Ein Data Recipe ausführen, um einen Datensatz zu erstellen.",+ getJob: "Einen langen Job bis zum Ende verfolgen.",+ datasets: "Datensätze auflisten und hochladen.",+ startTraining: "Einen Fine-Tuning-Lauf starten.",+ listTrainingRuns: "Trainingsläufe und ihre Ergebnisse auflisten.",+ exportModel: "Ein trainiertes Modell exportieren, zum Beispiel als GGUF.",+ listMedia: "Gespeicherte Bilder, Audios und Videos durchsuchen.",+ voices: "Gespeicherte Stimmen auflisten, speichern, umbenennen oder löschen.",+ cancel: "Laufende Arbeit stoppen, etwa einen Trainingslauf oder einen Export.",+ },+ },apiKeys: {title: "API",description: "Zugriff auf Unsloth über die OpenAI-kompatible API.",@@ -3619,14 +3701,14 @@ export const de = {},mcp: {title: "Agentenzugriff (MCP)",- description: "Lass Coding-Agenten wie Claude Code und Codex Unsloth über MCP nutzen. Agenten melden sich mit einem Unsloth-Studio-API-Schlüssel von dieser Seite an.",+ description: "Lass Coding-Agenten wie Claude Code und Codex Unsloth über MCP nutzen.",enable: "Agentenverbindungen erlauben",enableDescription: "Stellt /mcp/ für Anfragen mit einem Unsloth-Studio-API-Schlüssel bereit.",lockedByEnv: "Festgelegt durch {name}.",loadError: "Die Einstellungen für den Agentenzugriff konnten nicht geladen werden.",saveError: "Die Einstellung für den Agentenzugriff konnte nicht gespeichert werden.",agent: "Agent",- exportKeyHint: "Setze {name} auf einen Unsloth-Studio-API-Schlüssel von dieser Seite, bevor du den Agenten startest.",+ exportKeyHint: "Setze {name} auf einen Unsloth-Studio-API-Schlüssel, bevor du den Agenten startest.",configFileHint: "Füge das zu {path} hinzu.",keywords: "mcp model context protocol agents claude codex tools Agenten Agent Werkzeuge Tools Modellkontextprotokoll",},diff --git a/studio/frontend/src/i18n/locales/en.ts b/studio/frontend/src/i18n/locales/en.tsindex 191802936f6..08e3712ad54 100644--- a/studio/frontend/src/i18n/locales/en.ts+++ b/studio/frontend/src/i18n/locales/en.ts@@ -3589,18 +3589,100 @@ export const en = {},mcp: {title: "Agent access (MCP)",- description: "Let coding agents such as Claude Code and Codex use Unsloth over MCP. Agents sign in with an Unsloth API key from this page.",+ description: "Let coding agents such as Claude Code and Codex use Unsloth over MCP.",enable: "Allow agent connections",enableDescription: "Serves /mcp/ to requests that carry an Unsloth API key.",lockedByEnv: "Set by {name}.",loadError: "Couldn't load agent access settings.",saveError: "Couldn't save the agent access setting.",agent: "Agent",- exportKeyHint: "Set {name} to an Unsloth API key from this page before you start the agent.",+ exportKeyHint: "Set {name} to an Unsloth API key before you start the agent.",configFileHint: "Add this to {path}.",keywords: "mcp model context protocol agents claude codex tools",},},+ mcp: {+ title: "Unsloth MCP",+ keyHint: "Agents sign in with an Unsloth API key.",+ createKey: "Create an API key",+ tools: {+ title: "Tools",+ count: "{on} of {total} on",+ choose: "Choose tools",+ dialogTitle: "Unsloth MCP tools",+ allTools: "All tools",+ selectAll: "Select all",+ selectNone: "Select none",+ description:+ "Every tool you leave on adds to what agents read before they start, so turn off the ones you don't need. Agents never see a tool that's off, and calls to it are refused. Agents already connected see the change when they reconnect.",+ saveError: "Couldn't save the Unsloth MCP tool setting.",+ groups: {+ models: "Models",+ generate: "Generate",+ training: "Training and export",+ library: "Data and library",+ jobs: "Jobs",+ other: "Other",+ },+ },+ status: {+ on: "On",+ off: "Off",+ },+ apiKeysRow: {+ open: "Open in Agents",+ },+ toolLabels: {+ studioStatus: "Status",+ listModels: "List models",+ loadModel: "Load model",+ unloadModel: "Unload model",+ planLoad: "Plan a load",+ downloadModel: "Download model",+ chat: "Chat",+ embed: "Embed text",+ systemOne: "Decision model",+ generateImage: "Generate images",+ generateAudio: "Generate audio",+ transcribe: "Transcribe",+ analyzeAudio: "Analyze audio",+ generateVideo: "Generate video",+ runRecipe: "Run Data Recipe",+ getJob: "Job status",+ datasets: "Datasets",+ startTraining: "Start training",+ listTrainingRuns: "Training runs",+ exportModel: "Export model",+ listMedia: "Saved media",+ voices: "Voices",+ cancel: "Cancel work",+ },+ toolDescriptions: {+ studioStatus: "Check what's loaded, running and free on this computer.",+ listModels: "List the models agents can load.",+ loadModel: "Load a model so agents can chat or generate with it.",+ unloadModel: "Unload a model to free memory.",+ planLoad: "Preview a load's download size and memory use without loading.",+ downloadModel: "Download a model from Hugging Face.",+ chat: "Chat with the loaded model.",+ embed: "Turn text into vectors, or rank texts by similarity.",+ systemOne: "Ask the decision model yes or no, choice or score questions.",+ generateImage: "Generate images and save them to the gallery.",+ generateAudio: "Generate speech or other audio.",+ transcribe: "Turn speech into text.",+ analyzeAudio: "Check a clip's speakers, timing and match to a script.",+ generateVideo: "Generate a video.",+ runRecipe: "Run a Data Recipe to build a dataset.",+ getJob: "Follow a long job until it finishes.",+ datasets: "List and upload datasets.",+ startTraining: "Start a fine-tuning run.",+ listTrainingRuns: "List training runs and their results.",+ exportModel: "Export a trained model, for example to GGUF.",+ listMedia: "Browse saved images, audio and videos.",+ voices: "List, save, rename or delete saved voices.",+ cancel: "Stop running work, such as a training run or an export.",+ },+ },about: {title: "About",description: "Docs, release notes, feedback, and build info.",diff --git a/studio/frontend/src/i18n/locales/es-419.ts b/studio/frontend/src/i18n/locales/es-419.tsindex d6dbebd63d5..4e64157dc33 100644--- a/studio/frontend/src/i18n/locales/es-419.ts+++ b/studio/frontend/src/i18n/locales/es-419.ts@@ -3929,7 +3929,7 @@ export const es419 = {mcp: {title: "Acceso de agentes (MCP)",description:- "Permite que agentes de programación como Claude Code y Codex usen Unsloth mediante MCP. Los agentes inician sesión con una clave de API de Unsloth de esta página.",+ "Permite que agentes de programación como Claude Code y Codex usen Unsloth mediante MCP.",enable: "Permitir conexiones de agentes",enableDescription:"Sirve /mcp/ a las solicitudes que incluyen una clave de API de Unsloth.",@@ -3938,12 +3938,94 @@ export const es419 = {saveError: "No se pudo guardar la opción de acceso de agentes.",agent: "Agente",exportKeyHint:- "Define {name} con una clave de API de Unsloth de esta página antes de iniciar el agente.",+ "Define {name} con una clave de API de Unsloth antes de iniciar el agente.",configFileHint: "Agrega esto a {path}.",keywords:"mcp protocolo de contexto de modelo agentes agente herramientas model context protocol agents claude codex tools",},},+ mcp: {+ title: "Unsloth MCP",+ keyHint: "Los agentes inician sesión con una clave de API de Unsloth.",+ createKey: "Crear una clave de API",+ tools: {+ title: "Herramientas",+ count: "{on} de {total} activadas",+ choose: "Elegir herramientas",+ dialogTitle: "Herramientas de Unsloth MCP",+ allTools: "Todas las herramientas",+ selectAll: "Seleccionar todo",+ selectNone: "No seleccionar nada",+ description:+ "Cada herramienta activada se suma a lo que los agentes leen antes de empezar, así que desactiva las que no necesites. Los agentes nunca ven una herramienta desactivada y sus llamadas se rechazan. Los agentes ya conectados ven el cambio al volver a conectarse.",+ saveError: "No se pudo guardar la configuración de herramientas de Unsloth MCP.",+ groups: {+ models: "Modelos",+ generate: "Generar",+ training: "Entrenamiento y exportación",+ library: "Datos y biblioteca",+ jobs: "Tareas",+ other: "Otras",+ },+ },+ status: {+ on: "Activado",+ off: "Desactivado",+ },+ apiKeysRow: {+ open: "Abrir en Agentes",+ },+ toolLabels: {+ studioStatus: "Estado",+ listModels: "Listar modelos",+ loadModel: "Cargar modelo",+ unloadModel: "Descargar de memoria",+ planLoad: "Planificar una carga",+ downloadModel: "Descargar modelo",+ chat: "Chat",+ embed: "Incrustar texto",+ systemOne: "Modelo de decisión",+ generateImage: "Generar imágenes",+ generateAudio: "Generar audio",+ transcribe: "Transcribir",+ analyzeAudio: "Analizar audio",+ generateVideo: "Generar video",+ runRecipe: "Ejecutar Data Recipe",+ getJob: "Estado de la tarea",+ datasets: "Conjuntos de datos",+ startTraining: "Iniciar entrenamiento",+ listTrainingRuns: "Entrenamientos",+ exportModel: "Exportar modelo",+ listMedia: "Contenido guardado",+ voices: "Voces",+ cancel: "Cancelar trabajo",+ },+ toolDescriptions: {+ studioStatus: "Ver qué está cargado, en marcha y libre en esta computadora.",+ listModels: "Listar los modelos que los agentes pueden cargar.",+ loadModel: "Cargar un modelo para que los agentes chateen o generen con él.",+ unloadModel: "Descargar un modelo de la memoria para liberarla.",+ planLoad: "Ver el tamaño de descarga y la memoria de una carga sin cargar.",+ downloadModel: "Descargar un modelo de Hugging Face.",+ chat: "Chatear con el modelo cargado.",+ embed: "Convertir texto en vectores u ordenar textos por similitud.",+ systemOne: "Hacer al modelo de decisión preguntas de sí o no, de opción o de puntuación.",+ generateImage: "Generar imágenes y guardarlas en la galería.",+ generateAudio: "Generar voz u otro audio.",+ transcribe: "Convertir voz en texto.",+ analyzeAudio: "Comprobar los hablantes, los tiempos y el ajuste de un clip a un guion.",+ generateVideo: "Generar un video.",+ runRecipe: "Ejecutar una Data Recipe para crear un dataset.",+ getJob: "Seguir una tarea larga hasta que termine.",+ datasets: "Listar y subir datasets.",+ startTraining: "Iniciar un fine-tuning.",+ listTrainingRuns: "Listar los entrenamientos y sus resultados.",+ exportModel: "Exportar un modelo entrenado, por ejemplo a GGUF.",+ listMedia: "Ver las imágenes, audios y videos guardados.",+ voices: "Listar, guardar, renombrar o eliminar voces.",+ cancel: "Detener un trabajo en curso, como un entrenamiento o una exportación.",+ },+ },about: {title: "Acerca de",description:diff --git a/studio/frontend/src/i18n/locales/es.ts b/studio/frontend/src/i18n/locales/es.tsindex d12977dd94b..911393f41e6 100644--- a/studio/frontend/src/i18n/locales/es.ts+++ b/studio/frontend/src/i18n/locales/es.ts@@ -3446,6 +3446,88 @@ export const es = {description:"Accede a este Unsloth desde tus otros dispositivos, por tu red local o mediante una URL pública temporal.",},+ mcp: {+ title: "Unsloth MCP",+ keyHint: "Los agentes inician sesión con una clave de API de Unsloth.",+ createKey: "Crear una clave de API",+ tools: {+ title: "Herramientas",+ count: "{on} de {total} activadas",+ choose: "Elegir herramientas",+ dialogTitle: "Herramientas MCP de Unsloth",+ allTools: "Todas las herramientas",+ selectAll: "Seleccionar todo",+ selectNone: "No seleccionar nada",+ description:+ "Cada herramienta activada se suma a lo que los agentes leen antes de empezar, así que desactiva las que no necesites. Los agentes nunca ven una herramienta desactivada y sus llamadas se rechazan. Los agentes ya conectados ven el cambio al volver a conectarse.",+ saveError: "No se pudo guardar la configuración de la herramienta de Unsloth MCP.",+ groups: {+ models: "Modelos",+ generate: "Generar",+ training: "Entrenamiento y exportación",+ library: "Datos y biblioteca",+ jobs: "Trabajos",+ other: "Otras",+ },+ },+ status: {+ on: "Activado",+ off: "Desactivado",+ },+ apiKeysRow: {+ open: "Abrir en Agentes",+ },+ toolLabels: {+ studioStatus: "Estado",+ listModels: "Listar modelos",+ loadModel: "Cargar modelo",+ unloadModel: "Quitar modelo de memoria",+ planLoad: "Planificar una carga",+ downloadModel: "Descargar modelo",+ chat: "Chat",+ embed: "Incrustar texto",+ systemOne: "Modelo de decisión",+ generateImage: "Generar imágenes",+ generateAudio: "Generar audio",+ transcribe: "Transcribir",+ analyzeAudio: "Analizar audio",+ generateVideo: "Generar vídeo",+ runRecipe: "Ejecutar Data Recipe",+ getJob: "Estado del trabajo",+ datasets: "Conjuntos de datos",+ startTraining: "Iniciar entrenamiento",+ listTrainingRuns: "Ejecuciones de entrenamiento",+ exportModel: "Exportar modelo",+ listMedia: "Medios guardados",+ voices: "Voces",+ cancel: "Cancelar trabajo",+ },+ toolDescriptions: {+ studioStatus: "Ver qué está cargado, en marcha y libre en este equipo.",+ listModels: "Listar los modelos que los agentes pueden cargar.",+ loadModel: "Cargar un modelo para que los agentes chateen o generen con él.",+ unloadModel: "Descargar un modelo de la memoria para liberarla.",+ planLoad: "Ver el tamaño de descarga y la memoria de una carga sin cargar.",+ downloadModel: "Descargar un modelo de Hugging Face.",+ chat: "Chatear con el modelo cargado.",+ embed: "Convertir texto en vectores u ordenar textos por similitud.",+ systemOne: "Hacer al modelo de decisión preguntas de sí o no, de opción o de puntuación.",+ generateImage: "Generar imágenes y guardarlas en la galería.",+ generateAudio: "Generar voz u otro audio.",+ transcribe: "Convertir voz en texto.",+ analyzeAudio: "Comprobar los hablantes, los tiempos y el ajuste de un clip a un guion.",+ generateVideo: "Generar un vídeo.",+ runRecipe: "Ejecutar una Data Recipe para crear un dataset.",+ getJob: "Seguir una tarea larga hasta que termine.",+ datasets: "Listar y subir datasets.",+ startTraining: "Iniciar un fine-tuning.",+ listTrainingRuns: "Listar los entrenamientos y sus resultados.",+ exportModel: "Exportar un modelo entrenado, por ejemplo a GGUF.",+ listMedia: "Ver las imágenes, audios y vídeos guardados.",+ voices: "Listar, guardar, renombrar o eliminar voces.",+ cancel: "Detener un trabajo en curso, como un entrenamiento o una exportación.",+ },+ },apiKeys: {title: "API",description: "Accede a Unsloth mediante la API compatible con OpenAI.",@@ -3612,14 +3694,14 @@ export const es = {},mcp: {title: "Acceso de agentes (MCP)",- description: "Permite que agentes de código como Claude Code y Codex usen Unsloth mediante MCP. Los agentes inician sesión con una clave de API de Unsloth de esta página.",+ description: "Permite que agentes de código como Claude Code y Codex usen Unsloth mediante MCP.",enable: "Permitir conexiones de agentes",enableDescription: "Sirve /mcp/ a las solicitudes que llevan una clave de API de Unsloth.",lockedByEnv: "Definido por {name}.",loadError: "No se pudo cargar la configuración de acceso de agentes.",saveError: "No se pudo guardar la configuración de acceso de agentes.",agent: "Agente",- exportKeyHint: "Define {name} con una clave de API de Unsloth de esta página antes de iniciar el agente.",+ exportKeyHint: "Define {name} con una clave de API de Unsloth antes de iniciar el agente.",configFileHint: "Añade esto a {path}.",keywords: "mcp model context protocol agents claude codex tools agentes agente herramientas protocolo de contexto de modelo",},diff --git a/studio/frontend/src/i18n/locales/fa.ts b/studio/frontend/src/i18n/locales/fa.tsindex 03f4bdd02b9..02ed0a322c7 100644--- a/studio/frontend/src/i18n/locales/fa.ts+++ b/studio/frontend/src/i18n/locales/fa.ts@@ -3855,7 +3855,7 @@ export const fa = {mcp: {title: "دسترسی عامل (MCP)",description:- "به عاملهای برنامهنویسی مانند Claude Code و Codex اجازه دهید از طریق MCP از Unsloth استفاده کنند. عاملها با یک کلید API مربوط به Unsloth از همین صفحه وارد میشوند.",+ "به عاملهای برنامهنویسی مانند Claude Code و Codex اجازه دهید از طریق MCP از Unsloth استفاده کنند.",enable: "اجازهٔ اتصال عاملها",enableDescription:"/mcp/ را به درخواستهایی که کلید API مربوط به Unsloth دارند ارائه میدهد.",@@ -3864,12 +3864,94 @@ export const fa = {saveError: "ذخیرهٔ تنظیم دسترسی عامل ممکن نشد.",agent: "عامل",exportKeyHint:- "پیش از شروع عامل، {name} را برابر با یک کلید API مربوط به Unsloth از همین صفحه قرار دهید.",+ "پیش از شروع عامل، {name} را برابر با یک کلید API مربوط به Unsloth قرار دهید.",configFileHint: "این را به {path} اضافه کنید.",keywords:"mcp model context protocol عاملها پروتکل زمینهٔ مدل claude codex ابزارها",},},+ mcp: {+ title: "Unsloth MCP",+ keyHint: "عاملها با یک کلید API از Unsloth وارد میشوند.",+ createKey: "ساخت کلید API",+ tools: {+ title: "ابزارها",+ count: "{on} از {total} روشن",+ choose: "انتخاب ابزارها",+ dialogTitle: "ابزارهای Unsloth MCP",+ allTools: "همه ابزارها",+ selectAll: "انتخاب همه",+ selectNone: "انتخاب هیچکدام",+ description:+ "هر ابزاری که روشن بماند به چیزی که عاملها پیش از شروع میخوانند اضافه میشود، پس آنهایی را که لازم ندارید خاموش کنید. عاملها هیچوقت ابزار خاموش را نمیبینند و فراخوانی آن رد میشود. عاملهایی که از قبل وصلاند پس از اتصال دوباره تغییر را میبینند.",+ saveError: "ذخیره تنظیم ابزارهای Unsloth MCP ممکن نشد.",+ groups: {+ models: "مدلها",+ generate: "تولید",+ training: "آموزش و خروجی",+ library: "داده و کتابخانه",+ jobs: "کارها",+ other: "سایر",+ },+ },+ status: {+ on: "روشن",+ off: "خاموش",+ },+ apiKeysRow: {+ open: "باز کردن در «عاملها»",+ },+ toolLabels: {+ studioStatus: "وضعیت",+ listModels: "فهرست مدلها",+ loadModel: "بارگذاری مدل",+ unloadModel: "تخلیه مدل",+ planLoad: "برنامهریزی بارگذاری",+ downloadModel: "دانلود مدل",+ chat: "گفتگو",+ embed: "جاسازی متن",+ systemOne: "مدل تصمیم",+ generateImage: "تولید تصویر",+ generateAudio: "تولید صدا",+ transcribe: "رونویسی",+ analyzeAudio: "تحلیل صدا",+ generateVideo: "تولید ویدیو",+ runRecipe: "اجرای Data Recipe",+ getJob: "وضعیت کار",+ datasets: "مجموعهدادهها",+ startTraining: "شروع آموزش",+ listTrainingRuns: "اجراهای آموزش",+ exportModel: "خروجی گرفتن از مدل",+ listMedia: "رسانههای ذخیرهشده",+ voices: "صداها",+ cancel: "لغو کار",+ },+ toolDescriptions: {+ studioStatus: "ببینید چه چیزی روی این رایانه بارگذاری شده، در حال اجراست و آزاد است.",+ listModels: "مدلهایی را که عاملها میتوانند بارگذاری کنند فهرست کنید.",+ loadModel: "یک مدل را بارگذاری کنید تا عاملها با آن گفتگو یا تولید کنند.",+ unloadModel: "یک مدل را برای آزاد کردن حافظه تخلیه کنید.",+ planLoad: "حجم دانلود و حافظه یک بارگذاری را بدون بارگذاری ببینید.",+ downloadModel: "یک مدل را از Hugging Face دانلود کنید.",+ chat: "با مدل بارگذاریشده گفتگو کنید.",+ embed: "متن را به بردار تبدیل کنید یا متنها را بر اساس شباهت مرتب کنید.",+ systemOne: "از مدل تصمیم سؤال بله یا خیر، انتخابی یا امتیازی بپرسید.",+ generateImage: "تصویر بسازید و در گالری ذخیره کنید.",+ generateAudio: "گفتار یا صدای دیگر بسازید.",+ transcribe: "گفتار را به متن تبدیل کنید.",+ analyzeAudio: "گویندگان، زمانبندی و تطابق یک کلیپ با متن را بررسی کنید.",+ generateVideo: "یک ویدیو بسازید.",+ runRecipe: "یک Data Recipe اجرا کنید تا مجموعه داده بسازید.",+ getJob: "یک کار طولانی را تا پایان دنبال کنید.",+ datasets: "مجموعه دادهها را فهرست و بارگذاری کنید.",+ startTraining: "یک fine-tuning را شروع کنید.",+ listTrainingRuns: "اجراهای آموزش و نتایج آنها را فهرست کنید.",+ exportModel: "یک مدل آموزشدیده را، مثلاً به GGUF، صادر کنید.",+ listMedia: "تصاویر، صداها و ویدیوهای ذخیرهشده را مرور کنید.",+ voices: "صداها را فهرست، ذخیره، تغییر نام یا حذف کنید.",+ cancel: "کار در حال اجرا، مثل آموزش یا صدور، را متوقف کنید.",+ },+ },about: {title: "درباره",description: "مستندات، یادداشتهای انتشار، بازخورد و اطلاعات ساخت.",diff --git a/studio/frontend/src/i18n/locales/fr.ts b/studio/frontend/src/i18n/locales/fr.tsindex 5bb32b5b7d0..b92fe1953e6 100644--- a/studio/frontend/src/i18n/locales/fr.ts+++ b/studio/frontend/src/i18n/locales/fr.ts@@ -3453,6 +3453,88 @@ export const fr = {description:"Accédez à cet Unsloth depuis vos autres appareils, via votre réseau local ou une URL publique temporaire.",},+ mcp: {+ title: "Unsloth MCP",+ keyHint: "Les agents se connectent avec une clé API Unsloth.",+ createKey: "Créer une clé API",+ tools: {+ title: "Outils",+ count: "{on} sur {total} activés",+ choose: "Choisir les outils",+ dialogTitle: "Outils MCP d'Unsloth",+ allTools: "Tous les outils",+ selectAll: "Tout sélectionner",+ selectNone: "Ne rien sélectionner",+ description:+ "Chaque outil activé s'ajoute à ce que les agents lisent avant de commencer, alors désactivez ceux dont vous n'avez pas besoin. Les agents ne voient jamais un outil désactivé, et ses appels sont refusés. Les agents déjà connectés voient le changement à leur reconnexion.",+ saveError: "Impossible d’enregistrer le paramètre de l’outil d’Unsloth MCP.",+ groups: {+ models: "Modèles",+ generate: "Génération",+ training: "Entraînement et export",+ library: "Données et bibliothèque",+ jobs: "Tâches",+ other: "Autres",+ },+ },+ status: {+ on: "Activé",+ off: "Désactivé",+ },+ apiKeysRow: {+ open: "Ouvrir dans Agents",+ },+ toolLabels: {+ studioStatus: "État",+ listModels: "Lister les modèles",+ loadModel: "Charger un modèle",+ unloadModel: "Décharger un modèle",+ planLoad: "Planifier un chargement",+ downloadModel: "Télécharger un modèle",+ chat: "Discussion",+ embed: "Intégrer du texte",+ systemOne: "Modèle de décision",+ generateImage: "Générer des images",+ generateAudio: "Générer de l’audio",+ transcribe: "Transcrire",+ analyzeAudio: "Analyser l’audio",+ generateVideo: "Générer une vidéo",+ runRecipe: "Exécuter une Data Recipe",+ getJob: "État de la tâche",+ datasets: "Jeux de données",+ startTraining: "Démarrer l’entraînement",+ listTrainingRuns: "Exécutions d’entraînement",+ exportModel: "Exporter le modèle",+ listMedia: "Médias enregistrés",+ voices: "Voix",+ cancel: "Annuler le travail",+ },+ toolDescriptions: {+ studioStatus: "Voir ce qui est chargé, en cours et libre sur cet ordinateur.",+ listModels: "Lister les modèles que les agents peuvent charger.",+ loadModel: "Charger un modèle pour que les agents discutent ou génèrent avec.",+ unloadModel: "Décharger un modèle pour libérer de la mémoire.",+ planLoad: "Prévoir la taille du téléchargement et la mémoire d'un chargement, sans charger.",+ downloadModel: "Télécharger un modèle depuis Hugging Face.",+ chat: "Discuter avec le modèle chargé.",+ embed: "Convertir du texte en vecteurs, ou classer des textes par similarité.",+ systemOne: "Poser au modèle de décision des questions oui ou non, à choix ou à score.",+ generateImage: "Générer des images et les enregistrer dans la galerie.",+ generateAudio: "Générer de la voix ou un autre audio.",+ transcribe: "Convertir la parole en texte.",+ analyzeAudio: "Vérifier les locuteurs, le minutage et l'accord d'un extrait avec un script.",+ generateVideo: "Générer une vidéo.",+ runRecipe: "Lancer une Data Recipe pour créer un jeu de données.",+ getJob: "Suivre une longue tâche jusqu'à la fin.",+ datasets: "Lister et importer des jeux de données.",+ startTraining: "Lancer un fine-tuning.",+ listTrainingRuns: "Lister les entraînements et leurs résultats.",+ exportModel: "Exporter un modèle entraîné, par exemple en GGUF.",+ listMedia: "Parcourir les images, audios et vidéos enregistrés.",+ voices: "Lister, enregistrer, renommer ou supprimer des voix.",+ cancel: "Arrêter un travail en cours, comme un entraînement ou un export.",+ },+ },apiKeys: {title: "API",description: "Accédez à Unsloth via l'API compatible OpenAI.",@@ -3619,14 +3701,14 @@ export const fr = {},mcp: {title: "Accès des agents (MCP)",- description: "Permettez aux agents de code comme Claude Code et Codex d’utiliser Unsloth via MCP. Les agents se connectent avec une clé API Unsloth de cette page.",+ description: "Permettez aux agents de code comme Claude Code et Codex d’utiliser Unsloth via MCP.",enable: "Autoriser les connexions des agents",enableDescription: "Sert /mcp/ aux requêtes qui portent une clé API Unsloth.",lockedByEnv: "Défini par {name}.",loadError: "Impossible de charger les paramètres d’accès des agents.",saveError: "Impossible d’enregistrer le paramètre d’accès des agents.",agent: "Agent",- exportKeyHint: "Définissez {name} sur une clé API Unsloth de cette page avant de lancer l’agent.",+ exportKeyHint: "Définissez {name} sur une clé API Unsloth avant de lancer l’agent.",configFileHint: "Ajoutez ceci à {path}.",keywords: "mcp model context protocol agents claude codex tools agents agent outils protocole de contexte de modèle",},diff --git a/studio/frontend/src/i18n/locales/he.ts b/studio/frontend/src/i18n/locales/he.tsindex 1ba86070b3f..ac0e3d82dfc 100644--- a/studio/frontend/src/i18n/locales/he.ts+++ b/studio/frontend/src/i18n/locales/he.ts@@ -3489,6 +3489,88 @@ export const he = {description:"גש ל-Unsloth זה מהמכשירים האחרים שלך, דרך הרשת המקומית או באמצעות כתובת URL ציבורית זמנית.",},+ mcp: {+ title: "Unsloth MCP",+ keyHint: "סוכנים מתחברים עם מפתח API של Unsloth.",+ createKey: "יצירת מפתח API",+ tools: {+ title: "כלים",+ count: "{on} מתוך {total} פעילים",+ choose: "בחירת כלים",+ dialogTitle: "כלי Unsloth MCP",+ allTools: "כל הכלים",+ selectAll: "בחר הכול",+ selectNone: "אל תבחר כלום",+ description:+ "כל כלי שנשאר פעיל מתווסף למה שסוכנים קוראים לפני שהם מתחילים, אז כבה את אלה שאינך צריך. סוכנים לעולם לא רואים כלי כבוי, וקריאות אליו נדחות. סוכנים שכבר מחוברים יראו את השינוי כשיתחברו מחדש.",+ saveError: "לא ניתן לשמור את הגדרת הכלי של Unsloth MCP.",+ groups: {+ models: "מודלים",+ generate: "יצירה",+ training: "אימון וייצוא",+ library: "נתונים וספרייה",+ jobs: "משימות",+ other: "אחר",+ },+ },+ status: {+ on: "פועל",+ off: "כבוי",+ },+ apiKeysRow: {+ open: "פתח בסוכנים",+ },+ toolLabels: {+ studioStatus: "סטטוס",+ listModels: "הצגת מודלים",+ loadModel: "טעינת מודל",+ unloadModel: "פריקת מודל",+ planLoad: "תכנון טעינה",+ downloadModel: "הורדת מודל",+ chat: "צ'אט",+ embed: "הטמעת טקסט",+ systemOne: "מודל החלטות",+ generateImage: "יצירת תמונות",+ generateAudio: "יצירת אודיו",+ transcribe: "תמלול",+ analyzeAudio: "ניתוח אודיו",+ generateVideo: "יצירת וידאו",+ runRecipe: "הרצת Data Recipe",+ getJob: "מצב משימה",+ datasets: "מערכי נתונים",+ startTraining: "התחלת אימון",+ listTrainingRuns: "ריצות אימון",+ exportModel: "ייצוא מודל",+ listMedia: "מדיה שמורה",+ voices: "קולות",+ cancel: "ביטול עבודה",+ },+ toolDescriptions: {+ studioStatus: "לבדוק מה טעון, רץ ופנוי במחשב הזה.",+ listModels: "להציג את המודלים שסוכנים יכולים לטעון.",+ loadModel: "לטעון מודל כדי שסוכנים יוכלו לשוחח או ליצור איתו.",+ unloadModel: "לפרוק מודל כדי לפנות זיכרון.",+ planLoad: "לראות את גודל ההורדה והזיכרון של טעינה בלי לטעון.",+ downloadModel: "להוריד מודל מ-Hugging Face.",+ chat: "לשוחח עם המודל הטעון.",+ embed: "להפוך טקסט לווקטורים, או לדרג טקסטים לפי דמיון.",+ systemOne: "לשאול את מודל ההחלטות שאלות כן או לא, בחירה או ציון.",+ generateImage: "ליצור תמונות ולשמור אותן בגלריה.",+ generateAudio: "ליצור דיבור או שמע אחר.",+ transcribe: "להפוך דיבור לטקסט.",+ analyzeAudio: "לבדוק דוברים, תזמון והתאמה של קטע לתסריט.",+ generateVideo: "ליצור סרטון.",+ runRecipe: "להריץ Data Recipe כדי לבנות מערך נתונים.",+ getJob: "לעקוב אחרי משימה ארוכה עד שתסתיים.",+ datasets: "להציג ולהעלות מערכי נתונים.",+ startTraining: "להתחיל אימון fine-tuning.",+ listTrainingRuns: "להציג הרצות אימון ואת התוצאות שלהן.",+ exportModel: "לייצא מודל מאומן, למשל ל-GGUF.",+ listMedia: "לעיין בתמונות, בשמע ובסרטונים שנשמרו.",+ voices: "להציג, לשמור, לשנות שם או למחוק קולות.",+ cancel: "לעצור עבודה שרצה, כמו אימון או ייצוא.",+ },+ },apiKeys: {title: "API",description: "גישה ל-Unsloth באמצעות ה-API התואם ל-OpenAI.",@@ -3660,14 +3742,14 @@ export const he = {},mcp: {title: "גישת סוכנים (MCP)",- description: "אפשר לסוכני קוד כמו Claude Code ו-Codex להשתמש ב-Unsloth דרך MCP. סוכנים מתחברים עם מפתח API של Unsloth מהדף הזה.",+ description: "אפשר לסוכני קוד כמו Claude Code ו-Codex להשתמש ב-Unsloth דרך MCP.",enable: "אפשר חיבורי סוכנים",enableDescription: "מגיש את /mcp/ לבקשות שנושאות מפתח API של Unsloth.",lockedByEnv: "נקבע על ידי {name}.",loadError: "לא ניתן לטעון את הגדרות גישת הסוכנים.",saveError: "לא ניתן לשמור את הגדרת גישת הסוכנים.",agent: "סוכן",- exportKeyHint: "הגדר את {name} למפתח API של Unsloth מהדף הזה לפני שתפעיל את הסוכן.",+ exportKeyHint: "הגדר את {name} למפתח API של Unsloth לפני שתפעיל את הסוכן.",configFileHint: "הוסף את זה ל-{path}.",keywords: "mcp model context protocol agents claude codex tools סוכנים סוכן כלים פרוטוקול הקשר מודל",},diff --git a/studio/frontend/src/i18n/locales/hi.ts b/studio/frontend/src/i18n/locales/hi.tsindex 52c6a2d8bc7..91faa2920bf 100644--- a/studio/frontend/src/i18n/locales/hi.ts+++ b/studio/frontend/src/i18n/locales/hi.ts@@ -3416,6 +3416,88 @@ export const hi = {description:"इस Unsloth तक अपने दूसरे डिवाइस से पहुँचें, अपने लोकल नेटवर्क या एक अस्थायी सार्वजनिक URL से।",},+ mcp: {+ title: "Unsloth MCP",+ keyHint: "एजेंट Unsloth API कुंजी से साइन इन करते हैं।",+ createKey: "API कुंजी बनाएँ",+ tools: {+ title: "टूल",+ count: "{total} में से {on} चालू",+ choose: "टूल चुनें",+ dialogTitle: "Unsloth MCP टूल",+ allTools: "सभी टूल",+ selectAll: "सभी चुनें",+ selectNone: "कोई नहीं चुनें",+ description:+ "चालू छोड़ा गया हर टूल उस सामग्री में जुड़ता है जिसे एजेंट शुरू करने से पहले पढ़ते हैं, इसलिए जिनकी ज़रूरत नहीं उन्हें बंद करें। एजेंट बंद टूल को कभी नहीं देखते, और उसकी कॉल अस्वीकार होती हैं। पहले से जुड़े एजेंट दोबारा जुड़ने पर बदलाव देखते हैं।",+ saveError: "Unsloth MCP टूल की सेटिंग सहेजी नहीं जा सकी।",+ groups: {+ models: "मॉडल",+ generate: "जनरेट करें",+ training: "ट्रेनिंग और एक्सपोर्ट",+ library: "डेटा और लाइब्रेरी",+ jobs: "जॉब",+ other: "अन्य",+ },+ },+ status: {+ on: "चालू",+ off: "बंद",+ },+ apiKeysRow: {+ open: "एजेंट में खोलें",+ },+ toolLabels: {+ studioStatus: "स्थिति",+ listModels: "मॉडल सूची",+ loadModel: "मॉडल लोड करें",+ unloadModel: "मॉडल अनलोड करें",+ planLoad: "लोड की योजना बनाएँ",+ downloadModel: "मॉडल डाउनलोड करें",+ chat: "चैट",+ embed: "टेक्स्ट एम्बेड करें",+ systemOne: "डिसीजन मॉडल",+ generateImage: "इमेज बनाएँ",+ generateAudio: "ऑडियो बनाएँ",+ transcribe: "ट्रांसक्राइब करें",+ analyzeAudio: "ऑडियो का विश्लेषण करें",+ generateVideo: "वीडियो बनाएँ",+ runRecipe: "Data Recipe चलाएँ",+ getJob: "जॉब की स्थिति",+ datasets: "डेटासेट",+ startTraining: "ट्रेनिंग शुरू करें",+ listTrainingRuns: "ट्रेनिंग रन",+ exportModel: "मॉडल एक्सपोर्ट करें",+ listMedia: "सहेजा गया मीडिया",+ voices: "आवाज़ें",+ cancel: "काम रद्द करें",+ },+ toolDescriptions: {+ studioStatus: "देखें कि इस कंप्यूटर पर क्या लोड है, क्या चल रहा है और क्या खाली है।",+ listModels: "वे मॉडल दिखाएँ जिन्हें एजेंट लोड कर सकते हैं।",+ loadModel: "मॉडल लोड करें ताकि एजेंट उससे चैट या जनरेट कर सकें।",+ unloadModel: "मेमोरी खाली करने के लिए मॉडल अनलोड करें।",+ planLoad: "लोड किए बिना डाउनलोड आकार और मेमोरी देखें।",+ downloadModel: "Hugging Face से मॉडल डाउनलोड करें।",+ chat: "लोड किए गए मॉडल से चैट करें।",+ embed: "टेक्स्ट को वेक्टर में बदलें या टेक्स्ट को समानता के क्रम में रखें।",+ systemOne: "निर्णय मॉडल से हाँ या ना, विकल्प या स्कोर वाले सवाल पूछें।",+ generateImage: "इमेज बनाएँ और गैलरी में सहेजें।",+ generateAudio: "आवाज़ या अन्य ऑडियो बनाएँ।",+ transcribe: "बोली को टेक्स्ट में बदलें।",+ analyzeAudio: "किसी क्लिप के वक्ता, समय और स्क्रिप्ट से मेल जाँचें।",+ generateVideo: "वीडियो बनाएँ।",+ runRecipe: "डेटासेट बनाने के लिए Data Recipe चलाएँ।",+ getJob: "लंबे काम को पूरा होने तक देखें।",+ datasets: "डेटासेट दिखाएँ और अपलोड करें।",+ startTraining: "fine-tuning शुरू करें।",+ listTrainingRuns: "ट्रेनिंग रन और उनके नतीजे दिखाएँ।",+ exportModel: "ट्रेन किया गया मॉडल एक्सपोर्ट करें, जैसे GGUF में।",+ listMedia: "सहेजी गई इमेज, ऑडियो और वीडियो देखें।",+ voices: "आवाज़ें दिखाएँ, सहेजें, नाम बदलें या हटाएँ।",+ cancel: "चल रहा काम रोकें, जैसे ट्रेनिंग या एक्सपोर्ट।",+ },+ },apiKeys: {title: "API",description: "OpenAI-संगत API के माध्यम से Unsloth तक पहुंचें।",@@ -3581,14 +3663,14 @@ export const hi = {},mcp: {title: "एजेंट एक्सेस (MCP)",- description: "Claude Code और Codex जैसे कोडिंग एजेंट को MCP के ज़रिए Unsloth इस्तेमाल करने दें। एजेंट इस पेज की Unsloth API कुंजी से साइन इन करते हैं।",+ description: "Claude Code और Codex जैसे कोडिंग एजेंट को MCP के ज़रिए Unsloth इस्तेमाल करने दें।",enable: "एजेंट कनेक्शन की अनुमति दें",enableDescription: "Unsloth API कुंजी वाले अनुरोधों के लिए /mcp/ उपलब्ध कराता है।",lockedByEnv: "{name} द्वारा सेट।",loadError: "एजेंट एक्सेस सेटिंग्स लोड नहीं हो सकीं।",saveError: "एजेंट एक्सेस सेटिंग सहेजी नहीं जा सकी।",agent: "एजेंट",- exportKeyHint: "एजेंट शुरू करने से पहले {name} को इस पेज की किसी Unsloth API कुंजी पर सेट करें।",+ exportKeyHint: "एजेंट शुरू करने से पहले {name} को Unsloth API कुंजी पर सेट करें।",configFileHint: "इसे {path} में जोड़ें।",keywords: "mcp model context protocol agents claude codex tools एजेंट टूल्स मॉडल कॉन्टेक्स्ट प्रोटोकॉल",},diff --git a/studio/frontend/src/i18n/locales/id.ts b/studio/frontend/src/i18n/locales/id.tsindex 556c59dc2e1..87d0ee28545 100644--- a/studio/frontend/src/i18n/locales/id.ts+++ b/studio/frontend/src/i18n/locales/id.ts@@ -3869,7 +3869,7 @@ export const id = {mcp: {title: "Akses agen (MCP)",description:- "Izinkan agen coding seperti Claude Code dan Codex menggunakan Unsloth melalui MCP. Agen masuk dengan kunci API Unsloth dari halaman ini.",+ "Izinkan agen coding seperti Claude Code dan Codex menggunakan Unsloth melalui MCP.",enable: "Izinkan koneksi agen",enableDescription:"Melayani /mcp/ untuk permintaan yang membawa kunci API Unsloth.",@@ -3878,12 +3878,94 @@ export const id = {saveError: "Tidak dapat menyimpan pengaturan akses agen.",agent: "Agen",exportKeyHint:- "Atur {name} ke kunci API Unsloth dari halaman ini sebelum Anda memulai agen.",+ "Atur {name} ke kunci API Unsloth sebelum Anda memulai agen.",configFileHint: "Tambahkan ini ke {path}.",keywords:"mcp model context protocol agents claude codex tools agen alat",},},+ mcp: {+ title: "Unsloth MCP",+ keyHint: "Agen masuk dengan kunci API Unsloth.",+ createKey: "Buat kunci API",+ tools: {+ title: "Alat",+ count: "{on} dari {total} aktif",+ choose: "Pilih alat",+ dialogTitle: "Alat Unsloth MCP",+ allTools: "Semua alat",+ selectAll: "Pilih semua",+ selectNone: "Jangan pilih apa pun",+ description:+ "Setiap alat yang aktif menambah apa yang dibaca agen sebelum mulai, jadi nonaktifkan yang tidak Anda perlukan. Agen tidak pernah melihat alat yang nonaktif, dan panggilan ke alat itu ditolak. Agen yang sudah terhubung melihat perubahannya saat terhubung ulang.",+ saveError: "Tidak dapat menyimpan pengaturan alat Unsloth MCP.",+ groups: {+ models: "Model",+ generate: "Hasilkan",+ training: "Pelatihan dan ekspor",+ library: "Data dan pustaka",+ jobs: "Tugas",+ other: "Lainnya",+ },+ },+ status: {+ on: "Aktif",+ off: "Nonaktif",+ },+ apiKeysRow: {+ open: "Buka di Agen",+ },+ toolLabels: {+ studioStatus: "Status",+ listModels: "Daftar model",+ loadModel: "Muat model",+ unloadModel: "Lepas model",+ planLoad: "Rencanakan pemuatan",+ downloadModel: "Unduh model",+ chat: "Chat",+ embed: "Sematkan teks",+ systemOne: "Model keputusan",+ generateImage: "Hasilkan gambar",+ generateAudio: "Hasilkan audio",+ transcribe: "Transkripsikan",+ analyzeAudio: "Analisis audio",+ generateVideo: "Hasilkan video",+ runRecipe: "Jalankan Data Recipe",+ getJob: "Status tugas",+ datasets: "Dataset",+ startTraining: "Mulai pelatihan",+ listTrainingRuns: "Riwayat pelatihan",+ exportModel: "Ekspor model",+ listMedia: "Media tersimpan",+ voices: "Suara",+ cancel: "Batalkan pekerjaan",+ },+ toolDescriptions: {+ studioStatus: "Lihat apa yang dimuat, berjalan, dan kosong di komputer ini.",+ listModels: "Tampilkan model yang bisa dimuat agen.",+ loadModel: "Muat model agar agen bisa chat atau membuat konten dengannya.",+ unloadModel: "Lepas model untuk mengosongkan memori.",+ planLoad: "Lihat ukuran unduhan dan memori sebelum memuat.",+ downloadModel: "Unduh model dari Hugging Face.",+ chat: "Chat dengan model yang dimuat.",+ embed: "Ubah teks menjadi vektor, atau urutkan teks berdasarkan kemiripan.",+ systemOne: "Ajukan pertanyaan ya/tidak, pilihan, atau skor ke model keputusan.",+ generateImage: "Buat gambar dan simpan ke galeri.",+ generateAudio: "Buat suara atau audio lain.",+ transcribe: "Ubah ucapan menjadi teks.",+ analyzeAudio: "Periksa pembicara, waktu, dan kecocokan klip dengan naskah.",+ generateVideo: "Buat video.",+ runRecipe: "Jalankan Data Recipe untuk membuat dataset.",+ getJob: "Ikuti pekerjaan panjang sampai selesai.",+ datasets: "Tampilkan dan unggah dataset.",+ startTraining: "Mulai fine-tuning.",+ listTrainingRuns: "Tampilkan proses pelatihan dan hasilnya.",+ exportModel: "Ekspor model terlatih, misalnya ke GGUF.",+ listMedia: "Jelajahi gambar, audio, dan video yang tersimpan.",+ voices: "Tampilkan, simpan, ganti nama, atau hapus suara.",+ cancel: "Hentikan pekerjaan yang berjalan, seperti pelatihan atau ekspor.",+ },+ },about: {title: "Tentang",description: "Dokumentasi, catatan rilis, masukan, dan info build.",diff --git a/studio/frontend/src/i18n/locales/it.ts b/studio/frontend/src/i18n/locales/it.tsindex ab77683c7fd..04734da4f91 100644--- a/studio/frontend/src/i18n/locales/it.ts+++ b/studio/frontend/src/i18n/locales/it.ts@@ -3346,6 +3346,88 @@ export const it = {description:"Raggiungi questo Unsloth dagli altri tuoi dispositivi, tramite la rete locale o un URL pubblico temporaneo.",},+ mcp: {+ title: "Unsloth MCP",+ keyHint: "Gli agenti accedono con una chiave API di Unsloth.",+ createKey: "Crea una chiave API",+ tools: {+ title: "Strumenti",+ count: "{on} di {total} attivi",+ choose: "Scegli gli strumenti",+ dialogTitle: "Strumenti MCP di Unsloth",+ allTools: "Tutti gli strumenti",+ selectAll: "Seleziona tutto",+ selectNone: "Non selezionare nulla",+ description:+ "Ogni strumento attivo si aggiunge a ciò che gli agenti leggono prima di iniziare, quindi disattiva quelli che non ti servono. Gli agenti non vedono mai uno strumento disattivato e le sue chiamate vengono rifiutate. Gli agenti già connessi vedono la modifica quando si riconnettono.",+ saveError: "Impossibile salvare l’impostazione dello strumento di Unsloth MCP.",+ groups: {+ models: "Modelli",+ generate: "Generazione",+ training: "Addestramento ed esportazione",+ library: "Dati e libreria",+ jobs: "Processi",+ other: "Altro",+ },+ },+ status: {+ on: "Attivo",+ off: "Disattivo",+ },+ apiKeysRow: {+ open: "Apri in Agenti",+ },+ toolLabels: {+ studioStatus: "Stato",+ listModels: "Elenca modelli",+ loadModel: "Carica modello",+ unloadModel: "Rimuovi modello dalla memoria",+ planLoad: "Pianifica un caricamento",+ downloadModel: "Scarica modello",+ chat: "Chat",+ embed: "Incorpora testo",+ systemOne: "Modello decisionale",+ generateImage: "Genera immagini",+ generateAudio: "Genera audio",+ transcribe: "Trascrivi",+ analyzeAudio: "Analizza audio",+ generateVideo: "Genera video",+ runRecipe: "Esegui Data Recipe",+ getJob: "Stato del job",+ datasets: "Dataset",+ startTraining: "Avvia addestramento",+ listTrainingRuns: "Esecuzioni di addestramento",+ exportModel: "Esporta modello",+ listMedia: "Media salvati",+ voices: "Voci",+ cancel: "Annulla lavoro",+ },+ toolDescriptions: {+ studioStatus: "Vedere cosa è caricato, in esecuzione e libero su questo computer.",+ listModels: "Elencare i modelli che gli agenti possono caricare.",+ loadModel: "Caricare un modello per chattare o generare con esso.",+ unloadModel: "Scaricare un modello dalla memoria per liberarla.",+ planLoad: "Vedere dimensione del download e memoria di un caricamento senza caricare.",+ downloadModel: "Scaricare un modello da Hugging Face.",+ chat: "Chattare con il modello caricato.",+ embed: "Trasformare testo in vettori o ordinare testi per somiglianza.",+ systemOne: "Porre al modello decisionale domande sì o no, a scelta o a punteggio.",+ generateImage: "Generare immagini e salvarle nella galleria.",+ generateAudio: "Generare voce o altro audio.",+ transcribe: "Trasformare il parlato in testo.",+ analyzeAudio: "Controllare voci, tempi e corrispondenza di una clip con un copione.",+ generateVideo: "Generare un video.",+ runRecipe: "Eseguire una Data Recipe per creare un dataset.",+ getJob: "Seguire un lavoro lungo fino alla fine.",+ datasets: "Elencare e caricare dataset.",+ startTraining: "Avviare un fine-tuning.",+ listTrainingRuns: "Elencare gli addestramenti e i loro risultati.",+ exportModel: "Esportare un modello addestrato, per esempio in GGUF.",+ listMedia: "Sfogliare immagini, audio e video salvati.",+ voices: "Elencare, salvare, rinominare o eliminare voci.",+ cancel: "Fermare un lavoro in corso, come un addestramento o un'esportazione.",+ },+ },apiKeys: {title: "API",description: "Accedi a Unsloth tramite le API compatibili con OpenAI.",@@ -3514,14 +3596,14 @@ export const it = {},mcp: {title: "Accesso degli agenti (MCP)",- description: "Consenti ad agenti di programmazione come Claude Code e Codex di usare Unsloth tramite MCP. Gli agenti accedono con una chiave API di Unsloth di questa pagina.",+ description: "Consenti ad agenti di programmazione come Claude Code e Codex di usare Unsloth tramite MCP.",enable: "Consenti connessioni degli agenti",enableDescription: "Rende disponibile /mcp/ alle richieste che portano una chiave API di Unsloth.",lockedByEnv: "Impostato da {name}.",loadError: "Impossibile caricare le impostazioni di accesso degli agenti.",saveError: "Impossibile salvare l’impostazione di accesso degli agenti.",agent: "Agente",- exportKeyHint: "Imposta {name} su una chiave API di Unsloth di questa pagina prima di avviare l’agente.",+ exportKeyHint: "Imposta {name} su una chiave API di Unsloth prima di avviare l’agente.",configFileHint: "Aggiungi questo a {path}.",keywords: "mcp model context protocol agents claude codex tools agenti agente strumenti protocollo di contesto del modello",},diff --git a/studio/frontend/src/i18n/locales/ja.ts b/studio/frontend/src/i18n/locales/ja.tsindex b62592e45dd..d578586daea 100644--- a/studio/frontend/src/i18n/locales/ja.ts+++ b/studio/frontend/src/i18n/locales/ja.ts@@ -3383,6 +3383,88 @@ export const ja = {description:"ローカルネットワークまたは一時的な公開URLを介して、他のデバイスからこのUnslothにアクセスできます。",},+ mcp: {+ title: "Unsloth MCP",+ keyHint: "エージェントは Unsloth の API キーでサインインします。",+ createKey: "API キーを作成",+ tools: {+ title: "ツール",+ count: "{total} 個中 {on} 個がオン",+ choose: "ツールを選択",+ dialogTitle: "Unsloth MCP ツール",+ allTools: "すべてのツール",+ selectAll: "すべて選択",+ selectNone: "選択なし",+ description:+ "オンにしたツールはすべて、エージェントが開始前に読む内容に加わります。使わないものはオフにしてください。オフのツールはエージェントに見えず、呼び出しも拒否されます。接続済みのエージェントには再接続時に反映されます。",+ saveError: "Unsloth MCP のツール設定を保存できませんでした。",+ groups: {+ models: "モデル",+ generate: "生成",+ training: "トレーニングとエクスポート",+ library: "データとライブラリ",+ jobs: "ジョブ",+ other: "その他",+ },+ },+ status: {+ on: "オン",+ off: "オフ",+ },+ apiKeysRow: {+ open: "エージェントで開く",+ },+ toolLabels: {+ studioStatus: "ステータス",+ listModels: "モデル一覧",+ loadModel: "モデルを読み込む",+ unloadModel: "モデルをアンロード",+ planLoad: "読み込みを計画",+ downloadModel: "モデルをダウンロード",+ chat: "チャット",+ embed: "テキストを埋め込み",+ systemOne: "意思決定モデル",+ generateImage: "画像を生成",+ generateAudio: "音声を生成",+ transcribe: "文字起こし",+ analyzeAudio: "音声を分析",+ generateVideo: "動画を生成",+ runRecipe: "Data Recipe を実行",+ getJob: "ジョブの状態",+ datasets: "データセット",+ startTraining: "トレーニングを開始",+ listTrainingRuns: "トレーニング実行",+ exportModel: "モデルをエクスポート",+ listMedia: "保存済みメディア",+ voices: "ボイス",+ cancel: "作業をキャンセル",+ },+ toolDescriptions: {+ studioStatus: "このコンピューターで読み込み済み・実行中・空きの状態を確認します。",+ listModels: "エージェントが読み込めるモデルを一覧表示します。",+ loadModel: "エージェントがチャットや生成に使えるようモデルを読み込みます。",+ unloadModel: "モデルをアンロードしてメモリを空けます。",+ planLoad: "読み込まずにダウンロードサイズとメモリ使用量を確認します。",+ downloadModel: "Hugging Face からモデルをダウンロードします。",+ chat: "読み込んだモデルとチャットします。",+ embed: "テキストをベクトルに変換するか、類似度で並べ替えます。",+ systemOne: "判断モデルに はい/いいえ・選択・スコア の質問をします。",+ generateImage: "画像を生成してギャラリーに保存します。",+ generateAudio: "音声やその他のオーディオを生成します。",+ transcribe: "音声を文字に起こします。",+ analyzeAudio: "クリップの話者・タイミング・台本との一致を確認します。",+ generateVideo: "動画を生成します。",+ runRecipe: "Data Recipe を実行してデータセットを作ります。",+ getJob: "長いジョブを完了まで追跡します。",+ datasets: "データセットを一覧表示・アップロードします。",+ startTraining: "ファインチューニングを開始します。",+ listTrainingRuns: "学習の実行とその結果を一覧表示します。",+ exportModel: "学習済みモデルをエクスポートします(GGUF など)。",+ listMedia: "保存した画像・音声・動画を閲覧します。",+ voices: "保存した声を一覧・保存・名前変更・削除します。",+ cancel: "学習やエクスポートなど実行中の作業を停止します。",+ },+ },apiKeys: {title: "API",description: "OpenAI互換 API を介して Unsloth にアクセスします。",@@ -3545,14 +3627,14 @@ export const ja = {},mcp: {title: "エージェントアクセス (MCP)",- description: "Claude Code や Codex などのコーディングエージェントが MCP 経由で Unsloth を使えるようにします。エージェントはこのページの Unsloth API キーでサインインします。",+ description: "Claude Code や Codex などのコーディングエージェントが MCP 経由で Unsloth を使えるようにします。",enable: "エージェントの接続を許可",enableDescription: "Unsloth の API キーを持つリクエストに /mcp/ を提供します。",lockedByEnv: "{name} で設定されています。",loadError: "エージェントアクセスの設定を読み込めませんでした。",saveError: "エージェントアクセスの設定を保存できませんでした。",agent: "エージェント",- exportKeyHint: "エージェントを起動する前に、{name} にこのページの Unsloth API キーを設定してください。",+ exportKeyHint: "エージェントを起動する前に、{name} に Unsloth の API キーを設定してください。",configFileHint: "これを {path} に追加してください。",keywords: "mcp model context protocol agents claude codex tools エージェント ツール モデルコンテキストプロトコル",},diff --git a/studio/frontend/src/i18n/locales/ko.ts b/studio/frontend/src/i18n/locales/ko.tsindex d75f23b6a0a..8e318e43207 100644--- a/studio/frontend/src/i18n/locales/ko.ts+++ b/studio/frontend/src/i18n/locales/ko.ts@@ -3397,6 +3397,88 @@ export const ko = {description:"로컬 네트워크나 임시 공개 URL을 통해 다른 기기에서 이 Unsloth에 접속합니다.",},+ mcp: {+ title: "Unsloth MCP",+ keyHint: "에이전트는 Unsloth API 키로 로그인합니다.",+ createKey: "API 키 만들기",+ tools: {+ title: "도구",+ count: "{total}개 중 {on}개 켜짐",+ choose: "도구 선택",+ dialogTitle: "Unsloth MCP 도구",+ allTools: "모든 도구",+ selectAll: "모두 선택",+ selectNone: "선택 안 함",+ description:+ "켜 둔 도구는 모두 에이전트가 시작 전에 읽는 내용에 더해지므로, 필요 없는 도구는 끄세요. 꺼진 도구는 에이전트에게 보이지 않으며 호출도 거부됩니다. 이미 연결된 에이전트는 다시 연결할 때 변경 사항을 봅니다.",+ saveError: "Unsloth MCP 도구 설정을 저장하지 못했습니다.",+ groups: {+ models: "모델",+ generate: "생성",+ training: "학습 및 내보내기",+ library: "데이터 및 라이브러리",+ jobs: "작업",+ other: "기타",+ },+ },+ status: {+ on: "켜짐",+ off: "꺼짐",+ },+ apiKeysRow: {+ open: "에이전트에서 열기",+ },+ toolLabels: {+ studioStatus: "상태",+ listModels: "모델 목록",+ loadModel: "모델 불러오기",+ unloadModel: "모델 언로드",+ planLoad: "로드 계획",+ downloadModel: "모델 다운로드",+ chat: "채팅",+ embed: "텍스트 임베딩",+ systemOne: "결정 모델",+ generateImage: "이미지 생성",+ generateAudio: "오디오 생성",+ transcribe: "받아쓰기",+ analyzeAudio: "오디오 분석",+ generateVideo: "비디오 생성",+ runRecipe: "Data Recipe 실행",+ getJob: "작업 상태",+ datasets: "데이터셋",+ startTraining: "학습 시작",+ listTrainingRuns: "학습 실행",+ exportModel: "모델 내보내기",+ listMedia: "저장된 미디어",+ voices: "음성",+ cancel: "작업 취소",+ },+ toolDescriptions: {+ studioStatus: "이 컴퓨터에서 로드됨, 실행 중, 여유 상태를 확인합니다.",+ listModels: "에이전트가 로드할 수 있는 모델을 나열합니다.",+ loadModel: "에이전트가 채팅하거나 생성할 수 있도록 모델을 로드합니다.",+ unloadModel: "메모리를 확보하려고 모델을 언로드합니다.",+ planLoad: "로드하지 않고 다운로드 크기와 메모리 사용량을 미리 봅니다.",+ downloadModel: "Hugging Face에서 모델을 다운로드합니다.",+ chat: "로드된 모델과 채팅합니다.",+ embed: "텍스트를 벡터로 바꾸거나 유사도로 정렬합니다.",+ systemOne: "결정 모델에 예/아니요, 선택, 점수 질문을 합니다.",+ generateImage: "이미지를 생성해 갤러리에 저장합니다.",+ generateAudio: "음성이나 기타 오디오를 생성합니다.",+ transcribe: "음성을 텍스트로 바꿉니다.",+ analyzeAudio: "클립의 화자, 타이밍, 대본 일치를 확인합니다.",+ generateVideo: "동영상을 생성합니다.",+ runRecipe: "Data Recipe를 실행해 데이터셋을 만듭니다.",+ getJob: "긴 작업을 끝날 때까지 따라갑니다.",+ datasets: "데이터셋을 나열하고 업로드합니다.",+ startTraining: "파인튜닝을 시작합니다.",+ listTrainingRuns: "학습 실행과 결과를 나열합니다.",+ exportModel: "학습된 모델을 GGUF 등으로 내보냅니다.",+ listMedia: "저장된 이미지, 오디오, 동영상을 둘러봅니다.",+ voices: "저장된 음성을 나열, 저장, 이름 변경, 삭제합니다.",+ cancel: "학습이나 내보내기 같은 실행 중인 작업을 중지합니다.",+ },+ },apiKeys: {title: "API",description: "OpenAI 호환 API를 통해 Unsloth에 접근합니다.",@@ -3562,14 +3644,14 @@ export const ko = {},mcp: {title: "에이전트 액세스 (MCP)",- description: "Claude Code, Codex 같은 코딩 에이전트가 MCP로 Unsloth를 사용하게 합니다. 에이전트는 이 페이지의 Unsloth API 키로 로그인합니다.",+ description: "Claude Code, Codex 같은 코딩 에이전트가 MCP로 Unsloth를 사용하게 합니다.",enable: "에이전트 연결 허용",enableDescription: "Unsloth API 키가 있는 요청에 /mcp/를 제공합니다.",lockedByEnv: "{name}(으)로 설정됨.",loadError: "에이전트 액세스 설정을 불러오지 못했습니다.",saveError: "에이전트 액세스 설정을 저장하지 못했습니다.",agent: "에이전트",- exportKeyHint: "에이전트를 시작하기 전에 {name}에 이 페이지의 Unsloth API 키를 설정하세요.",+ exportKeyHint: "에이전트를 시작하기 전에 {name}에 Unsloth API 키를 설정하세요.",configFileHint: "이 내용을 {path}에 추가하세요.",keywords: "mcp model context protocol agents claude codex tools 에이전트 도구 모델 컨텍스트 프로토콜",},diff --git a/studio/frontend/src/i18n/locales/nl.ts b/studio/frontend/src/i18n/locales/nl.tsindex 293ddb73667..ef4ca26fa86 100644--- a/studio/frontend/src/i18n/locales/nl.ts+++ b/studio/frontend/src/i18n/locales/nl.ts@@ -3914,7 +3914,7 @@ export const nl = {mcp: {title: "Agenttoegang (MCP)",description:- "Laat codeeragents zoals Claude Code en Codex Unsloth gebruiken via MCP. Agents loggen in met een Unsloth-API-sleutel van deze pagina.",+ "Laat codeeragents zoals Claude Code en Codex Unsloth gebruiken via MCP.",enable: "Agentverbindingen toestaan",enableDescription:"Biedt /mcp/ aan voor verzoeken met een Unsloth-API-sleutel.",@@ -3923,12 +3923,94 @@ export const nl = {saveError: "Kan de instelling voor agenttoegang niet opslaan.",agent: "Agent",exportKeyHint:- "Stel {name} in op een Unsloth-API-sleutel van deze pagina voordat je de agent start.",+ "Stel {name} in op een Unsloth-API-sleutel voordat je de agent start.",configFileHint: "Voeg dit toe aan {path}.",keywords:"mcp model context protocol agents claude codex tools toegang verbinding",},},+ mcp: {+ title: "Unsloth MCP",+ keyHint: "Agents melden zich aan met een Unsloth-API-sleutel.",+ createKey: "Een API-sleutel maken",+ tools: {+ title: "Tools",+ count: "{on} van {total} aan",+ choose: "Tools kiezen",+ dialogTitle: "Unsloth MCP-tools",+ allTools: "Alle tools",+ selectAll: "Alles selecteren",+ selectNone: "Niets selecteren",+ description:+ "Elke tool die aan staat telt mee in wat agents lezen voordat ze beginnen, dus zet uit wat je niet nodig hebt. Agents zien een uitgezette tool nooit, en aanroepen ervan worden geweigerd. Al verbonden agents zien de wijziging als ze opnieuw verbinden.",+ saveError: "Kon de instelling voor Unsloth MCP-tools niet opslaan.",+ groups: {+ models: "Modellen",+ generate: "Genereren",+ training: "Training en export",+ library: "Data en bibliotheek",+ jobs: "Taken",+ other: "Overig",+ },+ },+ status: {+ on: "Aan",+ off: "Uit",+ },+ apiKeysRow: {+ open: "Openen in Agents",+ },+ toolLabels: {+ studioStatus: "Status",+ listModels: "Modellen weergeven",+ loadModel: "Model laden",+ unloadModel: "Model ontladen",+ planLoad: "Laden plannen",+ downloadModel: "Model downloaden",+ chat: "Chat",+ embed: "Tekst insluiten",+ systemOne: "Beslissingsmodel",+ generateImage: "Afbeeldingen genereren",+ generateAudio: "Audio genereren",+ transcribe: "Transcriberen",+ analyzeAudio: "Audio analyseren",+ generateVideo: "Video genereren",+ runRecipe: "Data Recipe uitvoeren",+ getJob: "Taakstatus",+ datasets: "Datasets",+ startTraining: "Training starten",+ listTrainingRuns: "Trainingsruns",+ exportModel: "Model exporteren",+ listMedia: "Opgeslagen media",+ voices: "Stemmen",+ cancel: "Werk annuleren",+ },+ toolDescriptions: {+ studioStatus: "Zien wat er geladen is, draait en vrij is op deze computer.",+ listModels: "De modellen tonen die agents kunnen laden.",+ loadModel: "Een model laden zodat agents ermee chatten of genereren.",+ unloadModel: "Een model uit het geheugen halen om ruimte vrij te maken.",+ planLoad: "Downloadgrootte en geheugen van een laadactie bekijken zonder te laden.",+ downloadModel: "Een model downloaden van Hugging Face.",+ chat: "Chatten met het geladen model.",+ embed: "Tekst omzetten in vectoren, of teksten op gelijkenis rangschikken.",+ systemOne: "Het beslismodel ja/nee-, keuze- of scorevragen stellen.",+ generateImage: "Afbeeldingen genereren en in de galerij opslaan.",+ generateAudio: "Spraak of andere audio genereren.",+ transcribe: "Spraak omzetten in tekst.",+ analyzeAudio: "Sprekers, timing en aansluiting op een script van een clip controleren.",+ generateVideo: "Een video genereren.",+ runRecipe: "Een Data Recipe uitvoeren om een dataset te maken.",+ getJob: "Een lange taak volgen tot hij klaar is.",+ datasets: "Datasets tonen en uploaden.",+ startTraining: "Een fine-tuning starten.",+ listTrainingRuns: "Trainingen en hun resultaten tonen.",+ exportModel: "Een getraind model exporteren, bijvoorbeeld naar GGUF.",+ listMedia: "Opgeslagen afbeeldingen, audio en video's bekijken.",+ voices: "Stemmen tonen, opslaan, hernoemen of verwijderen.",+ cancel: "Lopend werk stoppen, zoals een training of een export.",+ },+ },about: {title: "Over",description:diff --git a/studio/frontend/src/i18n/locales/pl.ts b/studio/frontend/src/i18n/locales/pl.tsindex 95aa4397982..853962b92f3 100644--- a/studio/frontend/src/i18n/locales/pl.ts+++ b/studio/frontend/src/i18n/locales/pl.ts@@ -3915,7 +3915,7 @@ export const pl = {mcp: {title: "Dostęp agentów (MCP)",description:- "Pozwól agentom programistycznym, takim jak Claude Code i Codex, korzystać z Unsloth przez MCP. Agenci logują się kluczem API Unsloth z tej strony.",+ "Pozwól agentom programistycznym, takim jak Claude Code i Codex, korzystać z Unsloth przez MCP.",enable: "Zezwalaj na połączenia agentów",enableDescription:"Udostępnia /mcp/ dla żądań zawierających klucz API Unsloth.",@@ -3924,12 +3924,94 @@ export const pl = {saveError: "Nie udało się zapisać ustawienia dostępu agentów.",agent: "Agent",exportKeyHint:- "Przed uruchomieniem agenta ustaw {name} na klucz API Unsloth z tej strony.",+ "Przed uruchomieniem agenta ustaw {name} na klucz API Unsloth.",configFileHint: "Dodaj to do {path}.",keywords:"mcp model context protocol agents claude codex tools agenci narzędzia",},},+ mcp: {+ title: "Unsloth MCP",+ keyHint: "Agenci logują się kluczem API Unsloth.",+ createKey: "Utwórz klucz API",+ tools: {+ title: "Narzędzia",+ count: "Włączone: {on} z {total}",+ choose: "Wybierz narzędzia",+ dialogTitle: "Narzędzia Unsloth MCP",+ allTools: "Wszystkie narzędzia",+ selectAll: "Zaznacz wszystko",+ selectNone: "Nie zaznaczaj nic",+ description:+ "Każde włączone narzędzie dokłada się do tego, co agenci czytają przed startem, więc wyłącz te, których nie potrzebujesz. Agenci nigdy nie widzą wyłączonego narzędzia, a jego wywołania są odrzucane. Już połączeni agenci zobaczą zmianę po ponownym połączeniu.",+ saveError: "Nie udało się zapisać ustawienia narzędzi Unsloth MCP.",+ groups: {+ models: "Modele",+ generate: "Generowanie",+ training: "Trening i eksport",+ library: "Dane i biblioteka",+ jobs: "Zadania",+ other: "Inne",+ },+ },+ status: {+ on: "Włączone",+ off: "Wyłączone",+ },+ apiKeysRow: {+ open: "Otwórz w Agentach",+ },+ toolLabels: {+ studioStatus: "Stan",+ listModels: "Lista modeli",+ loadModel: "Załaduj model",+ unloadModel: "Zwolnij model",+ planLoad: "Zaplanuj ładowanie",+ downloadModel: "Pobierz model",+ chat: "Czat",+ embed: "Osadź tekst",+ systemOne: "Model decyzyjny",+ generateImage: "Generuj obrazy",+ generateAudio: "Generuj dźwięk",+ transcribe: "Transkrybuj",+ analyzeAudio: "Analizuj dźwięk",+ generateVideo: "Generuj wideo",+ runRecipe: "Uruchom Data Recipe",+ getJob: "Stan zadania",+ datasets: "Zbiory danych",+ startTraining: "Rozpocznij trening",+ listTrainingRuns: "Przebiegi treningu",+ exportModel: "Eksportuj model",+ listMedia: "Zapisane multimedia",+ voices: "Głosy",+ cancel: "Anuluj pracę",+ },+ toolDescriptions: {+ studioStatus: "Sprawdzić, co jest wczytane, działa i wolne na tym komputerze.",+ listModels: "Wyświetlić modele, które agenci mogą wczytać.",+ loadModel: "Wczytać model, aby agenci mogli z nim rozmawiać lub generować.",+ unloadModel: "Zwolnić model, aby odzyskać pamięć.",+ planLoad: "Zobaczyć rozmiar pobierania i pamięć wczytania bez wczytywania.",+ downloadModel: "Pobrać model z Hugging Face.",+ chat: "Rozmawiać z wczytanym modelem.",+ embed: "Zamienić tekst na wektory lub uszeregować teksty według podobieństwa.",+ systemOne: "Zadać modelowi decyzyjnemu pytania tak/nie, wyboru lub oceny.",+ generateImage: "Generować obrazy i zapisywać je w galerii.",+ generateAudio: "Generować mowę lub inny dźwięk.",+ transcribe: "Zamienić mowę na tekst.",+ analyzeAudio: "Sprawdzić mówców, czas i zgodność klipu ze scenariuszem.",+ generateVideo: "Wygenerować wideo.",+ runRecipe: "Uruchomić Data Recipe, aby zbudować zbiór danych.",+ getJob: "Śledzić długie zadanie do końca.",+ datasets: "Wyświetlać i przesyłać zbiory danych.",+ startTraining: "Rozpocząć fine-tuning.",+ listTrainingRuns: "Wyświetlić treningi i ich wyniki.",+ exportModel: "Wyeksportować wytrenowany model, na przykład do GGUF.",+ listMedia: "Przeglądać zapisane obrazy, dźwięki i wideo.",+ voices: "Wyświetlać, zapisywać, zmieniać nazwy lub usuwać głosy.",+ cancel: "Zatrzymać trwającą pracę, np. trening lub eksport.",+ },+ },about: {title: "Informacje",description:diff --git a/studio/frontend/src/i18n/locales/pt-br.ts b/studio/frontend/src/i18n/locales/pt-br.tsindex d0ad302b72d..ee7cc2221ee 100644--- a/studio/frontend/src/i18n/locales/pt-br.ts+++ b/studio/frontend/src/i18n/locales/pt-br.ts@@ -3420,6 +3420,88 @@ export const ptBR = {description:"Acesse este Unsloth dos seus outros dispositivos, pela rede local ou por uma URL pública temporária.",},+ mcp: {+ title: "Unsloth MCP",+ keyHint: "Os agentes entram com uma chave de API do Unsloth.",+ createKey: "Criar uma chave de API",+ tools: {+ title: "Ferramentas",+ count: "{on} de {total} ativadas",+ choose: "Escolher ferramentas",+ dialogTitle: "Ferramentas MCP do Unsloth",+ allTools: "Todas as ferramentas",+ selectAll: "Selecionar tudo",+ selectNone: "Não selecionar nenhuma",+ description:+ "Cada ferramenta ativada aumenta o que os agentes leem antes de começar, então desative as que você não usa. Os agentes nunca veem uma ferramenta desativada, e as chamadas a ela são recusadas. Agentes já conectados veem a mudança quando se reconectam.",+ saveError: "Não foi possível salvar a configuração da ferramenta do Unsloth MCP.",+ groups: {+ models: "Modelos",+ generate: "Gerar",+ training: "Treinamento e exportação",+ library: "Dados e biblioteca",+ jobs: "Tarefas",+ other: "Outras",+ },+ },+ status: {+ on: "Ativado",+ off: "Desativado",+ },+ apiKeysRow: {+ open: "Abrir em Agentes",+ },+ toolLabels: {+ studioStatus: "Status",+ listModels: "Listar modelos",+ loadModel: "Carregar modelo",+ unloadModel: "Descarregar modelo",+ planLoad: "Planejar um carregamento",+ downloadModel: "Baixar modelo",+ chat: "Chat",+ embed: "Incorporar texto",+ systemOne: "Modelo de decisão",+ generateImage: "Gerar imagens",+ generateAudio: "Gerar áudio",+ transcribe: "Transcrever",+ analyzeAudio: "Analisar áudio",+ generateVideo: "Gerar vídeo",+ runRecipe: "Executar Data Recipe",+ getJob: "Status do job",+ datasets: "Datasets",+ startTraining: "Iniciar treinamento",+ listTrainingRuns: "Execuções de treinamento",+ exportModel: "Exportar modelo",+ listMedia: "Mídia salva",+ voices: "Vozes",+ cancel: "Cancelar trabalho",+ },+ toolDescriptions: {+ studioStatus: "Ver o que está carregado, rodando e livre neste computador.",+ listModels: "Listar os modelos que os agentes podem carregar.",+ loadModel: "Carregar um modelo para os agentes conversarem ou gerarem com ele.",+ unloadModel: "Descarregar um modelo para liberar memória.",+ planLoad: "Ver o tamanho do download e a memória de um carregamento sem carregar.",+ downloadModel: "Baixar um modelo do Hugging Face.",+ chat: "Conversar com o modelo carregado.",+ embed: "Transformar texto em vetores ou ordenar textos por semelhança.",+ systemOne: "Fazer ao modelo de decisão perguntas de sim ou não, de escolha ou de nota.",+ generateImage: "Gerar imagens e salvá-las na galeria.",+ generateAudio: "Gerar voz ou outro áudio.",+ transcribe: "Transformar fala em texto.",+ analyzeAudio: "Verificar os falantes, o tempo e o encaixe de um clipe em um roteiro.",+ generateVideo: "Gerar um vídeo.",+ runRecipe: "Rodar uma Data Recipe para criar um dataset.",+ getJob: "Acompanhar uma tarefa longa até terminar.",+ datasets: "Listar e enviar datasets.",+ startTraining: "Iniciar um fine-tuning.",+ listTrainingRuns: "Listar os treinamentos e seus resultados.",+ exportModel: "Exportar um modelo treinado, por exemplo para GGUF.",+ listMedia: "Ver imagens, áudios e vídeos salvos.",+ voices: "Listar, salvar, renomear ou excluir vozes.",+ cancel: "Parar um trabalho em andamento, como um treinamento ou uma exportação.",+ },+ },apiKeys: {title: "API",description:@@ -3586,14 +3668,14 @@ export const ptBR = {},mcp: {title: "Acesso de agentes (MCP)",- description: "Permita que agentes de código como Claude Code e Codex usem o Unsloth via MCP. Os agentes entram com uma chave de API do Unsloth desta página.",+ description: "Permita que agentes de código como Claude Code e Codex usem o Unsloth via MCP.",enable: "Permitir conexões de agentes",enableDescription: "Atende /mcp/ para solicitações que trazem uma chave de API do Unsloth.",lockedByEnv: "Definido por {name}.",loadError: "Não foi possível carregar as configurações de acesso de agentes.",saveError: "Não foi possível salvar a configuração de acesso de agentes.",agent: "Agente",- exportKeyHint: "Defina {name} com uma chave de API do Unsloth desta página antes de iniciar o agente.",+ exportKeyHint: "Defina {name} com uma chave de API do Unsloth antes de iniciar o agente.",configFileHint: "Adicione isto a {path}.",keywords: "mcp model context protocol agents claude codex tools agentes agente ferramentas protocolo de contexto de modelo",},diff --git a/studio/frontend/src/i18n/locales/ru.ts b/studio/frontend/src/i18n/locales/ru.tsindex c354601d73a..90b0bd125a5 100644--- a/studio/frontend/src/i18n/locales/ru.ts+++ b/studio/frontend/src/i18n/locales/ru.ts@@ -3419,6 +3419,88 @@ export const ru = {description:"Откройте этот Unsloth с других устройств: через локальную сеть или временный публичный URL.",},+ mcp: {+ title: "Unsloth MCP",+ keyHint: "Агенты входят с ключом API Unsloth.",+ createKey: "Создать ключ API",+ tools: {+ title: "Инструменты",+ count: "Включено {on} из {total}",+ choose: "Выбрать инструменты",+ dialogTitle: "Инструменты Unsloth MCP",+ allTools: "Все инструменты",+ selectAll: "Выбрать все",+ selectNone: "Не выбирать ничего",+ description:+ "Каждый включённый инструмент добавляется к тому, что агенты читают перед началом, поэтому выключите ненужные. Агенты никогда не видят выключенный инструмент, а его вызовы отклоняются. Уже подключённые агенты увидят изменение после переподключения.",+ saveError: "Не удалось сохранить настройку инструмента Unsloth MCP.",+ groups: {+ models: "Модели",+ generate: "Генерация",+ training: "Обучение и экспорт",+ library: "Данные и библиотека",+ jobs: "Задачи",+ other: "Другое",+ },+ },+ status: {+ on: "Вкл.",+ off: "Выкл.",+ },+ apiKeysRow: {+ open: "Открыть в разделе «Агенты»",+ },+ toolLabels: {+ studioStatus: "Состояние",+ listModels: "Список моделей",+ loadModel: "Загрузить модель",+ unloadModel: "Выгрузить модель",+ planLoad: "Спланировать загрузку",+ downloadModel: "Скачать модель",+ chat: "Чат",+ embed: "Встроить текст",+ systemOne: "Модель решений",+ generateImage: "Создать изображения",+ generateAudio: "Создать аудио",+ transcribe: "Транскрибировать",+ analyzeAudio: "Анализ аудио",+ generateVideo: "Создать видео",+ runRecipe: "Запустить Data Recipe",+ getJob: "Статус задания",+ datasets: "Наборы данных",+ startTraining: "Начать обучение",+ listTrainingRuns: "Запуски обучения",+ exportModel: "Экспортировать модель",+ listMedia: "Сохранённые медиа",+ voices: "Голоса",+ cancel: "Отменить работу",+ },+ toolDescriptions: {+ studioStatus: "Проверить, что загружено, работает и свободно на этом компьютере.",+ listModels: "Показать модели, которые агенты могут загрузить.",+ loadModel: "Загрузить модель, чтобы агенты могли общаться или генерировать.",+ unloadModel: "Выгрузить модель, чтобы освободить память.",+ planLoad: "Посмотреть размер загрузки и память без загрузки модели.",+ downloadModel: "Скачать модель с Hugging Face.",+ chat: "Общаться с загруженной моделью.",+ embed: "Превратить текст в векторы или упорядочить тексты по сходству.",+ systemOne: "Задать модели решений вопросы да/нет, выбора или оценки.",+ generateImage: "Генерировать изображения и сохранять их в галерею.",+ generateAudio: "Генерировать речь или другой звук.",+ transcribe: "Превратить речь в текст.",+ analyzeAudio: "Проверить говорящих, тайминг и соответствие клипа сценарию.",+ generateVideo: "Сгенерировать видео.",+ runRecipe: "Запустить Data Recipe, чтобы создать датасет.",+ getJob: "Следить за долгой задачей до её завершения.",+ datasets: "Показать и загрузить датасеты.",+ startTraining: "Начать fine-tuning.",+ listTrainingRuns: "Показать обучения и их результаты.",+ exportModel: "Экспортировать обученную модель, например в GGUF.",+ listMedia: "Просмотреть сохранённые изображения, аудио и видео.",+ voices: "Показать, сохранить, переименовать или удалить голоса.",+ cancel: "Остановить текущую работу, например обучение или экспорт.",+ },+ },apiKeys: {title: "API",description: "Доступ к Unsloth через OpenAI-совместимый API.",@@ -3584,14 +3666,14 @@ export const ru = {},mcp: {title: "Доступ агентов (MCP)",- description: "Разрешите агентам для программирования, таким как Claude Code и Codex, работать с Unsloth через MCP. Агенты входят с ключом API Unsloth с этой страницы.",+ description: "Разрешите агентам для программирования, таким как Claude Code и Codex, работать с Unsloth через MCP.",enable: "Разрешить подключения агентов",enableDescription: "Обслуживает /mcp/ для запросов с ключом API Unsloth.",lockedByEnv: "Задано через {name}.",loadError: "Не удалось загрузить настройки доступа агентов.",saveError: "Не удалось сохранить настройку доступа агентов.",agent: "Агент",- exportKeyHint: "Перед запуском агента задайте в {name} ключ API Unsloth с этой страницы.",+ exportKeyHint: "Перед запуском агента задайте в {name} ключ API Unsloth.",configFileHint: "Добавьте это в {path}.",keywords: "mcp model context protocol agents claude codex tools агенты агент инструменты протокол контекста модели",},diff --git a/studio/frontend/src/i18n/locales/sv.ts b/studio/frontend/src/i18n/locales/sv.tsindex 0f8faf3826c..561aaf018b4 100644--- a/studio/frontend/src/i18n/locales/sv.ts+++ b/studio/frontend/src/i18n/locales/sv.ts@@ -3587,6 +3587,88 @@ export const sv = {description:"Anslut till denna Unsloth från andra enheter, via ditt lokala nätverk eller en tillfällig offentlig URL.",},+ mcp: {+ title: "Unsloth MCP",+ keyHint: "Agenter loggar in med en API-nyckel för Unsloth.",+ createKey: "Skapa en API-nyckel",+ tools: {+ title: "Verktyg",+ count: "{on} av {total} på",+ choose: "Välj verktyg",+ dialogTitle: "Unsloth MCP-verktyg",+ allTools: "Alla verktyg",+ selectAll: "Markera alla",+ selectNone: "Markera inga",+ description:+ "Varje verktyg som är på läggs till det agenter läser innan de börjar, så stäng av dem du inte behöver. Agenter ser aldrig ett avstängt verktyg, och anrop till det nekas. Redan anslutna agenter ser ändringen när de ansluter igen.",+ saveError: "Det gick inte att spara inställningen för verktyget i Unsloth MCP.",+ groups: {+ models: "Modeller",+ generate: "Generera",+ training: "Träning och export",+ library: "Data och bibliotek",+ jobs: "Jobb",+ other: "Övrigt",+ },+ },+ status: {+ on: "På",+ off: "Av",+ },+ apiKeysRow: {+ open: "Öppna i Agenter",+ },+ toolLabels: {+ studioStatus: "Status",+ listModels: "Lista modeller",+ loadModel: "Läs in modell",+ unloadModel: "Lasta ur modell",+ planLoad: "Planera en inläsning",+ downloadModel: "Ladda ned modell",+ chat: "Chatt",+ embed: "Bädda in text",+ systemOne: "Beslutsmodell",+ generateImage: "Generera bilder",+ generateAudio: "Generera ljud",+ transcribe: "Transkribera",+ analyzeAudio: "Analysera ljud",+ generateVideo: "Generera video",+ runRecipe: "Kör Data Recipe",+ getJob: "Jobbstatus",+ datasets: "Datamängder",+ startTraining: "Starta träning",+ listTrainingRuns: "Träningskörningar",+ exportModel: "Exportera modell",+ listMedia: "Sparad media",+ voices: "Röster",+ cancel: "Avbryt arbete",+ },+ toolDescriptions: {+ studioStatus: "Se vad som är laddat, körs och ledigt på den här datorn.",+ listModels: "Lista modellerna som agenter kan ladda.",+ loadModel: "Ladda en modell så att agenter kan chatta eller generera med den.",+ unloadModel: "Ladda ur en modell för att frigöra minne.",+ planLoad: "Se nedladdningsstorlek och minnesbehov för en laddning utan att ladda.",+ downloadModel: "Ladda ner en modell från Hugging Face.",+ chat: "Chatta med den laddade modellen.",+ embed: "Göra om text till vektorer, eller rangordna texter efter likhet.",+ systemOne: "Ställ ja/nej-, val- eller poängfrågor till beslutsmodellen.",+ generateImage: "Generera bilder och spara dem i galleriet.",+ generateAudio: "Generera tal eller annat ljud.",+ transcribe: "Göra om tal till text.",+ analyzeAudio: "Kontrollera talare, timing och matchning mot ett manus i ett klipp.",+ generateVideo: "Generera en video.",+ runRecipe: "Köra ett Data Recipe för att bygga ett dataset.",+ getJob: "Följa ett långt jobb tills det är klart.",+ datasets: "Lista och ladda upp dataset.",+ startTraining: "Starta en finjustering.",+ listTrainingRuns: "Lista träningskörningar och deras resultat.",+ exportModel: "Exportera en tränad modell, till exempel till GGUF.",+ listMedia: "Bläddra bland sparade bilder, ljud och videor.",+ voices: "Lista, spara, byta namn på eller ta bort röster.",+ cancel: "Stoppa pågående arbete, som en träning eller en export.",+ },+ },apiKeys: {title: "API",description: "Anslut till Unsloth via det OpenAI-kompatibla API:et.",@@ -3761,14 +3843,14 @@ export const sv = {},mcp: {title: "Agentåtkomst (MCP)",- description: "Låt kodagenter som Claude Code och Codex använda Unsloth via MCP. Agenter loggar in med en API-nyckel för Unsloth från den här sidan.",+ description: "Låt kodagenter som Claude Code och Codex använda Unsloth via MCP.",enable: "Tillåt agentanslutningar",enableDescription: "Betjänar /mcp/ för förfrågningar som har en API-nyckel för Unsloth.",lockedByEnv: "Angiven av {name}.",loadError: "Det gick inte att läsa in inställningarna för agentåtkomst.",saveError: "Det gick inte att spara inställningen för agentåtkomst.",agent: "Agent",- exportKeyHint: "Sätt {name} till en API-nyckel för Unsloth från den här sidan innan du startar agenten.",+ exportKeyHint: "Sätt {name} till en API-nyckel för Unsloth innan du startar agenten.",configFileHint: "Lägg till det här i {path}.",keywords: "mcp model context protocol agents claude codex tools agenter agent verktyg modellkontextprotokoll",},diff --git a/studio/frontend/src/i18n/locales/th.ts b/studio/frontend/src/i18n/locales/th.tsindex db46286cd92..b3ace69bf84 100644--- a/studio/frontend/src/i18n/locales/th.ts+++ b/studio/frontend/src/i18n/locales/th.ts@@ -3706,19 +3706,101 @@ export const th = {mcp: {title: "การเข้าถึงของเอเจนต์ (MCP)",description:- "ให้เอเจนต์เขียนโค้ด เช่น Claude Code และ Codex ใช้ Unsloth ผ่าน MCP เอเจนต์จะลงชื่อเข้าใช้ด้วยคีย์ API ของ Unsloth จากหน้านี้",+ "ให้เอเจนต์เขียนโค้ด เช่น Claude Code และ Codex ใช้ Unsloth ผ่าน MCP",enable: "อนุญาตการเชื่อมต่อจากเอเจนต์",enableDescription: "ให้บริการ /mcp/ แก่คำขอที่มีคีย์ API ของ Unsloth",lockedByEnv: "ตั้งค่าโดย {name}",loadError: "ไม่สามารถโหลดการตั้งค่าการเข้าถึงของเอเจนต์ได้",saveError: "ไม่สามารถบันทึกการตั้งค่าการเข้าถึงของเอเจนต์ได้",agent: "เอเจนต์",- exportKeyHint: "ตั้งค่า {name} เป็นคีย์ API ของ Unsloth จากหน้านี้ก่อนเริ่มเอเจนต์",+ exportKeyHint: "ตั้งค่า {name} เป็นคีย์ API ของ Unsloth ก่อนเริ่มเอเจนต์",configFileHint: "เพิ่มส่วนนี้ลงใน {path}",keywords:"เอเจนต์ เครื่องมือ โปรโตคอล mcp model context protocol agents claude codex tools",},},+ mcp: {+ title: "Unsloth MCP",+ keyHint: "เอเจนต์ลงชื่อเข้าใช้ด้วยคีย์ API ของ Unsloth",+ createKey: "สร้างคีย์ API",+ tools: {+ title: "เครื่องมือ",+ count: "เปิดอยู่ {on} จาก {total}",+ choose: "เลือกเครื่องมือ",+ dialogTitle: "เครื่องมือ Unsloth MCP",+ allTools: "เครื่องมือทั้งหมด",+ selectAll: "เลือกทั้งหมด",+ selectNone: "ไม่เลือกเลย",+ description:+ "เครื่องมือทุกตัวที่เปิดไว้จะเพิ่มสิ่งที่เอเจนต์ต้องอ่านก่อนเริ่มงาน จึงควรปิดตัวที่ไม่ได้ใช้ เอเจนต์จะไม่เห็นเครื่องมือที่ปิดอยู่ และการเรียกใช้จะถูกปฏิเสธ เอเจนต์ที่เชื่อมต่ออยู่แล้วจะเห็นการเปลี่ยนแปลงเมื่อเชื่อมต่อใหม่",+ saveError: "บันทึกการตั้งค่าเครื่องมือ Unsloth MCP ไม่สำเร็จ",+ groups: {+ models: "โมเดล",+ generate: "สร้าง",+ training: "การเทรนและการส่งออก",+ library: "ข้อมูลและคลัง",+ jobs: "งาน",+ other: "อื่นๆ",+ },+ },+ status: {+ on: "เปิด",+ off: "ปิด",+ },+ apiKeysRow: {+ open: "เปิดในเอเจนต์",+ },+ toolLabels: {+ studioStatus: "สถานะ",+ listModels: "แสดงรายการโมเดล",+ loadModel: "โหลดโมเดล",+ unloadModel: "ยกเลิกการโหลดโมเดล",+ planLoad: "วางแผนการโหลด",+ downloadModel: "ดาวน์โหลดโมเดล",+ chat: "แชท",+ embed: "ฝังข้อความ",+ systemOne: "โมเดลตัดสินใจ",+ generateImage: "สร้างรูปภาพ",+ generateAudio: "สร้างเสียง",+ transcribe: "ถอดเสียง",+ analyzeAudio: "วิเคราะห์เสียง",+ generateVideo: "สร้างวิดีโอ",+ runRecipe: "เรียกใช้ Data Recipe",+ getJob: "สถานะงาน",+ datasets: "ชุดข้อมูล",+ startTraining: "เริ่มการเทรน",+ listTrainingRuns: "การเทรนที่ผ่านมา",+ exportModel: "ส่งออกโมเดล",+ listMedia: "สื่อที่บันทึกไว้",+ voices: "เสียงพูด",+ cancel: "ยกเลิกงาน",+ },+ toolDescriptions: {+ studioStatus: "ดูว่าอะไรโหลดอยู่ กำลังทำงาน และว่างอยู่บนคอมพิวเตอร์นี้",+ listModels: "แสดงรายการโมเดลที่เอเจนต์โหลดได้",+ loadModel: "โหลดโมเดลเพื่อให้เอเจนต์แชตหรือสร้างงานได้",+ unloadModel: "ยกเลิกการโหลดโมเดลเพื่อคืนหน่วยความจำ",+ planLoad: "ดูขนาดดาวน์โหลดและหน่วยความจำก่อนโหลดจริง",+ downloadModel: "ดาวน์โหลดโมเดลจาก Hugging Face",+ chat: "แชตกับโมเดลที่โหลดอยู่",+ embed: "แปลงข้อความเป็นเวกเตอร์ หรือจัดอันดับข้อความตามความคล้าย",+ systemOne: "ถามโมเดลตัดสินใจด้วยคำถามใช่หรือไม่ ตัวเลือก หรือคะแนน",+ generateImage: "สร้างภาพและบันทึกลงแกลเลอรี",+ generateAudio: "สร้างเสียงพูดหรือเสียงอื่น",+ transcribe: "แปลงเสียงพูดเป็นข้อความ",+ analyzeAudio: "ตรวจผู้พูด จังหวะเวลา และความตรงกับสคริปต์ของคลิป",+ generateVideo: "สร้างวิดีโอ",+ runRecipe: "เรียกใช้ Data Recipe เพื่อสร้างชุดข้อมูล",+ getJob: "ติดตามงานที่ใช้เวลานานจนเสร็จ",+ datasets: "แสดงรายการและอัปโหลดชุดข้อมูล",+ startTraining: "เริ่มการ fine-tuning",+ listTrainingRuns: "แสดงรายการการเทรนและผลลัพธ์",+ exportModel: "ส่งออกโมเดลที่เทรนแล้ว เช่น เป็น GGUF",+ listMedia: "ดูภาพ เสียง และวิดีโอที่บันทึกไว้",+ voices: "แสดง บันทึก เปลี่ยนชื่อ หรือลบเสียง",+ cancel: "หยุดงานที่กำลังทำ เช่น การเทรนหรือการส่งออก",+ },+ },about: {title: "เกี่ยวกับ",description: "เอกสาร บันทึกประจำรุ่น ความคิดเห็น และข้อมูลบิลด์",diff --git a/studio/frontend/src/i18n/locales/tr.ts b/studio/frontend/src/i18n/locales/tr.tsindex bd88bd59fa6..8c893a69f83 100644--- a/studio/frontend/src/i18n/locales/tr.ts+++ b/studio/frontend/src/i18n/locales/tr.ts@@ -3866,7 +3866,7 @@ export const tr = {mcp: {title: "Ajan erişimi (MCP)",description:- "Claude Code ve Codex gibi kodlama ajanlarının Unsloth'u MCP üzerinden kullanmasına izin verin. Ajanlar, bu sayfadaki bir Unsloth API anahtarıyla oturum açar.",+ "Claude Code ve Codex gibi kodlama ajanlarının Unsloth'u MCP üzerinden kullanmasına izin verin.",enable: "Ajan bağlantılarına izin ver",enableDescription:"/mcp/ uç noktasını Unsloth API anahtarı taşıyan isteklere sunar.",@@ -3875,12 +3875,94 @@ export const tr = {saveError: "Ajan erişimi ayarı kaydedilemedi.",agent: "Ajan",exportKeyHint:- "Ajanı başlatmadan önce {name} değişkenini bu sayfadaki bir Unsloth API anahtarına ayarlayın.",+ "Ajanı başlatmadan önce {name} değişkenini bir Unsloth API anahtarına ayarlayın.",configFileHint: "Bunu şu dosyaya ekleyin: {path}",keywords:"mcp model context protocol model bağlam protokolü ajanlar agents claude codex araçlar tools",},},+ mcp: {+ title: "Unsloth MCP",+ keyHint: "Ajanlar bir Unsloth API anahtarıyla oturum açar.",+ createKey: "API anahtarı oluştur",+ tools: {+ title: "Araçlar",+ count: "{total} araçtan {on} tanesi açık",+ choose: "Araçları seç",+ dialogTitle: "Unsloth MCP araçları",+ allTools: "Tüm araçlar",+ selectAll: "Tümünü seç",+ selectNone: "Hiçbirini seçme",+ description:+ "Açık bıraktığın her araç, ajanların başlamadan önce okuduğu şeye eklenir, bu yüzden ihtiyacın olmayanları kapat. Ajanlar kapalı bir aracı asla görmez ve ona yapılan çağrılar reddedilir. Zaten bağlı olan ajanlar değişikliği yeniden bağlandıklarında görür.",+ saveError: "Unsloth MCP araç ayarı kaydedilemedi.",+ groups: {+ models: "Modeller",+ generate: "Üret",+ training: "Eğitim ve dışa aktarma",+ library: "Veri ve kitaplık",+ jobs: "İşler",+ other: "Diğer",+ },+ },+ status: {+ on: "Açık",+ off: "Kapalı",+ },+ apiKeysRow: {+ open: "Ajanlar'da aç",+ },+ toolLabels: {+ studioStatus: "Durum",+ listModels: "Modelleri listele",+ loadModel: "Model yükle",+ unloadModel: "Modeli kaldır",+ planLoad: "Yüklemeyi planla",+ downloadModel: "Model indir",+ chat: "Sohbet",+ embed: "Metni göm",+ systemOne: "Karar modeli",+ generateImage: "Görsel üret",+ generateAudio: "Ses üret",+ transcribe: "Yazıya dök",+ analyzeAudio: "Sesi analiz et",+ generateVideo: "Video üret",+ runRecipe: "Data Recipe çalıştır",+ getJob: "İş durumu",+ datasets: "Veri kümeleri",+ startTraining: "Eğitimi başlat",+ listTrainingRuns: "Eğitim çalıştırmaları",+ exportModel: "Modeli dışa aktar",+ listMedia: "Kaydedilen medya",+ voices: "Sesler",+ cancel: "İşi iptal et",+ },+ toolDescriptions: {+ studioStatus: "Bu bilgisayarda neyin yüklü, çalışır ve boş olduğunu gör.",+ listModels: "Ajanların yükleyebileceği modelleri listele.",+ loadModel: "Ajanların sohbet etmesi veya üretmesi için bir model yükle.",+ unloadModel: "Bellek açmak için bir modeli kaldır.",+ planLoad: "Yüklemeden indirme boyutunu ve bellek kullanımını önizle.",+ downloadModel: "Hugging Face'ten bir model indir.",+ chat: "Yüklü modelle sohbet et.",+ embed: "Metni vektöre çevir veya metinleri benzerliğe göre sırala.",+ systemOne: "Karar modeline evet/hayır, seçim veya puan soruları sor.",+ generateImage: "Görsel üret ve galeriye kaydet.",+ generateAudio: "Konuşma veya başka ses üret.",+ transcribe: "Konuşmayı metne çevir.",+ analyzeAudio: "Bir klibin konuşmacılarını, zamanlamasını ve senaryoya uyumunu kontrol et.",+ generateVideo: "Video üret.",+ runRecipe: "Veri kümesi oluşturmak için bir Data Recipe çalıştır.",+ getJob: "Uzun bir işi bitene kadar takip et.",+ datasets: "Veri kümelerini listele ve yükle.",+ startTraining: "Bir ince ayar çalıştırması başlat.",+ listTrainingRuns: "Eğitim çalıştırmalarını ve sonuçlarını listele.",+ exportModel: "Eğitilmiş bir modeli dışa aktar, örneğin GGUF olarak.",+ listMedia: "Kayıtlı görselleri, sesleri ve videoları gez.",+ voices: "Sesleri listele, kaydet, yeniden adlandır veya sil.",+ cancel: "Bir eğitim veya dışa aktarma gibi süren bir işi durdur.",+ },+ },about: {title: "Hakkında",description:diff --git a/studio/frontend/src/i18n/locales/uk.ts b/studio/frontend/src/i18n/locales/uk.tsindex 64d32496036..4673c897b37 100644--- a/studio/frontend/src/i18n/locales/uk.ts+++ b/studio/frontend/src/i18n/locales/uk.ts@@ -3900,7 +3900,7 @@ export const uk = {mcp: {title: "Доступ агентів (MCP)",description:- "Дозвольте агентам для програмування, як-от Claude Code і Codex, використовувати Unsloth через MCP. Агенти входять за допомогою ключа API Unsloth із цієї сторінки.",+ "Дозвольте агентам для програмування, як-от Claude Code і Codex, використовувати Unsloth через MCP.",enable: "Дозволити підключення агентів",enableDescription:"Обслуговує /mcp/ для запитів, що містять ключ API Unsloth.",@@ -3909,12 +3909,94 @@ export const uk = {saveError: "Не вдалося зберегти налаштування доступу агентів.",agent: "Агент",exportKeyHint:- "Перед запуском агента задайте для {name} ключ API Unsloth із цієї сторінки.",+ "Перед запуском агента задайте для {name} ключ API Unsloth.",configFileHint: "Додайте це до {path}.",keywords:"mcp model context protocol протокол контексту моделі агенти claude codex інструменти",},},+ mcp: {+ title: "Unsloth MCP",+ keyHint: "Агенти входять за допомогою API-ключа Unsloth.",+ createKey: "Створити API-ключ",+ tools: {+ title: "Інструменти",+ count: "Увімкнено {on} з {total}",+ choose: "Вибрати інструменти",+ dialogTitle: "Інструменти Unsloth MCP",+ allTools: "Усі інструменти",+ selectAll: "Вибрати все",+ selectNone: "Не вибирати нічого",+ description:+ "Кожен увімкнений інструмент додається до того, що агенти читають перед початком, тож вимкніть непотрібні. Агенти ніколи не бачать вимкнений інструмент, а його виклики відхиляються. Уже підключені агенти побачать зміну після повторного підключення.",+ saveError: "Не вдалося зберегти налаштування інструментів Unsloth MCP.",+ groups: {+ models: "Моделі",+ generate: "Генерація",+ training: "Навчання та експорт",+ library: "Дані та бібліотека",+ jobs: "Завдання",+ other: "Інше",+ },+ },+ status: {+ on: "Увімкнено",+ off: "Вимкнено",+ },+ apiKeysRow: {+ open: "Відкрити в «Агентах»",+ },+ toolLabels: {+ studioStatus: "Стан",+ listModels: "Список моделей",+ loadModel: "Завантажити модель",+ unloadModel: "Вивантажити модель",+ planLoad: "Спланувати завантаження",+ downloadModel: "Звантажити модель",+ chat: "Чат",+ embed: "Векторизувати текст",+ systemOne: "Модель рішень",+ generateImage: "Генерувати зображення",+ generateAudio: "Генерувати аудіо",+ transcribe: "Транскрибувати",+ analyzeAudio: "Аналізувати аудіо",+ generateVideo: "Генерувати відео",+ runRecipe: "Запустити Data Recipe",+ getJob: "Стан завдання",+ datasets: "Набори даних",+ startTraining: "Почати навчання",+ listTrainingRuns: "Запуски навчання",+ exportModel: "Експортувати модель",+ listMedia: "Збережені медіа",+ voices: "Голоси",+ cancel: "Скасувати роботу",+ },+ toolDescriptions: {+ studioStatus: "Перевірити, що завантажено, працює і вільне на цьому комп'ютері.",+ listModels: "Показати моделі, які агенти можуть завантажити.",+ loadModel: "Завантажити модель, щоб агенти могли спілкуватися або генерувати.",+ unloadModel: "Вивантажити модель, щоб звільнити пам'ять.",+ planLoad: "Переглянути розмір завантаження і пам'ять без завантаження моделі.",+ downloadModel: "Завантажити модель з Hugging Face.",+ chat: "Спілкуватися із завантаженою моделлю.",+ embed: "Перетворити текст на вектори або впорядкувати тексти за схожістю.",+ systemOne: "Поставити моделі рішень питання так/ні, вибору або оцінки.",+ generateImage: "Генерувати зображення і зберігати їх у галереї.",+ generateAudio: "Генерувати мовлення або інше аудіо.",+ transcribe: "Перетворити мовлення на текст.",+ analyzeAudio: "Перевірити мовців, таймінг і відповідність кліпу сценарію.",+ generateVideo: "Згенерувати відео.",+ runRecipe: "Запустити Data Recipe, щоб створити датасет.",+ getJob: "Стежити за довгим завданням до завершення.",+ datasets: "Показати й завантажити датасети.",+ startTraining: "Почати fine-tuning.",+ listTrainingRuns: "Показати тренування та їхні результати.",+ exportModel: "Експортувати натреновану модель, наприклад у GGUF.",+ listMedia: "Переглянути збережені зображення, аудіо і відео.",+ voices: "Показати, зберегти, перейменувати або видалити голоси.",+ cancel: "Зупинити поточну роботу, наприклад тренування чи експорт.",+ },+ },about: {title: "Про застосунок",description:diff --git a/studio/frontend/src/i18n/locales/vi.ts b/studio/frontend/src/i18n/locales/vi.tsindex 07eda64f5d2..d4755078965 100644--- a/studio/frontend/src/i18n/locales/vi.ts+++ b/studio/frontend/src/i18n/locales/vi.ts@@ -3869,7 +3869,7 @@ export const vi = {mcp: {title: "Quyền truy cập của tác tử (MCP)",description:- "Cho phép các tác tử lập trình như Claude Code và Codex dùng Unsloth qua MCP. Tác tử đăng nhập bằng khóa API Unsloth từ trang này.",+ "Cho phép các tác tử lập trình như Claude Code và Codex dùng Unsloth qua MCP.",enable: "Cho phép tác tử kết nối",enableDescription:"Phục vụ /mcp/ cho các yêu cầu có kèm khóa API Unsloth.",@@ -3878,12 +3878,94 @@ export const vi = {saveError: "Không thể lưu cài đặt quyền truy cập của tác tử.",agent: "Tác tử",exportKeyHint:- "Đặt {name} thành một khóa API Unsloth từ trang này trước khi bạn khởi động tác tử.",+ "Đặt {name} thành một khóa API Unsloth trước khi bạn khởi động tác tử.",configFileHint: "Thêm nội dung này vào {path}.",keywords:"mcp model context protocol agents claude codex tools giao thức ngữ cảnh mô hình tác tử công cụ",},},+ mcp: {+ title: "Unsloth MCP",+ keyHint: "Tác tử đăng nhập bằng khóa API Unsloth.",+ createKey: "Tạo khóa API",+ tools: {+ title: "Công cụ",+ count: "Đã bật {on}/{total}",+ choose: "Chọn công cụ",+ dialogTitle: "Công cụ Unsloth MCP",+ allTools: "Tất cả công cụ",+ selectAll: "Chọn tất cả",+ selectNone: "Không chọn gì",+ description:+ "Mỗi công cụ bạn bật sẽ thêm vào những gì agent đọc trước khi bắt đầu, vì vậy hãy tắt những công cụ bạn không cần. Agent không bao giờ thấy công cụ đã tắt và các lệnh gọi đến nó bị từ chối. Agent đã kết nối sẽ thấy thay đổi khi kết nối lại.",+ saveError: "Không thể lưu cài đặt công cụ Unsloth MCP.",+ groups: {+ models: "Mô hình",+ generate: "Tạo",+ training: "Huấn luyện và xuất",+ library: "Dữ liệu và thư viện",+ jobs: "Tác vụ",+ other: "Khác",+ },+ },+ status: {+ on: "Bật",+ off: "Tắt",+ },+ apiKeysRow: {+ open: "Mở trong Tác tử",+ },+ toolLabels: {+ studioStatus: "Trạng thái",+ listModels: "Liệt kê mô hình",+ loadModel: "Tải mô hình",+ unloadModel: "Gỡ mô hình",+ planLoad: "Lập kế hoạch tải",+ downloadModel: "Tải xuống mô hình",+ chat: "Trò chuyện",+ embed: "Nhúng văn bản",+ systemOne: "Mô hình quyết định",+ generateImage: "Tạo hình ảnh",+ generateAudio: "Tạo âm thanh",+ transcribe: "Chép lời",+ analyzeAudio: "Phân tích âm thanh",+ generateVideo: "Tạo video",+ runRecipe: "Chạy Data Recipe",+ getJob: "Trạng thái tác vụ",+ datasets: "Tập dữ liệu",+ startTraining: "Bắt đầu huấn luyện",+ listTrainingRuns: "Các lần huấn luyện",+ exportModel: "Xuất mô hình",+ listMedia: "Phương tiện đã lưu",+ voices: "Giọng nói",+ cancel: "Hủy công việc",+ },+ toolDescriptions: {+ studioStatus: "Xem những gì đang tải, đang chạy và còn trống trên máy này.",+ listModels: "Liệt kê các mô hình agent có thể tải.",+ loadModel: "Tải một mô hình để agent trò chuyện hoặc tạo nội dung.",+ unloadModel: "Gỡ một mô hình để giải phóng bộ nhớ.",+ planLoad: "Xem trước dung lượng tải xuống và bộ nhớ mà không tải.",+ downloadModel: "Tải một mô hình từ Hugging Face.",+ chat: "Trò chuyện với mô hình đang tải.",+ embed: "Chuyển văn bản thành vector, hoặc xếp hạng văn bản theo độ giống nhau.",+ systemOne: "Hỏi mô hình quyết định câu hỏi có/không, lựa chọn hoặc chấm điểm.",+ generateImage: "Tạo ảnh và lưu vào thư viện.",+ generateAudio: "Tạo giọng nói hoặc âm thanh khác.",+ transcribe: "Chuyển giọng nói thành văn bản.",+ analyzeAudio: "Kiểm tra người nói, thời gian và độ khớp của đoạn âm thanh với kịch bản.",+ generateVideo: "Tạo một video.",+ runRecipe: "Chạy Data Recipe để tạo dataset.",+ getJob: "Theo dõi một tác vụ dài cho đến khi xong.",+ datasets: "Liệt kê và tải lên dataset.",+ startTraining: "Bắt đầu một lần fine-tuning.",+ listTrainingRuns: "Liệt kê các lần huấn luyện và kết quả.",+ exportModel: "Xuất mô hình đã huấn luyện, ví dụ sang GGUF.",+ listMedia: "Duyệt ảnh, âm thanh và video đã lưu.",+ voices: "Liệt kê, lưu, đổi tên hoặc xóa giọng nói.",+ cancel: "Dừng công việc đang chạy, như huấn luyện hoặc xuất.",+ },+ },about: {title: "Giới thiệu",description:diff --git a/studio/frontend/src/i18n/locales/zh-CN.ts b/studio/frontend/src/i18n/locales/zh-CN.tsindex 29a06b6ebda..821d678bb0b 100644--- a/studio/frontend/src/i18n/locales/zh-CN.ts+++ b/studio/frontend/src/i18n/locales/zh-CN.ts@@ -3353,6 +3353,88 @@ export const zhCN = {description:"通过局域网或临时公开 URL,从其他设备访问此 Unsloth。",},+ mcp: {+ title: "Unsloth MCP",+ keyHint: "智能体使用 Unsloth API 密钥登录。",+ createKey: "创建 API 密钥",+ tools: {+ title: "工具",+ count: "已开启 {on}/{total}",+ choose: "选择工具",+ dialogTitle: "Unsloth MCP 工具",+ allTools: "全部工具",+ selectAll: "全选",+ selectNone: "全不选",+ description:+ "每个开启的工具都会增加智能体开始前要读取的内容,所以请关闭不需要的工具。智能体永远看不到已关闭的工具,对它的调用会被拒绝。已连接的智能体在重新连接后才会看到变化。",+ saveError: "无法保存 Unsloth MCP 工具设置。",+ groups: {+ models: "模型",+ generate: "生成",+ training: "训练与导出",+ library: "数据与媒体库",+ jobs: "任务",+ other: "其他",+ },+ },+ status: {+ on: "开",+ off: "关",+ },+ apiKeysRow: {+ open: "在智能体中打开",+ },+ toolLabels: {+ studioStatus: "状态",+ listModels: "列出模型",+ loadModel: "加载模型",+ unloadModel: "卸载模型",+ planLoad: "规划加载",+ downloadModel: "下载模型",+ chat: "聊天",+ embed: "嵌入文本",+ systemOne: "决策模型",+ generateImage: "生成图像",+ generateAudio: "生成音频",+ transcribe: "转录",+ analyzeAudio: "分析音频",+ generateVideo: "生成视频",+ runRecipe: "运行 Data Recipe",+ getJob: "任务状态",+ datasets: "数据集",+ startTraining: "开始训练",+ listTrainingRuns: "训练运行",+ exportModel: "导出模型",+ listMedia: "已保存媒体",+ voices: "语音",+ cancel: "取消工作",+ },+ toolDescriptions: {+ studioStatus: "查看这台电脑上已加载、正在运行和空闲的内容。",+ listModels: "列出智能体可加载的模型。",+ loadModel: "加载模型,让智能体用它聊天或生成内容。",+ unloadModel: "卸载模型以释放内存。",+ planLoad: "不加载即可预览下载大小和内存占用。",+ downloadModel: "从 Hugging Face 下载模型。",+ chat: "与已加载的模型聊天。",+ embed: "把文本转换为向量,或按相似度排序文本。",+ systemOne: "向决策模型提出是非、选择或评分问题。",+ generateImage: "生成图片并保存到图库。",+ generateAudio: "生成语音或其他音频。",+ transcribe: "将语音转为文字。",+ analyzeAudio: "检查片段的说话人、时间以及与脚本的匹配。",+ generateVideo: "生成视频。",+ runRecipe: "运行 Data Recipe 来构建数据集。",+ getJob: "跟踪一个长任务直到完成。",+ datasets: "列出并上传数据集。",+ startTraining: "开始一次微调。",+ listTrainingRuns: "列出训练运行及其结果。",+ exportModel: "导出训练好的模型,例如导出为 GGUF。",+ listMedia: "浏览已保存的图片、音频和视频。",+ voices: "列出、保存、重命名或删除声音。",+ cancel: "停止正在进行的工作,例如训练或导出。",+ },+ },apiKeys: {title: "API",description: "通过兼容 OpenAI 的 API 以编程方式访问 Unsloth。",@@ -3518,14 +3600,14 @@ export const zhCN = {},mcp: {title: "智能体访问 (MCP)",- description: "允许 Claude Code、Codex 等编程智能体通过 MCP 使用 Unsloth。智能体使用本页的 Unsloth API 密钥登录。",+ description: "允许 Claude Code、Codex 等编程智能体通过 MCP 使用 Unsloth。",enable: "允许智能体连接",enableDescription: "为携带 Unsloth API 密钥的请求提供 /mcp/。",lockedByEnv: "由 {name} 设置。",loadError: "无法加载智能体访问设置。",saveError: "无法保存智能体访问设置。",agent: "智能体",- exportKeyHint: "启动智能体前,请将 {name} 设置为本页的 Unsloth API 密钥。",+ exportKeyHint: "启动智能体前,请将 {name} 设置为 Unsloth API 密钥。",configFileHint: "将此内容添加到 {path}。",keywords: "mcp model context protocol agents claude codex tools 智能体 代理 工具 模型上下文协议",},diff --git a/studio/frontend/src/i18n/locales/zh-TW.ts b/studio/frontend/src/i18n/locales/zh-TW.tsindex 52a2e37f836..5f0723c9865 100644--- a/studio/frontend/src/i18n/locales/zh-TW.ts+++ b/studio/frontend/src/i18n/locales/zh-TW.ts@@ -3682,7 +3682,7 @@ export const zhTW = {mcp: {title: "代理程式存取(MCP)",description:- "讓 Claude Code 和 Codex 等程式設計代理程式透過 MCP 使用 Unsloth。代理程式會使用此頁面中的 Unsloth API 金鑰登入。",+ "讓 Claude Code 和 Codex 等程式設計代理程式透過 MCP 使用 Unsloth。",enable: "允許代理程式連線",enableDescription: "為帶有 Unsloth API 金鑰的請求提供 /mcp/ 服務。",lockedByEnv: "由 {name} 設定。",@@ -3690,12 +3690,94 @@ export const zhTW = {saveError: "無法儲存代理程式存取設定。",agent: "代理程式",exportKeyHint:- "啟動代理程式前,請將 {name} 設為此頁面中的 Unsloth API 金鑰。",+ "啟動代理程式前,請將 {name} 設為 Unsloth API 金鑰。",configFileHint: "將此內容加入 {path}。",keywords:"mcp model context protocol 模型上下文協定 agents 代理程式 claude codex tools 工具",},},+ mcp: {+ title: "Unsloth MCP",+ keyHint: "代理程式使用 Unsloth API 金鑰登入。",+ createKey: "建立 API 金鑰",+ tools: {+ title: "工具",+ count: "已開啟 {on}/{total}",+ choose: "選擇工具",+ dialogTitle: "Unsloth MCP 工具",+ allTools: "所有工具",+ selectAll: "全選",+ selectNone: "全不選",+ description:+ "每個開啟的工具都會增加代理程式開始前要讀取的內容,所以請關閉不需要的工具。代理程式永遠看不到已關閉的工具,對它的呼叫會被拒絕。已連線的代理程式在重新連線後才會看到變更。",+ saveError: "無法儲存 Unsloth MCP 工具設定。",+ groups: {+ models: "模型",+ generate: "生成",+ training: "訓練與匯出",+ library: "資料與媒體庫",+ jobs: "工作",+ other: "其他",+ },+ },+ status: {+ on: "開啟",+ off: "關閉",+ },+ apiKeysRow: {+ open: "在「代理程式」中開啟",+ },+ toolLabels: {+ studioStatus: "狀態",+ listModels: "列出模型",+ loadModel: "載入模型",+ unloadModel: "卸載模型",+ planLoad: "規劃載入",+ downloadModel: "下載模型",+ chat: "聊天",+ embed: "文字嵌入",+ systemOne: "決策模型",+ generateImage: "生成圖片",+ generateAudio: "生成音訊",+ transcribe: "轉錄",+ analyzeAudio: "分析音訊",+ generateVideo: "生成影片",+ runRecipe: "執行 Data Recipe",+ getJob: "工作狀態",+ datasets: "資料集",+ startTraining: "開始訓練",+ listTrainingRuns: "訓練紀錄",+ exportModel: "匯出模型",+ listMedia: "已儲存的媒體",+ voices: "語音",+ cancel: "取消工作",+ },+ toolDescriptions: {+ studioStatus: "查看這台電腦上已載入、正在執行和閒置的內容。",+ listModels: "列出代理程式可載入的模型。",+ loadModel: "載入模型,讓代理程式用它聊天或生成內容。",+ unloadModel: "卸載模型以釋放記憶體。",+ planLoad: "不載入即可預覽下載大小和記憶體用量。",+ downloadModel: "從 Hugging Face 下載模型。",+ chat: "與已載入的模型聊天。",+ embed: "把文字轉換為向量,或依相似度排序文字。",+ systemOne: "向決策模型提出是非、選擇或評分問題。",+ generateImage: "生成圖片並儲存到圖庫。",+ generateAudio: "生成語音或其他音訊。",+ transcribe: "將語音轉為文字。",+ analyzeAudio: "檢查片段的說話者、時間以及與腳本的吻合度。",+ generateVideo: "生成影片。",+ runRecipe: "執行 Data Recipe 來建立資料集。",+ getJob: "追蹤一個長工作直到完成。",+ datasets: "列出並上傳資料集。",+ startTraining: "開始一次微調。",+ listTrainingRuns: "列出訓練執行及其結果。",+ exportModel: "匯出訓練好的模型,例如匯出為 GGUF。",+ listMedia: "瀏覽已儲存的圖片、音訊和影片。",+ voices: "列出、儲存、重新命名或刪除聲音。",+ cancel: "停止正在進行的工作,例如訓練或匯出。",+ },+ },about: {title: "關於",description: "文件、版本資訊、意見回饋與組建資訊。",diff --git a/studio/frontend/tests/agents-fresh-api-key.test.ts b/studio/frontend/tests/agents-fresh-api-key.test.tsindex f49e2a1a3bf..11c21fd1324 100644--- a/studio/frontend/tests/agents-fresh-api-key.test.ts+++ b/studio/frontend/tests/agents-fresh-api-key.test.ts@@ -11,7 +11,8 @@ import { readSrc } from "./helpers/kit.ts";test("Settings > API examples and MCP take the stored key, not the tab-local one", () => {const tab = readSrc("features/settings/tabs/api-keys-tab.tsx");assert.match(tab, /<ApiExamplesPanel\s+apiKey=\{freshKey\}/);- assert.match(tab, /<McpAccessSection apiKey=\{freshKey\} \/>/);+ const agents = readSrc("features/settings/tabs/agents-tab.tsx");+ assert.match(agents, /<McpAccessSection apiKey=\{freshApiKey\} \/>/);});test("the API monitor page's examples carry the new key", () => {diff --git a/studio/frontend/tests/api-settings-tab.test.ts b/studio/frontend/tests/api-settings-tab.test.tsindex caa705bbdff..e0da74227cc 100644--- a/studio/frontend/tests/api-settings-tab.test.ts+++ b/studio/frontend/tests/api-settings-tab.test.ts@@ -44,7 +44,7 @@ test("usage examples sit right under the keys, where a new key lands", () => {test("MCP, keyless access and the monitor sit under one heading", () => {assert.match(TAB,- /<SettingsSection title="Access & monitoring">\s*\{isOwner \? <McpAccessSection apiKey=\{freshKey\} \/> : null\}\s*\{isOwner \? <KeylessApiAccessLink \/> : null\}\s*<MonitorLink hideHeading=\{true\} \/>\s*<\/SettingsSection>/,+ /<SettingsSection title="Access & monitoring">\s*\{isOwner \? <UnslothStudioMcpRow \/> : null\}\s*\{isOwner \? <KeylessApiAccessLink \/> : null\}\s*<MonitorLink hideHeading=\{true\} \/>\s*<\/SettingsSection>/,);const keyless = readSrc("features/settings/components/keyless-api-access-link.tsx");assert.match(keyless, /<SettingsRow\s+label="Keyless API access"/);diff --git a/studio/frontend/tests/mcp-access-api.test.ts b/studio/frontend/tests/mcp-access-api.test.tsindex ef60abdd2a8..faff3833dbf 100644--- a/studio/frontend/tests/mcp-access-api.test.ts+++ b/studio/frontend/tests/mcp-access-api.test.ts@@ -1,7 +1,6 @@// SPDX-License-Identifier: AGPL-3.0-only// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0-import assert from "node:assert/strict";import test from "node:test";@@ -42,6 +41,7 @@ test("loading reads the owner settings route and maps it to camelCase", async ()enabled: true,forcedByEnv: forced,url: "http://127.0.0.1:8888/mcp/",+ tools: null,});assert.deepEqual(c.requests, [{ path: "/api/settings/mcp-access", init: undefined },@@ -65,6 +65,39 @@ test("saving sends only the switch value", async () => {]);});+test("the tool list is kept in server order, and an older backend without one maps to null", async () => {+ const tools = [+ { name: "studio_status", area: "status", enabled: true },+ { name: "cancel", area: "cancel", enabled: false },+ ];+ const c = client(() => Response.json({ ...BODY, tools }));+ assert.deepEqual((await c.api.loadMcpAccess()).tools, tools);+ assert.equal(c.api.mcpAccessFromApi(BODY).tools, null);+});++test("saving tools sends only the full turned-off list", async () => {+ const c = client(() =>+ Response.json({+ ...BODY,+ tools: [{ name: "cancel", area: "cancel", enabled: false }],+ }),+ );+ const saved = await c.api.updateMcpTools({ cancel: false });+ assert.deepEqual(saved.tools, [+ { name: "cancel", area: "cancel", enabled: false },+ ]);+ assert.deepEqual(c.requests, [+ {+ path: "/api/settings/mcp-access",+ init: {+ method: "PUT",+ headers: { "Content-Type": "application/json" },+ body: JSON.stringify({ tool_states: { cancel: false } }),+ },+ },+ ]);+});+test("a forced setting and an API-key caller surface the server's reason", async () => {for (const [status, detail] of [[409, "Set by UNSLOTH_STUDIO_ENABLE_MCP."],@@ -86,6 +119,43 @@ test("a body without a detail falls back to a status line", async () => {);});+test("requests run one at a time, in call order, and a failure does not stall the next", async () => {+ // A read sent during a write (Settings > API mounting while Agents saves) must see the write.+ const started: string[] = [];+ const pending: (() => void)[] = [];+ const api = loadWithStubs<typeof McpAccessApi>(+ new URL("../src/features/settings/api/mcp-access.ts", import.meta.url),+ {+ "@/features/auth": {+ authFetch: (_path: string, init?: RequestInit) => {+ started.push(init?.method ?? "GET");+ return new Promise<Response>((resolve) =>+ pending.push(() =>+ resolve(+ started.length === 1+ ? new Response("down", { status: 502 })+ : Response.json(BODY),+ ),+ ),+ );+ },+ },+ "@/lib/format-fastapi-error": formatFastApiError,+ },+ );+ const tick = () => new Promise((resolve) => setTimeout(resolve, 0));+ const write = api.updateMcpTools({ cancel: false });+ const read = api.loadMcpAccess();+ await tick();+ assert.deepEqual(started, ["PUT"]);+ pending.shift()?.();+ await assert.rejects(write, /Failed to update agent access tools \(502\)/);+ await tick();+ assert.deepEqual(started, ["PUT", "GET"]);+ pending.shift()?.();+ assert.equal((await read).enabled, true);+});+test("the client is built on authFetch and readFastApiError", () => {assert.match(API, /import \{ authFetch \} from "@\/features\/auth";/);assert.match(API, /readFastApiError\(res, /);diff --git a/studio/frontend/tests/mcp-access-section.test.ts b/studio/frontend/tests/mcp-access-section.test.tsindex 7387405af09..96c08eb8981 100644--- a/studio/frontend/tests/mcp-access-section.test.ts+++ b/studio/frontend/tests/mcp-access-section.test.ts@@ -24,20 +24,24 @@ import { readSrc } from "./helpers/kit.ts";const SECTION = readSrc("features/settings/components/mcp-access-section.tsx");const API_TAB = readSrc("features/settings/tabs/api-keys-tab.tsx");+const AGENTS_TAB = readSrc("features/settings/tabs/agents-tab.tsx");const TUNNEL_PREF = readSrc("features/settings/components/tunnel-preference.ts",);+const DIALOG_STORE = readSrc("features/settings/stores/settings-dialog-store.ts");+const LOCALES = { ar, de, en, es, fr, he, hi, it, ja, ko, ptBR, ru, sv, zhCN };-test("only the owner sees it, in the access group, and settings search finds it", () => {+test("it ends the Agents tab, the API tab's access group links there for the owner, and settings search finds it", () => {assert.match(- API_TAB,- /\{isOwner \? <McpAccessSection apiKey=\{freshKey\} \/> : null\}/,+ AGENTS_TAB,+ /<CommandBlock command=\{shellCommands\.dryRun\} \/>\s*<\/div>\s*<\/SettingsSection>\s*<SettingsSection title=\{t\("settings\.mcp\.title"\)\}>\s*<McpAccessSection apiKey=\{freshApiKey\} \/>/,);+ assert.doesNotMatch(API_TAB, /McpAccessSection/);assert.match(API_TAB,- /\{isOwner \? <KeylessApiAccessLink \/> : null\}/,+ /\{isOwner \? <UnslothStudioMcpRow \/> : null\}\s*\{isOwner \? <KeylessApiAccessLink \/> : null\}/,);assert.doesNotMatch(SECTION, /useIsAccountOwner/);assert.match(@@ -126,11 +130,26 @@ test("the setup snippet shows only while on, targets the usage examples' address);assert.equal(en.settings.apiKeys.mcp.exportKeyHint,- "Set {name} to an Unsloth API key from this page before you start the agent.",+ "Set {name} to an Unsloth API key before you start the agent.",+ );+ assert.equal(+ en.settings.apiKeys.mcp.description,+ "Let coding agents such as Claude Code and Codex use Unsloth over MCP.",+ );+ assert.equal(+ en.settings.apiKeys.mcp.enableDescription,+ "Serves /mcp/ to requests that carry an Unsloth API key.",);});-test("a key created on this page fills the snippet and is kept out of reload snapshots", () => {+test("a key just created on the API tab fills the Agents tab snippet and is kept out of reload snapshots", () => {+ // Memory only: the fresh-key store holds it; a revoke of that key drops it.+ assert.match(API_TAB, /useFreshApiKeyStore\.getState\(\)\.setKey\(raw\)/);+ assert.match(API_TAB, /useFreshApiKeyStore\.getState\(\)\.forgetIfRevoked\(revokeTarget\.key_prefix\)/);+ assert.match(AGENTS_TAB, /useFreshApiKeyStore\(\(s\) => s\.key\)/);+ assert.match(AGENTS_TAB, /<McpAccessSection apiKey=\{freshApiKey\} \/>/);+ assert.doesNotMatch(DIALOG_STORE, /persist\(/);+ assert.match(SECTION, /apiKey = null,/);assert.match(SECTION, /buildMcpSnippet\(agent, base, os, apiKey\)/);assert.match(SECTION,diff --git a/studio/frontend/tests/mcp-tools-dialog.test.ts b/studio/frontend/tests/mcp-tools-dialog.test.tsnew file mode 100644index 00000000000..6c5eaa86eb2--- /dev/null+++ b/studio/frontend/tests/mcp-tools-dialog.test.ts@@ -0,0 +1,219 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0++// source assertions avoid the auth barrel, which cannot load in this test harness.++import assert from "node:assert/strict";+import test from "node:test";++import {+ MCP_TOOL_DESCRIPTION_KEYS,+ MCP_TOOL_LABEL_KEYS,+ groupMcpTools,+ mcpToolDescriptionKey,+ mcpToolLabelKey,+} from "../src/features/settings/components/mcp-tool-labels.ts";+import { SETTINGS_TABS } from "../src/features/settings/stores/settings-dialog-store.ts";+import { ar } from "../src/i18n/locales/ar.ts";+import { de } from "../src/i18n/locales/de.ts";+import { en } from "../src/i18n/locales/en.ts";+import { es } from "../src/i18n/locales/es.ts";+import { fr } from "../src/i18n/locales/fr.ts";+import { he } from "../src/i18n/locales/he.ts";+import { hi } from "../src/i18n/locales/hi.ts";+import { it } from "../src/i18n/locales/it.ts";+import { ja } from "../src/i18n/locales/ja.ts";+import { ko } from "../src/i18n/locales/ko.ts";+import { ptBR } from "../src/i18n/locales/pt-br.ts";+import { ru } from "../src/i18n/locales/ru.ts";+import { sv } from "../src/i18n/locales/sv.ts";+import { zhCN } from "../src/i18n/locales/zh-CN.ts";+import { readSrc } from "./helpers/kit.ts";++const SECTION = readSrc("features/settings/components/mcp-access-section.tsx");+const TOOLS = readSrc("features/settings/components/mcp-tools-dialog.tsx");+const ROW = readSrc("features/settings/components/unsloth-studio-mcp-row.tsx");+const DIALOG = readSrc("features/settings/settings-dialog.tsx");+const STORE = readSrc("features/settings/stores/settings-dialog-store.ts");++const AREAS: Record<string, string> = {+ studio_status: "status",+ list_models: "models",+ load_model: "models",+ unload_model: "models",+ plan_load: "models",+ download_model: "models",+ chat: "text",+ embed: "text",+ system_one: "text",+ generate_image: "images",+ generate_audio: "audio",+ transcribe: "audio",+ analyze_audio: "audio",+ generate_video: "video",+ run_recipe: "jobs",+ get_job: "jobs",+ datasets: "data",+ start_training: "training",+ list_training_runs: "training",+ export_model: "export",+ list_media: "library",+ voices: "library",+ cancel: "cancel",+};++const LOCALES = { ar, de, en, es, fr, he, hi, it, ja, ko, ptBR, ru, sv, zhCN };++// Same list and order as the backend's tool_catalog().+const CATALOG = Object.keys(AREAS);++function lookup(root: unknown, key: string): unknown {+ return key+ .split(".")+ .reduce<unknown>(+ (node, part) => (node as Record<string, unknown> | undefined)?.[part],+ root,+ );+}++function leaves(node: unknown, prefix = ""): [string, string][] {+ return Object.entries(node as Record<string, unknown>).flatMap(+ ([key, value]) =>+ typeof value === "string"+ ? [[`${prefix}${key}`, value] as [string, string]]+ : leaves(value, `${prefix}${key}.`),+ );+}++test("there is no MCP tab; the settings live on Agents", () => {+ assert.ok(!(SETTINGS_TABS as readonly string[]).includes("mcp"));+ assert.doesNotMatch(DIALOG, /tabs\/mcp-tab|McpServerIcon/);+ assert.equal(lookup(en, "settings.tabs.mcp"), undefined);+});++test("the card shows a tools count and opens the dialog, and an older backend hides both", () => {+ assert.match(SECTION, /\{settings\.tools \? \(\s*<SettingsRow\s+label=\{t\("settings\.mcp\.tools\.title"\)\}/);+ assert.match(SECTION, /t\("settings\.mcp\.tools\.count", \{/);+ assert.match(SECTION, /t\("settings\.mcp\.tools\.choose"\)/);+ assert.match(SECTION, /\{settings\?\.tools \? \(\s*<McpToolsDialog/);+ assert.equal(en.settings.mcp.tools.count, "{on} of {total} on");+});++test("tools fall into the five groups in order, with unknown areas last", () => {+ const tools = Object.entries(AREAS).map(([name, area]) => ({ name, area }));+ const groups = groupMcpTools([...tools, { name: "brand_new", area: "future" }]);+ assert.deepEqual(+ groups.map((group) => [group.id, group.tools.map((tool) => tool.name)]),+ [+ ["models", ["studio_status", "list_models", "load_model", "unload_model", "plan_load", "download_model"]],+ ["generate", ["chat", "embed", "system_one", "generate_image", "generate_audio", "transcribe", "analyze_audio", "generate_video"]],+ ["training", ["start_training", "list_training_runs", "export_model"]],+ ["library", ["datasets", "list_media", "voices"]],+ ["jobs", ["run_recipe", "get_job", "cancel"]],+ ["other", ["brand_new"]],+ ],+ );+ assert.deepEqual(+ groupMcpTools([{ name: "embed", area: "text" }]).map((group) => group.id),+ ["generate"],+ );+ for (const group of groups) {+ assert.equal(typeof lookup(en, group.labelKey), "string", group.labelKey);+ }+});++test("each group and every tool get one row that says what a click does, and every change sends only the changed tools", () => {+ assert.doesNotMatch(TOOLS, /<Switch|groupTurnO|"mixed"/);+ assert.match(TOOLS, /const allOn = on === tools\.length;/);+ assert.match(+ TOOLS,+ /allOn\s+\? "settings\.mcp\.tools\.selectNone"\s+: "settings\.mcp\.tools\.selectAll"/,+ );+ assert.match(+ TOOLS,+ /tools\s+\.filter\(\(tool\) => tool\.enabled === allOn\)\s+\.map\(\(tool\) => tool\.name\),\s+!allOn,/,+ );+ assert.match(TOOLS, /label=\{t\("settings\.mcp\.tools\.allTools"\)\}\s+prominent=\{true\}/);+ assert.match(TOOLS, /t\("settings\.mcp\.tools\.count", \{ on, total: tools\.length \}\)/);+ assert.equal(en.settings.mcp.tools.selectAll, "Select all");+ assert.equal(en.settings.mcp.tools.selectNone, "Select none");+ assert.match(+ TOOLS,+ /onSave\(Object\.fromEntries\(names\.map\(\(name\) => \[name, on\]\)\)\)/,+ );+ assert.match(TOOLS, /moreBelow \? "border-border" : "border-transparent"/);+});++test("each tool is a checkbox pill with its own icon", () => {+ assert.match(+ TOOLS,+ /<button\s+type="button"\s+role="checkbox"\s+aria-checked=\{on\}\s+data-mcp-tool=\{tool\.name\}/,+ );+ assert.match(TOOLS, /onClick=\{\(\) => onToggle\(!on\)\}/);+ for (const name of CATALOG) {+ assert.match(TOOLS, new RegExp(`\\n ${name}: \\w+Icon,`), name);+ }+});++test("saves flip at once, a late reply never undoes a newer change, and a rejected one resyncs", () => {+ const save = SECTION.slice(+ SECTION.indexOf("const saveTools = async"),+ SECTION.indexOf("// subscribe to same-tab tunnel changes"),+ );+ const apply = SECTION.slice(SECTION.indexOf("const apply = async"), SECTION.indexOf("// Settings > API links here"));+ assert.ok(save.indexOf("setSettings((current)") < save.indexOf("updateMcpTools(states)"));+ assert.ok(save.indexOf("updateMcpTools(states)") < save.lastIndexOf("loadMcpAccess()"));+ // The switch and the tools share one request counter, so neither full snapshot undoes the other.+ for (const body of [save, apply]) {+ assert.match(body, /const request = \+\+saveRequest\.current;/);+ assert.match(body, /if \(request === saveRequest\.current\) \{\s+setSettings\(next\);/);+ }+ assert.doesNotMatch(apply, /setSettings\(await/);+ // The API client queues every request (mcp-access-api.test.ts), so no second queue here.+ assert.doesNotMatch(SECTION, /enqueueSave|saveQueue|disabled_tools|disabledTools/);+ assert.match(save, /t\("settings\.mcp\.tools\.saveError"\)/);+});++test("the API tab row matches the keyless link beside it, shows the status as text and jumps to the card on Agents", () => {+ assert.match(ROW, /t\("settings\.mcp\.status\.on"\)/);+ assert.match(ROW, /t\("settings\.mcp\.status\.off"\)/);+ assert.match(ROW, /label=\{t\("settings\.apiKeys\.mcp\.title"\)\}/);+ assert.match(ROW, /openDialog\("agents", \{ scrollTarget: "agents-mcp" \}\)/);+ assert.match(STORE, /"agents-mcp": "agents",/);+ assert.match(SECTION, /scrollTarget !== "agents-mcp" \|\| !loaded/);+ assert.match(SECTION, /consumeScrollTarget\("agents-mcp"\)/);+ assert.equal(en.settings.mcp.apiKeysRow.open, "Open in Agents");+});++test("every catalog tool has a label and a description, and an unknown one falls back to its name", () => {+ for (const [keys, keyOf] of [+ [MCP_TOOL_LABEL_KEYS, mcpToolLabelKey],+ [MCP_TOOL_DESCRIPTION_KEYS, mcpToolDescriptionKey],+ ] as const) {+ assert.deepEqual(Object.keys(keys), CATALOG);+ for (const name of CATALOG) {+ assert.equal(typeof lookup(en, keyOf(name) ?? ""), "string", name);+ }+ assert.equal(keyOf("brand_new_tool"), null);+ assert.equal(keyOf("constructor"), null);+ }+ assert.match(TOOLS, /const label = labelKey \? t\(labelKey\) : tool\.name;/);+});++test("every locale has the same settings.mcp keys with plain copy, and English says Unsloth, not Studio", () => {+ for (const [key, value] of leaves(en.settings.mcp)) {+ assert.doesNotMatch(value, /Studio/, key);+ }+ const keys = leaves(en.settings.mcp)+ .map(([key]) => key)+ .sort();+ for (const [name, locale] of Object.entries(LOCALES)) {+ const copy = lookup(locale, "settings.mcp");+ assert.ok(copy, name);+ const entries = leaves(copy);+ assert.deepEqual(entries.map(([key]) => key).sort(), keys, name);+ for (const [key, value] of entries) {+ assert.doesNotMatch(value, /[;—]/, `${name}: ${key}`);+ }+ }+});diff --git a/studio/frontend/tests/settings-search.test.ts b/studio/frontend/tests/settings-search.test.tsindex 4574a6351cc..c1595ee1214 100644--- a/studio/frontend/tests/settings-search.test.ts+++ b/studio/frontend/tests/settings-search.test.ts@@ -9,6 +9,7 @@ import {createSettingsSearchIndex,renderedSearchEntries,} from "../src/features/settings/settings-search.ts";+import { OWNER_ONLY_SETTINGS_TABS } from "../src/features/settings/settings-tab-visibility.ts";import { en } from "../src/i18n/locales/en.ts";const UPDATE_ENTRY = "settings.about.updates";@@ -136,20 +137,14 @@ test("the endpoint rows are searchable only while Hugging Face serves, as they rconst MCP_ENTRY = "settings.apiKeys.mcp.title";-test("agent access (MCP) is found by the protocol and the agents' names, by the owner only", () => {+test("agent access (MCP) is found at the end of Agents, and on API for the owner, by the protocol and the agents' names", () => {const index = createSettingsSearchIndex({desktop: false,closeToTray: false,menuBarIcon: false,});- assert.ok(index["api-keys"].includes(MCP_ENTRY));- const keywordsKey = SETTINGS_SEARCH_KEYWORDS[MCP_ENTRY];- assert.equal(keywordsKey, "settings.apiKeys.mcp.keywords");- const haystack =- `${en.settings.apiKeys.mcp.title} ${en.settings.apiKeys.mcp.keywords}`.toLowerCase();- for (const term of ["mcp", "claude", "codex", "model context protocol"]) {- assert.ok(haystack.includes(term), `search matches "${term}"`);- }+ assert.equal(index.agents.at(-1), MCP_ENTRY);+ assert.ok(OWNER_ONLY_SETTINGS_TABS.has("agents"));assert.ok(renderedSearchEntries(index, "api-keys", "huggingface", true).includes(MCP_ENTRY,@@ -160,6 +155,13 @@ test("agent access (MCP) is found by the protocol and the agents' names, by theMCP_ENTRY,),);+ const keywordsKey = SETTINGS_SEARCH_KEYWORDS[MCP_ENTRY];+ assert.equal(keywordsKey, "settings.apiKeys.mcp.keywords");+ const haystack =+ `${en.settings.apiKeys.mcp.title} ${en.settings.apiKeys.mcp.keywords}`.toLowerCase();+ for (const term of ["mcp", "claude", "codex", "model context protocol"]) {+ assert.ok(haystack.includes(term), `search matches "${term}"`);+ }});const TOOL_RESULT_LIMIT_ENTRY = "settings.chat.toolResultLimit";diff --git a/unsloth_cli/commands/mcp.py b/unsloth_cli/commands/mcp.pyindex efc3f87568f..430ab245873 100644--- a/unsloth_cli/commands/mcp.py+++ b/unsloth_cli/commands/mcp.py@@ -537,7 +537,7 @@ def mcp_verdict(facts: McpFacts) -> Tuple[bool, List[str], List[str]]:"error": f"Unsloth Studio failed while checking the key: {facts.key_detail}",}mcp_hints = {- "off": "Turn on Settings → API → Allow agent connections, or start Unsloth Studio "+ "off": "Turn on Settings → Agents → Allow agent connections, or start Unsloth Studio ""with UNSLOTH_STUDIO_ENABLE_MCP=1.","absent": "This Unsloth Studio has no MCP server. Update it: unsloth studio update","refused": f"The MCP server refused the key: {facts.mcp_detail}",diff --git a/unsloth_cli/tests/test_doctor_mcp.py b/unsloth_cli/tests/test_doctor_mcp.pyindex fdc06915a30..905a8a124d8 100644--- a/unsloth_cli/tests/test_doctor_mcp.py+++ b/unsloth_cli/tests/test_doctor_mcp.py@@ -48,7 +48,7 @@ def _facts(**kw):(_facts(key = "missing", mcp = "refused"), "Set UNSLOTH_API_KEY"),(_facts(key = "invalid", mcp = "refused"), "refused the key in UNSLOTH_API_KEY"),(_facts(key = "error", key_detail = "500 boom"), "500 boom"),- (_facts(mcp = "off"), "Allow agent connections"),+ (_facts(mcp = "off"), "Settings → Agents → Allow agent connections"),(_facts(mcp = "absent"), "unsloth studio update"),(_facts(mcp = "refused", mcp_detail = "Workflow keys cannot use"), "Workflow keys cannot use"),(_facts(mcp = "error", mcp_detail = "timed out"), "timed out"),