ML Intern MCP
OfficialProvides tools for reading public Hugging Face Hub files and papers, inspecting model checkpoints and datasets, managing repositories, and running and controlling Hugging Face Jobs and sandboxes.
Provides tools for interacting with Modal Sandboxes, including checking status, executing commands, and reading/writing files.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ML Intern MCP read google-bert/bert-base-uncased config and tell me how many layers it has"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ML Intern MCP
Use HuggingChat’s ML Intern tools from GitHub Copilot or Codex to read papers, inspect model checkpoints and datasets, and run Hugging Face Jobs.
Bring your own sandbox (BYOS). Run commands and work with files on an existing Hugging Face sandbox, exe.dev VM, or Modal Sandbox. You control its lifetime and cost. Disconnecting leaves it running.
Install
Run the command for your client in a macOS or Linux terminal. It downloads the server and a private runtime, then registers it with the client. The second line opens a chat and asks it to read a public model config. The expected answer is 12 layers.
GitHub Copilot CLI
curl -fsSL https://github.com/candacelabs/ml-intern-mcp/releases/latest/download/install.sh | sh -s -- copilot
copilot -i 'Use ML Intern to read google-bert/bert-base-uncased/config.json. How many transformer layers does it have?'GitHub Copilot in VS Code
curl -fsSL https://github.com/candacelabs/ml-intern-mcp/releases/latest/download/install.sh | sh -s -- vscode
code chat --mode agent 'Use ML Intern to read google-bert/bert-base-uncased/config.json. How many transformer layers does it have?'Codex
curl -fsSL https://github.com/candacelabs/ml-intern-mcp/releases/latest/download/install.sh | sh -s -- codex
codex 'Use ML Intern to read google-bert/bert-base-uncased/config.json. How many transformer layers does it have?'Client | Check | Install |
Copilot CLI |
|
|
Codex |
|
|
VS Code on macOS with Homebrew |
|
|
VS Code on Linux with Snap |
|
|
If a freshly installed CLI is outside this shell’s path, use export PATH="$HOME/.local/bin:$PATH". For an existing macOS VS Code app, use export PATH="/Applications/Visual Studio Code.app/Contents/Resources/app/bin:$PATH". The CLI sign-in commands are copilot login and codex login. Copilot installation · Codex installation · VS Code on Linux
Related MCP server: hf-mcp-server
Work with an existing sandbox
This example connects Copilot to an existing exe.dev VM. In Bash or Zsh, the first prompt reads your token without displaying it. The installer saves the variable name, and Copilot passes its value when starting the server.
printf 'exe.dev token: '; IFS= read -rs EXE_TOKEN; printf '\n'; export EXE_TOKEN
printf 'VM name: '; IFS= read -r EXE_VM
curl -fsSL https://github.com/candacelabs/ml-intern-mcp/releases/latest/download/install.sh | sh -s -- copilot exe.dev
copilot -i "Use ML Intern to run pwd on my exe.dev VM named $EXE_VM."Installer argument | Existing sandbox | Credentials |
| Dedicated Hugging Face sandbox Job you own or created, identified by | Its original |
| VM name, such as |
|
| Modal Sandbox ID beginning with |
|
These Bash/Zsh examples register the client and launch it with the credentials for that provider.
Hugging Face with Copilot CLI
printf 'Original HF sandbox token: '; IFS= read -rs HF_TOKEN; printf '\n'; export HF_TOKEN
printf 'Namespace/job ID: '; IFS= read -r HF_SANDBOX_ID
curl -fsSL https://github.com/candacelabs/ml-intern-mcp/releases/latest/download/install.sh | sh -s -- copilot hf
copilot -i "Check the status of my Hugging Face sandbox $HF_SANDBOX_ID."Modal with Codex
printf 'Modal token ID: '; IFS= read -r MODAL_TOKEN_ID; export MODAL_TOKEN_ID
printf 'Modal token secret: '; IFS= read -rs MODAL_TOKEN_SECRET; printf '\n'; export MODAL_TOKEN_SECRET
printf 'Modal sandbox ID: '; IFS= read -r MODAL_SANDBOX_ID
curl -fsSL https://github.com/candacelabs/ml-intern-mcp/releases/latest/download/install.sh | sh -s -- codex modal
codex "Check the status of my Modal sandbox $MODAL_SANDBOX_ID."One registration can forward multiple providers’ credentials.
curl -fsSL https://github.com/candacelabs/ml-intern-mcp/releases/latest/download/install.sh | sh -s -- copilot hf exe.dev modalFor an existing Hugging Face app connection in Codex, this companion adds public reads while the connected app handles identity and Jobs.
curl -fsSL https://github.com/candacelabs/ml-intern-mcp/releases/latest/download/install.sh | sh -s -- codex public-filesProvider examples and client settings
Public preview. All three providers passed fixture tests. Live sandbox execution still needs verification.
The installer supports Apple Silicon and Intel Macs, and x64 and ARM64 Linux with glibc. It also supports x64 Linux with musl. It verifies the downloads and installs under $XDG_DATA_HOME/ml-intern-mcp, defaulting to ~/.local/share/ml-intern-mcp. The same install command upgrades the client’s registration. For another stdio client, the standalone installer prints the executable path. These commands display its version and run it in BYOS mode.
ml_intern=$(curl -fsSL https://github.com/candacelabs/ml-intern-mcp/releases/latest/download/install.sh | sh -s -- standalone)
"$ml_intern" --version
"$ml_intern" --byosFor an existing shared MCP endpoint, this registers its HTTPS URL with Copilot CLI.
printf 'MCP endpoint URL: '; IFS= read -r MCP_URL
copilot mcp add --transport http ml-intern-remote "$MCP_URL"Shared endpoint examples for Copilot and Codex · Installer source · Release downloads
Sandbox tools
Every call takes a provider and sandboxId and returns both in the result. Files persist between calls in the same running sandbox. Each command starts a fresh shell.
Tool | What you supply | What you get back |
| Just the provider and ID |
|
| A |
|
| An absolute | UTF-8 |
| An absolute | Number of |
The example runner sends a tools/call request like this one.
{
"name": "sandbox_exec",
"arguments": {
"provider": "exe.dev",
"sandboxId": "my-research-vm",
"command": "printf ml-intern-ok",
"timeoutSeconds": 10
}
}A successful response has this structuredContent.
{
"provider": "exe.dev",
"sandboxId": "my-research-vm",
"stdout": "ml-intern-ok",
"stderr": "",
"exitCode": 0,
"timedOut": false
}Commands have a 30-second default timeout, a 55-second maximum, and a 1 MiB limit on each output stream. A nonzero exit code is part of the result. Provider failures return MCP tool errors.
Reads default to 20,000 bytes. Each file call can transfer up to 100,000 UTF-8 bytes. The following command writes
hello\nto the scratch file and reads it back. It replaces any existing file at that path. It uses the exe.dev token and VM name from the example above.
ml_intern="${XDG_DATA_HOME:-$HOME/.local/share}/ml-intern-mcp/current/ml-intern-mcp"
"$ml_intern" example exe.dev "$EXE_VM" --write-path /tmp/ml-intern-example.txtSandbox input and output schemas
Deployment and development
Mode | Tools available |
Default, anonymous |
|
Default, verified Hub credential | The public tools plus |
|
|
| The caller’s Hub tools plus the four sandbox tools above |
The standalone executable serves stdio by default. This starts Streamable HTTP with BYOS on loopback.
ml_intern="${XDG_DATA_HOME:-$HOME/.local/share}/ml-intern-mcp/current/ml-intern-mcp"
"$ml_intern" --http --byosIn another terminal, these commands check listener health and probe an existing sandbox. The probe uses the same EXE_TOKEN and EXE_VM as the exe.dev example above.
curl -fsS http://127.0.0.1:8787/healthz
"${XDG_DATA_HOME:-$HOME/.local/share}/ml-intern-mcp/current/ml-intern-mcp" example exe.dev "$EXE_VM" --url http://127.0.0.1:8787/mcpOn the gateway host, this starts the backend for a public HTTPS origin. The origin is the scheme and hostname clients use, such as https://mcp.example.com.
printf 'Public HTTPS origin: '; IFS= read -r MCP_ORIGIN
"${XDG_DATA_HOME:-$HOME/.local/share}/ml-intern-mcp/current/ml-intern-mcp" --http --byos \
--host 127.0.0.1 --port 8787 --public-origin "$MCP_ORIGIN"The gateway supplies TLS and authentication, preserves Host, Origin, and streaming responses, and keeps credential headers out of logs. Gateway Authorization and per-caller provider headers serve different purposes. A gateway that injects credentials must overwrite client-supplied values. The MCP listener checks host and browser origin and drains active requests for up to 15 seconds on SIGTERM. Client connection commands
The server runs Hugging Face’s pinned intern handlers. Both transports use the same generated tool definitions. The generated client factories are createMlInternClient for Hub tools and createByosClient for sandbox tools. Hub contract · Sandbox contract · Generated clients
Source development uses Git and Node.js 22.14 or newer. With the nvm version manager, the command for the Node 22 development toolchain is nvm install 22.
git clone https://github.com/candacelabs/ml-intern-mcp.git
cd ml-intern-mcp
npm ciA Linux maintainer can build the release assets with scripts/build-release.sh ./dist.
Command | Checks |
| Generated bindings and types, stdio and HTTP, caller isolation, provider fixtures, and runnable examples |
| HuggingChat’s current preset, live public tool schemas and a pinned BERT file, plus nine tool schemas and 15 Jobs operations from the pinned package |
| Health, shell, and root directory metadata on your existing sandbox via Hugging Face’s native tools |
| Your provider’s status and command execution on an existing sandbox |
Verified in v0.3.1. On Linux x64, all three clients registered the public release in an environment without Node.js, npm, or Git on the path. Copilot CLI discovered the installed tools and read the live public BERT checkpoint using a test model to request the call. Provider sandbox operations passed against fixtures. Live sandbox execution and installation on macOS and ARM remain unverified.
After a pin change, these commands capture the schemas, show the changes, regenerate the clients, and verify the result.
npm run capture
git diff -- openapi.yaml byos.openapi.yaml
npm run generate && npm test && npm run check:driftHuggingChat preset · Upstream Hub tools · License notices
License
The project’s original code is licensed under Apache 2.0. Third-party components retain their own licenses. Project license · Upstream notices
Available Tools
3 toolshf_fsHugging Face Hub: Find, use and view models, datasets, spaces, buckets, papers, documentation and collections. Get daily papers reports, and browse trending content. ARead-only
When to use: Hugging Face Hub models, datasets, Spaces, collections, papers, daily papers, today's trending models, current paper leaderboard, docs; list and read repository files, model and dataset cards (README, license).
Examples: {"operations":[{"cmd":"ls","args":["hf://models/trending","--limit","10"]}]} {"operations":[{"cmd":"ls","args":["hf://papers/trending"]}]} {"operations":[{"cmd":"ls","args":["hf://papers/daily/latest"]}]} {"operations":[{"cmd":"cat","args":["hf://papers/2501.00001/paper.md"]}]} {"operations":[{"cmd":"search","args":["hf://models","--tag","base_model:finetune:org/repo"]}]}
Use hf_fs for Hugging Face Hub filesystem operations. Call it with operations, an array of {cmd, args} items; multiple operations may be submitted together.
Usage: {"operations":[{"cmd":"ls","args":["hf://models/org/repo"]}]}
Grammar; each string below is one args array item: ls URI [--recursive] [--glob GLOB] [--type TYPE] [--sort SORT] [--limit N] cat URI [--offset N] [--max-bytes N] attach URI [--max-bytes N] stat URI find URI [--name GLOB] [--path GLOB] [--type TYPE] [--limit N] search URI [QUERY] [--type TYPE] [--sort SORT] [--tag TAG] [--kind mcp] [--limit N]
COMMAND = ls|cat|attach|stat|find|search. TYPE = file|dir|repo|bucket|collection|paper|link. SORT = createdAt|downloads|likes|lastModified|likes30d|trendingScore|mainSize|id|trending|upvotes. URI is a canonical hf:// URI. QUERY and GLOB are each one string.
Use search for resource discovery, not repository-content search; ls for a known directory, find for recursive file discovery by name/path (not file contents), stat for filesystem metadata or an uncertain target type, cat for text contents, and attach for a complete JPEG, PNG, or WebP image. When the request gives an exact text-file URI, use cat directly; do not add ls or stat first. stat does not read the contents of JSON, Markdown, or other text files.
Search scopes: hf://models[/OWNER], hf://datasets[/OWNER], hf://spaces[/OWNER], hf://collections[/OWNER], hf://papers, and hf://docs[/...]. Repository and repository-file scopes are not supported: search a resource root or owner scope to discover resources; use find for file discovery within a repository or cat for a known text file. Paper and documentation search require QUERY. --tag filters models, datasets, and Spaces by Hub tag (repeatable; all must match) and applies only to hf://models|datasets|spaces[/OWNER]; omit QUERY when the tag already identifies the target, because QUERY also filters repository names. Derived models carry base_model:ID and base_model:RELATION:ID tags, where RELATION is finetune, adapter, merge, or quantized. --kind applies only to hf://spaces[/OWNER]; the only valid --kind value is mcp, which selects MCP Spaces. Tag families are documented at hf://README.md. Use ls hf://models/trending, hf://datasets/trending, hf://spaces/trending, or hf://papers/trending for trending listings. hf://papers/ID is a paper directory, not paper text. Use cat hf://papers/ID/paper.md for paper text and cat hf://papers/ID/metadata.json for metadata. No preliminary listing is needed for these known paths. Use ls hf://papers/ID to discover other resources. Omit --limit, --sort, and --type unless the request requires them. Limits and path-specific behavior are documented at hf://README.md. Issue one hf_fs call.
Links: hf://models|datasets|spaces/OWNER/NAME/PATH maps to https://huggingface.co[/datasets|/spaces]/OWNER/NAME/resolve/main/PATH (buckets: https://huggingface.co/buckets/OWNER/NAME/resolve/PATH); URL-encode each path segment. arXiv ids (for example 2502.16161) link papers, models and datasets.
Inputs: operations (required). Returns: results, truncated, truncation_reason
hf_whoamiHugging Face User InfoARead-only
Inspect the current Hugging Face authentication context, including the account, visible organization memberships, and credential access details. Read-only and never returns credential values.
Inputs: no named parameters. Returns: object
hub_repo_detailsHub Repository DetailsARead-only
Get details for one or more Hugging Face repos (model, dataset, or space): card metadata, license, downloads, files, Space hardware/status, dataset configs, splits, columns and preview rows. Auto-detects type unless specified. For datasets, use operations: overview, dataset_structure, dataset_preview. Use dataset_structure first to discover configs, splits, sizes, and schema. Use dataset_preview only when config and split are known, unless the dataset has a single config/split.
Inputs: repo_ids (required), limit, split, config, +3 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
The three tools have mostly distinct high-level roles: auth inspection, structured repo/dataset details, and generic Hub filesystem operations. There is some overlap because hf_fs can also list/read repo files and cards, which hub_repo_details also exposes, but the descriptions make the intended split reasonably clear.
All names use snake_case, but the conventions are mixed: hf_whoami is an action, hub_repo_details is a noun phrase with a different prefix, and hf_fs is an abbreviated noun. The set is readable but does not follow a single predictable pattern.
Three tools is within the reasonable range and each has a clear role. However, hf_fs is very broad with many commands and scopes, so the surface feels somewhat collapsed into one mega-tool rather than cleanly separated capabilities.
The read-only Hugging Face Hub surface is strong: auth context, repo metadata, dataset structure/preview, filesystem browsing, search, papers, docs, and trending listings are covered. Minor gaps remain around write/upload operations and deeper dataset querying beyond preview, but core exploration workflows are covered.
Maintenance
Related MCP Connectors
Operate GitHub from your AI assistant: repos, PRs, issues, Actions. Previews and read-only mode.
Use your Mac, Windows or Linux computer from ChatGPT, Claude or Codex: files, commands, documents.
Persistent cloud workspaces for AI agents: run commands, edit files, use git and a browser.
Connect to Hugging Face Hub and thousands of Gradio AI Applications
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides direct access to the Hugging Face Hub for searching models and datasets, fetching metadata, and running inference on text, images, and audio.MIT
- AlicenseNot gradedqualityDmaintenanceConnects LLMs to the Hugging Face Hub and thousands of Gradio AI applications, enabling repository search, file access, Space interaction, jobs, and sandbox tools through MCP. Supports STDIO and Streamable HTTP transports with optional Hugging Face authentication.MIT
- AlicenseAqualityBmaintenanceEnables local AI agents to manage GitHub Codespaces workspaces and execute remote tasks by checking out exact commits, running builds, tests, scripts or temporary services, downloading logs and artifacts, and stopping or exporting managed environments.121MIT
- AlicenseNot gradedqualityBmaintenanceEnables Codex conversations to delegate tasks to persistent worker subagents backed by models configured in VS Code, including BYOK endpoints. Provides workspace inspection and controlled editing tools, approval-gated shell commands, transcripts, and worker lifecycle management.1MIT