Skip to content

[Feature] Support stdio MCP servers via a config file #5936

Closed

Description

@shashwata2020

Summary

Unsloth Studio currently only supports remote MCP servers added via HTTP/SSE URLs through the UI. Please add support for the standard stdio transport, configured via a JSON file — the same format already used by LM Studio, Claude Desktop, OpenCode, VS Code, Cursor, Windsurf, and every other major AI client.

Current behavior

The only way to connect MCP servers in Unsloth Studio is:

  1. Run the MCP server yourself as an HTTP/SSE process on a local port
  2. Manually add http://localhost:PORT/sse for each server through the UI dialog

This means locally installed stdio-based servers (node scripts, python scripts, uv-managed tools) cannot be used directly. Users must run a separate bridge tool (e.g. supergateway) to wrap each stdio server as an HTTP server, manage bridge processes every session, and register each URL manually in the UI.

Desired behavior

Support a mcp_servers.json config file (e.g. at ~/.unsloth/mcp_servers.json) that follows the same standard format the rest of the ecosystem uses:

{
  "mcpServers": {
    "desktop-commander": {
      "command": "node",
      "args": [
        "C:\\Users\\user\\Documents\\DesktopCommanderMCP\\dist\\index.js",
        "--no-onboarding"
      ],
      "env": {
        "NODE_ENV": "production"
      }
    },
    "filesystem": {
      "command": "node",
      "args": [
        "C:\\Users\\user\\AppData\\Roaming\\npm\\node_modules\\@modelcontextprotocol\\server-filesystem\\dist\\index.js",
        "D:\\",
        "O:\\"
      ]
    },
    "playwright": {
      "command": "node",
      "args": [
        "C:\\Users\\user\\AppData\\Roaming\\npm\\node_modules\\@playwright\\mcp\\cli.js",
        "--headless"
      ]
    },
    "word-document-server": {
      "command": "C:\\Users\\user\\Documents\\Office-Word-MCP-Server\\.venv\\Scripts\\python.exe",
      "args": [
        "C:\\Users\\user\\Documents\\Office-Word-MCP-Server\\word_mcp_server.py"
      ],
      "env": {
        "PYTHONPATH": "C:\\Users\\user\\Documents\\Office-Word-MCP-Server",
        "MCP_TRANSPORT": "stdio"
      }
    }
  }
}

Unsloth Studio would spawn and manage these processes internally — the same way Claude Desktop, LM Studio, and VS Code already do — and expose them in the MCP panel alongside any URL-based servers. Users with existing configs from other tools could copy their mcpServers block directly without any changes.

Why this matters

Stdio is the dominant MCP transport for local servers. It requires no open ports, no auth, no bridge processes, and no network. Every locally installed MCP server (filesystem access, local tools, python scripts, node scripts) uses stdio. The current URL-only approach forces users into significant workarounds just to use tools that are already installed on their machine.

Every other client that supports MCP implements both transports. Unsloth Studio is currently the only one that does not.

References

Activity

  1. added
    feature request
    on Jun 1, 2026
  2. rolandtannous commented on Jun 2, 2026

    @rolandtannous
    Contributor

    #5863 added native stdio MCP support.
    the code spawns local processes via fastmcp's StdioTransport directly, gated by UNSLOTH_STUDIO_ALLOW_STDIO_MCP=1 (set automatically by the desktop app). So no supergateway bridge is needed anymore to run a stdio server.
    will look into config file integration

  3. rolandtannous commented on Jun 3, 2026

    @rolandtannous
    Contributor

    @shashwata2020 can you please help test #5943 to confirm that it works for you?

  4. shashwata2020 commented on Jun 3, 2026

    @shashwata2020
    Author

    @rolandtannous the stdio mcp server import via config file works. But there is a big ux bug.

    Image

    As you can see there is no option to import all the configured mcp servers.

    Image

    But right after adding one mcp server with command the option is available

    Image

    And using the option all the configured mcp servers can be imported.

    Image

    Another thing worth mentioning is that the model (Qwen 3.6 35b a3b) does not reason between tool calls, which is not the usual behavior.

    Image

    Also when tools are active, reasoning does not stream (very old bug)

  5. Imagineer99 commented on Jun 11, 2026

    @Imagineer99
    Member

    Added in #6030

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

feature request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions