Back to MCP directory
publicPublicdnsLocal runtime

mcp-hfspace

mcp-hfspace是一个连接Hugging Face Spaces的MCP服务器,支持图像生成、语音处理、视觉模型等多种AI功能,简化了与Claude Desktop的集成。

article

README

🚀 MCP协议服务器:使用指南

MCP(Model Context Protocol)协议是一种用于连接和管理各种AI模型的协议,支持文本生成、图像处理、语音识别等多种任务。借助此协议,用户能轻松配置多个AI模型,并在需要时调用它们完成特定任务。

🚀 快速开始

✨ 主要特性

  • 支持连接和管理多种AI模型。
  • 可处理文本生成、图像处理、语音识别等多种任务。
  • 方便用户配置多个AI模型并按需调用。

📦 安装指南

安装MCP协议服务器

使用npm命令进行安装:

npm install -y @llmindset/mcp-hfspace

启动服务器

启动MCP协议服务器时,可指定工作目录和Hugging Face令牌(可选):

npx @llmindset/mcp-hfspace --work-dir=/path/to/work/directory --HF_TOKEN=your_hf_token_here model1_id model2_id specific_endpoint

💻 使用示例

配置示例

在Claude桌面应用中添加MCP服务器配置:

  • MacOS路径~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows路径%APPDATA%/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "mcp-hfspace": {
      "command": "npx",
      "args": [
        "-y",
        "@llmindset/mcp-hfspace",
        "--work-dir=~/mcp-files/",
        "--HF_TOKEN=HF_{your_token_here}",
        "Qwen/Qwen2-72B-Instruct",
        "black-forest-labs/FLUX.1-schnell",
        "space/example/specific-endpoint"
      ]
    }
  }
}

🔧 技术细节

已知问题与限制

MCP协议服务器
  • 当前不支持使用无名称参数的端点。
  • 复杂Python类型转换为MCP格式的功能仍在开发中。
Claude桌面应用
  • 版本0.75存在响应超时的问题,建议使用MCP Inspector工具进行诊断。
  • 使用ZeroGPU空间时,长时间运行的任务容易超时,建议设置更短的GPU配额时间(如20秒)以避免超时。

📄 第三方MCP服务

mcp-hfspace MCP服务器

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client