Skip to main content
Glama

MCP HuggingFetch

by freefish1218

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" } } ] }

🔑 Get HuggingFace Token

  1. Visit HuggingFace Settings
  2. Create a new Access Token
  3. 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:

List all files in the 2Noise/ChatTTS repository
Show JSON files in the bert-base-uncased repository
Display files in openai/whisper-large-v3 sorted by size

📥 Download Models

Selectively download required files:

Please download the ChatTTS model to ./models directory
Download microsoft/DialoGPT-medium model, only .bin files
Download openai/whisper-large-v3 model, exclude test files

📝 Supported Features

List Tool Options (list_huggingface_files)

ParameterTypeDescriptionExample
repo_idstringHuggingFace repository ID"2Noise/ChatTTS"
revisionstringGit branch/tag"main", "v1.0"
pathstringRepository sub-path"models/"
patternstringFile name filter pattern"*.json", "*.safetensors"
sort_bystringSort method"size", "name", "type"

Download Tool Options (download_huggingface_model)

ParameterTypeDescriptionExample
repo_idstringHuggingFace repository ID"2Noise/ChatTTS"
download_dirstringDownload directory"./models"
filesarraySpecific file list["model.bin", "config.json"]
allow_patternsstring/arrayInclude patterns"*.json" or ["*.pt", "*.bin"]
ignore_patternsstring/arrayExclude patterns"test_*" or ["*.onnx", "test_*"]
revisionstringGit branch/tag"main", "v1.0"
force_redownloadbooleanForce re-downloadtrue, false

🔧 Environment Variables

VariableRequiredDefaultDescription
HUGGINGFACE_TOKEN-HuggingFace access token
HUGGINGFETCH_DOWNLOAD_DIR~/Downloads/huggingface_modelsDefault download directory
HF_HOME~/.cache/huggingfaceCache directory
LOG_LEVELinfoLog 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

git clone https://github.com/freefish1218/mcp-huggingfetch.git cd mcp-huggingfetch npm install

Development 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 issues

Release 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.

🤝 Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

Deploy Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

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.

  1. 📋 Quick Setup
    1. Claude Desktop
    2. Claude Code
    3. Cursor / VS Code (Continue Extension)
  2. 🔑 Get HuggingFace Token
    1. 🛠 Usage
      1. 📋 List Files
      2. 📥 Download Models
    2. 📝 Supported Features
      1. List Tool Options (list_huggingface_files)
      2. Download Tool Options (download_huggingface_model)
    3. 🔧 Environment Variables
      1. ❓ FAQ
        1. 🏗 Development
          1. Prerequisites
          2. Installation
          3. Development Commands
          4. Release Commands
          5. Building
        2. 📄 License
          1. 📖 Links
            1. 🤝 Contributing

              Related MCP Servers

              • A
                security
                A
                license
                A
                quality
                Use HuggingFace Spaces directly from Claude. Use Open Source Image Generation, Chat, Vision tasks and more. Supports Image, Audio and text uploads/downloads.
                Last updated -
                3
                313
                352
                MIT License
                • Apple
              • A
                security
                A
                license
                A
                quality
                A 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 -
                10
                59
                MIT License
                • Apple
              • A
                security
                A
                license
                A
                quality
                Connects 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 -
                3
                313
                MIT License
                • Apple
              • -
                security
                A
                license
                -
                quality
                A 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 -
                1
                MIT License
                • Apple

              View all related MCP servers

              MCP directory API

              We provide all the information about MCP servers via our MCP API.

              curl -X GET 'https://glama.ai/api/mcp/v1/servers/freefish1218/mcp-huggingfetch'

              If you have feedback or need assistance with the MCP directory API, please join our Discord server