Back to MCP Directory
Hfspace
Model Context Protocol moderate risk

Hfspace

The `mcp-hfspace` server connects Claude Desktop to Hugging Face Spaces, enabling image generation, vision tasks, TTS, STT, and more, with file handling and optional Claude Desktop mode.

Connections & Capabilities

Connects To

GitHub

Capabilities

readwriteexec

Quickstart

Config

{
  "mcpServers": {
    "mcp-hfspace": {
      "command": "npx"
      "args": [
        "-y",
        "@llmindset/mcp-hfspace",
        "--work-dir=~/mcp-files/ or x:/temp/mcp-files/",
        "--HF_TOKEN=HF_{optional token}"
        "Qwen/Qwen2-72B-Instruct",
        "black-forest-labs/FLUX.1-schnell",
        "space/example/specific-endpint"
        (... and so on)
        ]
    }
  }
}

Exposed MCP Tools (5)

moderate
Image Generation

Generates images based on text prompts using Hugging Face Spaces.

Can potentially generate inappropriate content.

safe
Vision Model

Analyzes images using Hugging Face Spaces, providing insights and descriptions.

Read-only analysis of provided images.

moderate
Text-to-Speech

Converts text to speech using Hugging Face Spaces.

Can generate audio with potentially inappropriate content.

safe
Speech-to-Text

Transcribes audio into text using Hugging Face Spaces.

Read-only transcription of provided audio.

moderate
Chat

Engages in conversational interactions using Hugging Face Spaces.

Can generate unpredictable and potentially harmful responses.

Safety Assessment

The `mcp-hfspace` server offers a convenient way to integrate Hugging Face Spaces with Claude Desktop. It is relatively safe when used with trusted Spaces and a properly configured working directory. However, using untrusted Spaces or failing to configure the working directory can pose security risks.

  • Working directory can be configured to limit file access.
  • Supports private Hugging Face Spaces with token authentication.
  • Operates in Claude Desktop Mode by default, limiting direct file access.
  • Allows specifying API endpoints for more control.
  • Can potentially download and execute arbitrary code from Hugging Face Spaces.
  • Requires a Hugging Face token for private spaces, which needs secure handling.
  • Default working directory on MacOS is root, posing a potential risk if not overridden.
  • File handling relies on user-provided filenames, which could lead to path traversal if not validated.