MCP HuggingFetch
MCP HuggingFetch enables high-speed downloading and management of HuggingFace models at 3-5x faster speeds through concurrent downloads, resume support, and intelligent retries.
Core Features:
Download Models: Fetch HuggingFace models with specific file selection, revision control, and pattern-based filtering
List Repository Files: Browse contents including file paths, sizes, and types with sorting options (by size, name, or type)
Advanced Filtering: Include/exclude files using glob patterns (e.g.,
*.json,*.safetensors) and filter by sub-pathsFlexible Configuration: Choose custom download directories, specific Git branches/tags/commits, and force redownload options
Reliability Features: Resume interrupted downloads and automatic retry for failed transfers
Authentication: Access private repositories using HuggingFace tokens via environment variables
Enables downloading and managing models from HuggingFace repositories, with support for file filtering, size limits, and selective downloads
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., "@MCP HuggingFetch download the ChatTTS model to ./models, only .bin files"
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.
MCP HuggingFace Fast Download Tool
⚡ High-speed HuggingFace model downloads with concurrent downloading, resume support, and intelligent retry - 3-5x faster than traditional methods. Supports Claude Desktop, Claude Code, Cursor, VS Code, and other clients.
中文版 | 日本語 | Français | Deutsch
📋 Quick Setup
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"huggingfetch": {
"command": "npx",
"args": ["-y", "mcp-huggingfetch@latest"],
"env": {
"HUGGINGFACE_TOKEN": "your_token_here"
}
}
}
}Claude Code
Add to .claude/claude_config.json:
{
"mcpServers": {
"huggingfetch": {
"command": "npx",
"args": ["-y", "mcp-huggingfetch@latest"],
"env": {
"HUGGINGFACE_TOKEN": "your_token_here"
}
}
}
}Cursor / VS Code (Continue Extension)
Add to config.json:
{
"mcp": [
{
"name": "huggingfetch",
"command": "npx",
"args": ["-y", "mcp-huggingfetch@latest"],
"env": {
"HUGGINGFACE_TOKEN": "your_token_here"
}
}
]
}Related MCP server: mcp-hfspace MCP Server
🔑 Get HuggingFace Token
Visit HuggingFace Settings
Create a new Access Token
Copy the token to
HUGGINGFACE_TOKENin the above configuration
🛠 Usage
After configuration, use the following features directly in conversations:
📋 List Files
View and filter repository files:
List JSON files in the 2Noise/ChatTTS repository🔍 Explore Repository
Understand repository structure:
Explore the directory structure of microsoft/DialoGPT-medium🔎 Search Files
Find specific files by name:
Search for config files in openai/whisper-large-v3📥 Download Models
Selectively download required files:
Please download the ChatTTS model to ./models directoryDownload microsoft/DialoGPT-medium model, only .bin filesDownload openai/whisper-large-v3 model, exclude test files📝 Available Tools
File Listing (list_huggingface_files)
List and filter repository files with pattern matching and sorting.
Parameter | Type | Description | Default |
| string | HuggingFace repository ID | - |
| string | Git branch/tag |
|
| string | File filter pattern (glob) | - |
| string | Exclusion pattern | - |
| number | Maximum files to return |
|
| string | Sort by: |
|
Repository Explorer (explore_huggingface_repo)
Explore repository structure and get hierarchical file tree.
Parameter | Type | Description | Default |
| string | HuggingFace repository ID | - |
| string | Git branch/tag |
|
| number | Maximum scan depth |
|
| boolean | Generate ASCII tree view |
|
File Search (search_huggingface_files)
Search files by name or pattern within repository.
Parameter | Type | Description | Default |
| string | HuggingFace repository ID | - |
| string | Search keyword or pattern | - |
| string | Git branch/tag |
|
| number | Maximum results to return |
|
Download Tool Options (download_huggingface_model)
Parameter | Type | Description | Example |
| string | HuggingFace repository ID |
|
| string | Download directory |
|
| array | Specific file list |
|
| string/array | Include patterns |
|
| string/array | Exclude patterns |
|
| string | Git branch/tag |
|
| boolean | Force re-download |
|
🔧 Environment Variables
Variable | Required | Default | Description |
| ✅ | - | HuggingFace access token |
| ❌ |
| Default download directory |
| ❌ |
| Cache directory |
| ❌ |
| Log level ( |
❓ FAQ
Q: Token authentication failed, what should I do?
A: Check if HUGGINGFACE_TOKEN is correctly set, ensure the token is valid and has sufficient permissions.
Q: Download speed is slow, what can I do?
A: The tool supports resume downloads and concurrent downloading. Network issues may cause slow speeds, automatic retry will occur.
Q: How to download private models?
A: Ensure your HuggingFace account has access permissions and use a valid token.
Q: What file formats are supported?
A: All file formats on HuggingFace are supported, including .pt, .bin, .safetensors, .json, .txt, etc.
🏗 Development
Prerequisites
Node.js 18+
npm or yarn
Installation
git clone https://github.com/freefish1218/mcp-huggingfetch.git
cd mcp-huggingfetch
npm installDevelopment Commands
npm run dev # Run with file watching
npm start # Run the MCP server
npm run test:basic # Run basic functionality tests
npm test # Run Jest unit tests
npm run lint # Check code style
npm run lint:fix # Auto-fix linting issuesRelease Commands
npm run release:patch # Release patch version (1.0.0 -> 1.0.1)
npm run release:minor # Release minor version (1.0.0 -> 1.1.0)
npm run release:major # Release major version (1.0.0 -> 2.0.0)The release scripts will automatically:
Run tests and linting
Update version number
Create git tag
Push to GitHub
Publish to npm
For more details, see Release Guide
Building
npm run build # Build single binary
npm run build:all # Build for all platforms (Linux, macOS, Windows)📄 License
MIT License - see LICENSE file for details.
📖 Links
GitHub: freefish1218/mcp-huggingfetch
Issues: Report Issues
NPM: mcp-huggingfetch
🤝 Contributing
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
Available Tools
4 toolsdownload_huggingface_modelC
⚡ 高速下载 HuggingFace 模型到本地
Inputs: repo_id (required), download_dir, revision, pattern, +5 more.
explore_huggingface_repoB
探索 HuggingFace 仓库的目录结构,返回层级化的文件树
Inputs: repo_id (required), revision, max_depth, tree_view.
list_huggingface_filesC
列出 HuggingFace 仓库中的文件,支持过滤和排序
Inputs: repo_id (required), revision, pattern, exclude, +3 more.
search_huggingface_filesC
在 HuggingFace 仓库中搜索特定文件
Inputs: repo_id (required), query (required), revision, max_results.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
The tools have overlapping purposes that could cause confusion. 'explore_huggingface_repo' and 'list_huggingface_files' both deal with repository file listings, though 'explore' emphasizes hierarchical structure while 'list' focuses on filtering and sorting. 'search_huggingface_files' is distinct for searching, but the boundary between listing and exploring is unclear without more context in descriptions.
Tool names follow a highly consistent verb_noun pattern with 'huggingface' as a common prefix. All tools use snake_case and start with an action verb (download, explore, list, search) followed by the target noun, making them predictable and easy to understand.
Four tools is a reasonable number for a server focused on HuggingFace operations, covering downloading, exploring, listing, and searching. It's slightly thin but well-scoped for basic interactions, with no obvious bloat or missing core functions given the domain.
The tool set covers key operations for accessing HuggingFace repositories but has notable gaps. There's no support for uploading, updating, or deleting models/files, and no tools for model inference or metadata retrieval, which are common in HuggingFace workflows. This limits agents to read-only and download tasks.
Maintenance
Related MCP Connectors
Add any agent you deploy on ibl.ai to Claude Code, Cursor or Claude Desktop and talk to it there.
Use your Mac, Windows or Linux computer from ChatGPT, Claude or Codex: files, commands, documents.
Persistent memory for Claude Code and Cursor. Stop re-explaining your project every session.
Your own computer's files from ChatGPT or Claude: folder rules, confirmations and undo.
Related MCP Servers
- AlicenseCqualityDmaintenanceUse HuggingFace Spaces directly from Claude. Use Open Source Image Generation, Chat, Vision tasks and more. Supports Image, Audio and text uploads/downloads.3425 npm388MIT
- AlicenseCqualityDmaintenanceConnects Claude Desktop to Hugging Face Spaces with minimal setup, enabling capabilities like image generation, vision tasks, text-to-speech, and chat with AI models.3425 npmMIT
- AlicenseBqualityDmaintenanceEnables Claude Desktop to download files from web URLs with automatic browser fallback for JavaScript-heavy sites. Supports smart redirect handling, custom file naming, and cross-platform compatibility.110 npm4MIT
- AlicenseNot gradedqualityNot gradedmaintenanceEnables access to 200,000+ machine learning models through the Hugging Face Inference API. Supports text generation, image creation, classification, translation, speech processing, embeddings, and more AI tasks.-