evalstate/mcp-hfspace logo

evalstate/mcp-hfspace

Free

直接从 Claude 使用 HuggingFace Spaces。使用开源图像生成、聊天、视觉任务等。支持图像、音频和文本上传/下载。

FreeFree tier
Inputs: text, image, audioOutputs: image, text, audio
Type
Open Source

About evalstate/mcp-hfspace

evalstate/mcp-hfspace is an open-source MCP (Model Context Protocol) server that provides a seamless bridge between Claude Desktop and Hugging Face Spaces. It allows users to connect to a wide variety of Hugging Face Spaces with minimal setup—simply add space identifiers as arguments and the server automatically detects the most appropriate endpoints. By default, it connects to black-forest-labs/FLUX.1-schnell for image generation, but supports any Gradio-based space, including vision models like Qwen/QVQ-72B-preview and text-to-speech models like styletts2/styletts2. The server operates in 'Claude Desktop Mode' by default, returning images directly in tool responses and saving other files to a configurable working directory. It also supports URL input, private spaces via a Hugging Face token, and multiple server instances for different configurations. The project is superseded by the official Hugging Face MCP server but remains a straightforward solution for integrating open-source AI models into Claude.

Key Features

Default connection to black-forest-labs/FLUX.1-schnell for image generation
Supports any Gradio space including vision and text-to-speech models
Claude Desktop Mode returns images in tool responses, files saved to working directory
File upload/download for image, audio, and text formats
URL input support: content is passed to the space
Private space support via Hugging Face token
Automatic endpoint detection and configuration
Configurable working directory via --work-dir or MCP_HF_WORK_DIR environment variable
Multiple server instances for different tokens and directories
Gradio MCP support (SSE) for spaces with Gradio 5.28+

Pros & Cons

Pros
  • Minimal setup: add spaces and go, no complex configuration
  • Direct integration with Claude Desktop for seamless user experience
  • Supports a wide range of open-source Hugging Face models
  • Handles file input/output automatically with configurable storage
  • Open source and free to use
  • Can run multiple server instances for different configurations
Cons
  • Requires Node.js and Claude Desktop (not a standalone tool)
  • Default file path differs between Windows and Mac (recommends setting working directory)
  • May need a Hugging Face token for private spaces
  • Documentation is brief; some features rely on reading code
  • Superseded by the official Hugging Face MCP server (but still maintained)

Best For

Generate images from text prompts in Claude DesktopAnalyze images using vision models (e.g., Qwen/QVQ-72B-preview)Convert text to speech using open-source TTS modelsIntegrate any HuggingFace Space as a tool in Claude workflowBuild multi-model pipelines with image generation, vision, and audio capabilities

FAQ

How do I install mcp-hfspace for Claude Desktop?
Install Node.js, then add the following to your claude_desktop_config.json mcpServers section: {"mcp-hfspace": {"command": "npx", "args": ["-y", "@llmindset/mcp-hfspace"]}}. Requires Claude Desktop 0.78 or greater.
How do I use private Hugging Face spaces?
Supply your Hugging Face token using the --hf-token argument or set the HF_TOKEN environment variable in the server configuration.
How do I set the working directory for file uploads/downloads?
Use the --work-dir=/your_directory argument or set the MCP_HF_WORK_DIR environment variable. On Windows the default is a read/write folder in AppData; on Mac it is the read-only root (/), so setting a working directory is recommended.
Can I use multiple Hugging Face spaces at once?
Yes, list multiple space identifiers as arguments. You can also run multiple server instances with different working directories and tokens if needed.