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
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
:
Claude Code
Add to .claude/claude_config.json
:
Cursor / VS Code (Continue Extension)
Add to config.json
:
🔑 Get HuggingFace Token
- Visit HuggingFace Settings
- Create a new Access Token
- Copy the token to
HUGGINGFACE_TOKEN
in the above configuration
🛠 Usage
After configuration, use the following features directly in conversations:
📋 List Files
View repository files before downloading:
📥 Download Models
Selectively download required files:
📝 Supported Features
List Tool Options (list_huggingface_files
)
Parameter | Type | Description | Example |
---|---|---|---|
repo_id | string | HuggingFace repository ID | "2Noise/ChatTTS" |
revision | string | Git branch/tag | "main" , "v1.0" |
path | string | Repository sub-path | "models/" |
pattern | string | File name filter pattern | "*.json" , "*.safetensors" |
sort_by | string | Sort method | "size" , "name" , "type" |
Download Tool Options (download_huggingface_model
)
Parameter | Type | Description | Example |
---|---|---|---|
repo_id | string | HuggingFace repository ID | "2Noise/ChatTTS" |
download_dir | string | Download directory | "./models" |
files | array | Specific file list | ["model.bin", "config.json"] |
allow_patterns | string/array | Include patterns | "*.json" or ["*.pt", "*.bin"] |
ignore_patterns | string/array | Exclude patterns | "test_*" or ["*.onnx", "test_*"] |
revision | string | Git branch/tag | "main" , "v1.0" |
force_redownload | boolean | Force re-download | true , false |
🔧 Environment Variables
Variable | Required | Default | Description |
---|---|---|---|
HUGGINGFACE_TOKEN | ✅ | - | HuggingFace access token |
HUGGINGFETCH_DOWNLOAD_DIR | ❌ | ~/Downloads/huggingface_models | Default download directory |
HF_HOME | ❌ | ~/.cache/huggingface | Cache directory |
LOG_LEVEL | ❌ | info | Log level (debug , info , warn , error ) |
❓ 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
Development Commands
Release Commands
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
📄 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.
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Enables users to download HuggingFace models through natural language requests with support for file filtering, size limits, and custom download directories. Supports various AI development environments including Claude Desktop, VS Code, and Cursor.
Related MCP Servers
- AsecurityAlicenseAqualityUse HuggingFace Spaces directly from Claude. Use Open Source Image Generation, Chat, Vision tasks and more. Supports Image, Audio and text uploads/downloads.Last updated -3313352MIT License
- AsecurityAlicenseAqualityA Model Context Protocol server that provides Claude and other LLMs with read-only access to Hugging Face Hub APIs, enabling interaction with models, datasets, spaces, papers, and collections through natural language.Last updated -1059MIT License
- AsecurityAlicenseAqualityConnects Claude Desktop to Hugging Face Spaces with minimal setup, enabling capabilities like image generation, vision tasks, text-to-speech, and chat with AI models.Last updated -3313MIT License
- -securityAlicense-qualityA Model Context Protocol server that allows Claude and other MCP-compatible AI assistants to interact with the Hugging Face ecosystem, enabling repository management, file operations, search, and collections management through natural language.Last updated -1MIT License