HuggingFace Spaces MCP
π βοΈ - Use HuggingFace Spaces directly from Claude. Use Open Source Image Generation, Chat, Vision tasks and more. Supports Image, Audio and text uploads/downloads.
What is HuggingFace Spaces MCP?
HuggingFace Spaces MCP is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to π βοΈ - use huggingface spaces directly from claude. use open source image generation, chat, vision tasks and more. supports image, audio and text uploads/downloads.
π βοΈ - Use HuggingFace Spaces directly from Claude. Use Open Source Image Generation, Chat, Vision tasks and more. Supports Image, Audio and text uploads/downloads.
This server falls under the APIs category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- π βοΈ - Use HuggingFace Spaces directly from Claude. Use Open
Use Cases
Maintainer
Works with
Installation
NPM
npx -y @llmindset/mcp-hfspaceManual Installation
npx -y @llmindset/mcp-hfspaceConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use HuggingFace Spaces MCP
mcp-hfspace is an MCP server that bridges Claude Desktop directly to Hugging Face Spaces, making hundreds of open-source AI models available as callable tools β including image generation (FLUX.1, Shuttle), vision models (PaLiGemma, OmniParser), speech-to-text (Whisper), text-to-speech (Parler TTS), and chat models (Qwen, Mistral). It handles file uploads and downloads, supports both public and private Spaces via an HF token, and surfaces each Space as a dynamically discovered tool so Claude can invoke them without custom integrations. Users get access to open-source AI capabilities inside Claude conversations without needing separate API accounts for each model.
Prerequisites
- Node.js 18+ installed
- Claude Desktop installed
- A Hugging Face account and API token (free tier works for public Spaces)
- Sufficient disk space for a working directory (used for image/audio file transfers)
Get your Hugging Face token
Log in to huggingface.co, go to Settings > Access Tokens, and create a token with read access. For private Spaces you will need a token with write access. Copy the token value.
Add the server to Claude Desktop config
Open ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%/Claude/claude_desktop_config.json (Windows) and add the mcp-hfspace entry. Pass your HF token and a working directory for files.
{
"mcpServers": {
"mcp-hfspace": {
"command": "npx",
"args": ["-y", "@llmindset/mcp-hfspace", "--hf-token", "hf_YOUR_TOKEN_HERE", "--work-dir", "/tmp/hfspace"]
}
}
}Or configure via environment variables
Alternatively, pass configuration through environment variables instead of command-line args. This is useful when managing secrets separately from the config file.
{
"mcpServers": {
"mcp-hfspace": {
"command": "npx",
"args": ["-y", "@llmindset/mcp-hfspace"],
"env": {
"HF_TOKEN": "hf_YOUR_TOKEN_HERE",
"MCP_HF_WORK_DIR": "/tmp/hfspace"
}
}
}
}Restart Claude Desktop
Quit and reopen Claude Desktop to load the new MCP server. The server dynamically discovers available Spaces on startup, so the set of tools visible to Claude reflects the configured Spaces.
Verify tool availability
In Claude Desktop, ask Claude which HuggingFace tools are available. You should see tools corresponding to the Spaces the server has discovered, such as image generation, vision, and audio tools.
HuggingFace Spaces MCP Examples
Client configuration
Full Claude Desktop configuration for mcp-hfspace using environment variables for the HF token and a dedicated working directory.
{
"mcpServers": {
"mcp-hfspace": {
"command": "npx",
"args": ["-y", "@llmindset/mcp-hfspace"],
"env": {
"HF_TOKEN": "hf_YOUR_TOKEN_HERE",
"MCP_HF_WORK_DIR": "/tmp/hfspace"
}
}
}
}Prompts to try
These prompts show how to use open-source models on Hugging Face Spaces directly from a Claude conversation.
- "Generate an image of a futuristic city at sunset using FLUX.1-schnell"
- "Transcribe this audio file using Whisper"
- "Use PaLiGemma to identify what is in this photo"
- "Generate speech from this text using Parler TTS with a warm, conversational voice"
- "Compare images generated by two different Spaces and tell me which looks more realistic"
- "Remove the background from this product photo"Troubleshooting HuggingFace Spaces MCP
Space tools do not appear in Claude after configuration
Confirm npx can resolve @llmindset/mcp-hfspace by running `npx -y @llmindset/mcp-hfspace --help` in a terminal. Check Claude Desktop logs at ~/Library/Logs/Claude/ for server startup errors. Ensure your HF_TOKEN value is correct and has not expired.
Image generation returns an error about the working directory
Create the work directory if it does not exist: `mkdir -p /tmp/hfspace`. The server writes downloaded files there and will fail if the path is missing or not writable.
Private Space tools fail with 403 Forbidden
Ensure your HF token has at least read access to the specific private Space. In your Hugging Face profile, go to the Space's settings and confirm your account is listed as a collaborator or the Space's access settings permit your token.
Frequently Asked Questions about HuggingFace Spaces MCP
What is HuggingFace Spaces MCP?
HuggingFace Spaces MCP is a Model Context Protocol (MCP) server that π βοΈ - use huggingface spaces directly from claude. use open source image generation, chat, vision tasks and more. supports image, audio and text uploads/downloads. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install HuggingFace Spaces MCP?
Install via npm with the command: npx -y @llmindset/mcp-hfspace. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).
Which AI clients work with HuggingFace Spaces MCP?
HuggingFace Spaces MCP works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is HuggingFace Spaces MCP free to use?
Yes, HuggingFace Spaces MCP is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.
HuggingFace Spaces MCP Alternatives β Similar APIs Servers
Looking for alternatives to HuggingFace Spaces MCP? Here are other popular apis servers you can use with Claude, Cursor, and VS Code.
Kong
β 43.4kπ¦ The API and AI Gateway
API Mega List
β 5.4kThis GitHub repo is a powerhouse collection of APIs you can start using immediately to build everything from simple automations to full-scale applications. One of the most valuable API lists on GitHubβperiod. πͺ
Fetch
β 5.4kFetch web content and convert to markdown for AI consumption
Fusio
β 2.1kSelf-Hosted API Management for Builders
Korean Law
β 1.8kκ΅κ°λ²λ Ήμ 보MCP v4.0 | λ²μ μ² 41κ° API β 17κ° MCP λꡬ. λ²λ ΉΒ·νλ‘Β·μ‘°λ‘ κ²μ + LLM νκ° λ°©μ§ μΈμ©κ²μ¦ + μ‘°λ¬Έ μν₯ κ·Έλν(impact_map) + μμ λΉκ΅ μλ diff(time_travel) + μλ―Ό 5λ¨κ³ μ€ν κ°μ΄λ(action_plan) | 41 Korean legal APIs β 17 MCP tools
RuleGo
β 1.5kβοΈRuleGo is a lightweight, high-performance, embedded, next-generation component orchestration rule engine framework for Go.
Browse More APIs MCP Servers
Explore all apis servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up HuggingFace Spaces MCP in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use HuggingFace Spaces MCP?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.