mcp-hfspace for Claude Desktop and SourceCraft
An MCP server that turns public Hugging Face Spaces into agent tools: image generation, text-to-speech, transcription and chat
Install in Claude Desktop, SourceCraft and Koda
Other ways to install
Access and checks
How we reviewExtended access. The tool runs code or makes network calls and only reads external data.
- The server sends your files, images and texts to third-party Hugging Face Spaces whose code nobody has reviewed
- It reads and writes files in the working folder, and with a Hugging Face token it gets access to your account and private Spaces
This is third-party code. Review the repository files before installing.
What it does
mcp-hfspace connects Gradio apps hosted in Hugging Face Spaces to Claude Desktop. You list Space names in the launch arguments, and for each one the server finds a suitable endpoint, configures it and presents it to the model as a tool. With no list it defaults to `black-forest-labs/FLUX.1-schnell` and gives the client image generation. Different Spaces cover different tasks. FLUX and Shuttle models draw images, `microsoft/OmniParser` parses a screenshot and `merve/paligemma2-vqav2` answers questions about a picture. `hf-audio/whisper-large-v3-turbo` transcribes audio, `parler-tts/parler_tts` voices text and Qwen runs a chat. File links can go straight into the request, and local files use the working folder. In Claude Desktop mode, on by default, images come back inside the response while other files are saved to the working folder and the model gets their path. Private Spaces connect with a Hugging Face token. The author notes that the project has been superseded by the official Hugging Face MCP server and by built-in MCP support in Gradio.
Who it is for. For people who want to give Claude Desktop any model from Hugging Face Spaces in a few lines of configuration: images, voice, transcription or chat.
Good fit when
- You want to generate an image with FLUX from Claude Desktop and show it to the model so it can compare variants
- You need to transcribe an audio file through Whisper on Spaces and bring the text into the conversation
- You want to voice text with Parler TTS and save the file in the working folder
- You want to parse an interface screenshot with OmniParser and get element descriptions and coordinates
- You run a private Space on dedicated hardware and want to open it to the model with a Hugging Face token
Not a fit when
- You need a maintained server: the author considers the project superseded by the official Hugging Face MCP server and the Gradio integration
- You need a Space whose inputs have no names: the server does not support such endpoints yet, so OpenAI speech-to-text models do not work
- The job is heavy and takes over a minute: Claude Desktop cuts the call off on a timeout, although the server still saves the result
- You need predictable timing with no queues: free Spaces run into ZeroGPU quotas
Example request
Generate an image of a red fox in a pine forest with FLUX, save the file and tell me what came out.MCP
- Transport
- stdio
- Authentication
- not required
Keys and settings
HF_TOKENsecret- Hugging Face token for private Spaces and your account's ZeroGPU quotas
MCP_HF_WORK_DIR- Working folder for uploading and downloading files
CLAUDE_DESKTOP_MODE- The value false turns off Claude Desktop mode and returns content as a Base64 resource
Limitations
The server depends on how each Space is built: field labels are often uninformative, and endpoints with unnamed parameters are not supported. Complex Python types are not fully translated to MCP formats.
Claude Desktop cuts a call off after about 60 seconds and does not use progress notifications, so heavy ZeroGPU jobs may not fit. The result is still saved in the working folder. If a tool suddenly stops responding, the ZeroGPU quota may be used up: wait or deploy your own Space. A Hugging Face token moves the quotas to your account.
By default the working folder is the current directory: on Windows a folder inside AppData, on macOS the read-only filesystem root. That is why the author advises setting the directory with the `--work-dir` argument or the `MCP_HF_WORK_DIR` variable. Claude Desktop 0.78 or newer is required. Hugging Face availability from Russia can change, so the card is marked unknown.
How to disable. Delete the mcp-hfspace block from claude_desktop_config.json and restart Claude Desktop. The working folder with saved files stays on disk and you can clear it separately.
FAQ
How do I connect Hugging Face Spaces to Claude Desktop?
Add a server to claude_desktop_config.json with the command npx and the arguments -y, @llmindset/mcp-hfspace. Then list the Spaces you need in the arguments, for example `black-forest-labs/FLUX.1-schnell`. The server picks a suitable endpoint itself.
Do I need a Hugging Face token?
Not for public Spaces. Pass a token with `--hf-token` or the `HF_TOKEN` variable when you need a private Space. It also moves ZeroGPU quotas to your Pro account.
Why does the server save files in the wrong place?
The default working folder depends on the system: on Windows a directory inside AppData, on macOS a read-only root. Set your own directory with `--work-dir` or `MCP_HF_WORK_DIR`.
How does mcp-hfspace differ from the official Hugging Face MCP server?
It is an earlier project by the same author, who calls it superseded by the official server. The official server also runs locally over stdio, supports SSE and streaming HTTP and has a local interface for choosing tools.
How do I turn off Claude Desktop mode?
Start the server with `--desktop-mode=false` or set `CLAUDE_DESKTOP_MODE=false`. Content then comes back as an embedded Base64 resource instead of a file in the working folder.
How do I install mcp-hfspace?
Run npx skillfoxx add mcp/mcp-hfspace in a terminal.
Discussion
No questions or reviews yet.
README in short
The README opens with a note about the replacement and a hint that Gradio 5.28 has MCP built in. It then gives installation, six example scenarios with ready Spaces, a list of recommended Spaces by task, a section on private Spaces and a list of known issues with Claude Desktop and ZeroGPU.