unsloth/studio/backend/core
Daniel Han 4b6a733fc3
Studio: harden stdio MCP gating and fix transport edge cases (#5892)
* Studio: harden stdio MCP gating and fix transport edge cases

- Gate the Data Recipe stdio path behind UNSLOTH_STUDIO_ALLOW_STDIO_MCP so a hosted deployment cannot spawn local processes through recipes
- Enforce the gate inside _client() so the transport sink cannot spawn when disabled
- keep_alive=False so stdio probes/calls do not leave orphan subprocesses
- Force OAuth off for stdio servers on create and update
- Drop stored headers when a server switches transport type
- Reject a command whose first token is a URL scheme
- Add MCP gate and improvement tests

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* tests: skip Data Recipe stdio tests when data_designer is absent

The data_designer plugin is only installed in the Studio test job, so guard
the two build_mcp_providers tests with importorskip so the core matrix skips
them instead of failing on ModuleNotFoundError.

---------

Co-authored-by: Daniel Han <michaelhan2050@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-05-31 04:38:52 -07:00
..
data_recipe Studio: harden stdio MCP gating and fix transport edge cases (#5892) 2026-05-31 04:38:52 -07:00
export studio: ROCm cleanups follow-up to #5301 (#5874) 2026-05-30 03:06:47 -07:00
inference Studio: harden stdio MCP gating and fix transport edge cases (#5892) 2026-05-31 04:38:52 -07:00
training studio: ROCm cleanups follow-up to #5301 (#5874) 2026-05-30 03:06:47 -07:00
__init__.py [Studio] Show non exported models in chat UI (#4892) 2026-04-14 15:03:58 +04:00
_torchao_stub.py studio: ROCm cleanups follow-up to #5301 (#5874) 2026-05-30 03:06:47 -07:00
tool_healing.py Studio: add remote MCP server support (#5750) 2026-05-27 07:01:11 -07:00