HuggingFace Spaces MCP

v1.0.0β€’APIsβ€’stable

πŸ“‡ ☁️ - Use HuggingFace Spaces directly from Claude. Use Open Source Image Generation, Chat, Vision tasks and more. Supports Image, Audio and text uploads/downloads.

mcp-hfspacemcpai-integration
Share:
388
Stars
0
Downloads
0
Weekly
0/5

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

HuggingFace Spaces integration
Open source model access
Image, audio, text processing
evalstate

Maintainer

LicenseMIT License
Languagetypescript
Versionv1.0.0
UpdatedMay 1, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

NPM

npx -y @llmindset/mcp-hfspace

Manual Installation

npx -y @llmindset/mcp-hfspace

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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)
1

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.

2

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

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

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.

5

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.

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.

Quick Config Preview

{ "mcpServers": { "mcp-hfspace": { "command": "npx", "args": ["-y", "@llmindset/mcp-hfspace"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide β†’

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides