Skip to main content
Glama

MCP HuggingFetch

by freefish1218

MCP HuggingFace 下载工具

通过 MCP 协议快速下载 HuggingFace 模型的工具,支持 Claude Desktop、Claude Code、Cursor、VS Code 等客户端。

📋 快速配置

Claude Desktop

claude_desktop_config.json 中添加:

{ "mcpServers": { "huggingfetch": { "command": "npx", "args": ["--yes", "mcp-huggingfetch"], "env": { "HUGGINGFACE_TOKEN": "your_token_here" } } } }

Claude Code

.claude/claude_config.json 中添加:

{ "mcpServers": { "huggingfetch": { "command": "npx", "args": ["--yes", "mcp-huggingfetch"], "env": { "HUGGINGFACE_TOKEN": "your_token_here", "HUGGINGFETCH_DOWNLOAD_DIR": "./models" } } } }

Cursor / VS Code (Continue 插件)

config.json 中添加:

{ "mcp": [ { "name": "huggingfetch", "command": "npx", "args": ["--yes", "mcp-huggingfetch"], "env": { "HUGGINGFACE_TOKEN": "your_token_here" } } ] }

🔑 获取 HuggingFace Token

  1. 访问 HuggingFace Settings
  2. 创建新的 Access Token
  3. 将 token 复制到上述配置中的 HUGGINGFACE_TOKEN

🛠 使用方法

配置完成后,直接在对话中请求下载模型:

请帮我下载 ChatTTS 模型到 ./models 目录
下载 microsoft/DialoGPT-medium 模型,只要 .bin 文件
下载 openai/whisper-large-v3 模型,排除测试文件

📝 支持的下载选项

参数类型说明示例
repo_idstringHuggingFace 仓库 ID"2Noise/ChatTTS"
download_dirstring下载目录"./models"
filesarray指定文件列表["model.bin", "config.json"]
file_typesarray文件类型过滤[".pt", ".bin", ".safetensors"]
include_patternstring/array包含模式"*.json"["*.pt", "*.bin"]
exclude_patternstring/array排除模式"test_*"["*.onnx", "test_*"]
max_file_sizestring最大文件大小"500MB", "1GB"
min_file_sizestring最小文件大小"1KB", "10MB"
revisionstringGit 分支/标签"main", "v1.0"

🔧 环境变量配置

变量必需默认值说明
HUGGINGFACE_TOKEN-HuggingFace 访问令牌
HUGGINGFETCH_DOWNLOAD_DIR~/Downloads/huggingface_models默认下载目录
HF_HOME~/.cache/huggingface缓存目录
LOG_LEVELinfo日志级别 (debug, info, warn, error)

❓ 常见问题

Q: Token 认证失败怎么办?
A: 检查 HUGGINGFACE_TOKEN 是否正确设置,确保 token 有效且有足够权限。

Q: 下载速度慢怎么办?
A: 工具支持断点续传和并发下载,网络问题可能导致速度慢,会自动重试。

Q: 如何下载私有模型?
A: 确保您的 HuggingFace 账户有访问权限,并使用有效的 token。

Q: 支持哪些文件格式?
A: 支持所有 HuggingFace 上的文件格式,包括 .pt, .bin, .safetensors, .json, .txt 等。

📖 项目地址

-
security - not tested
A
license - permissive license
-
quality - not tested

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. 📋 快速配置
    1. Claude Desktop
    2. Claude Code
    3. Cursor / VS Code (Continue 插件)
  2. 🔑 获取 HuggingFace Token
    1. 🛠 使用方法
      1. 📝 支持的下载选项
        1. 🔧 环境变量配置
          1. ❓ 常见问题
            1. 📖 项目地址

              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
                227
                347
                TypeScript
                MIT License
                • Apple
              • -
                security
                A
                license
                -
                quality
                An MCP server that generates 2D and 3D game assets from text prompts using AI models from Hugging Face Spaces, allowing developers to easily create game art through Claude Desktop or other MCP clients.
                Last updated -
                79
                JavaScript
                MIT License
                • Apple
                • Linux
              • 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
                56
                Python
                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
                227
                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