hf-mcp-server  by huggingface

Connect LLMs to Hugging Face Hub and AI applications

Created 1 year ago
259 stars

Top 97.7% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

The Hugging Face MCP Server bridges Large Language Models (LLMs) with the Hugging Face Hub and Gradio AI Applications. It targets developers using LLM interfaces like Claude and Gemini, as well as VSCode and Cursor users, enabling seamless access to a vast ecosystem of AI models and applications.

How It Works

This project implements the Multi-modal Communication Protocol (MCP) as a server, providing standardized interfaces for Hugging Face Hub API and Search endpoints. It supports multiple transport mechanisms—STDIO, StreamableHTTP, and StreamableHTTPJson—allowing flexible integration. The core advantage lies in abstracting complex API interactions, enabling LLM clients to discover and utilize Hugging Face resources efficiently.

Quick Start & Requirements

Installation varies by client:

  • Claude Desktop/ai: Via redirect link or claude.ai/settings/connectors.
  • Claude Code: claude mcp add hf-mcp-server -t http https://huggingface.co/mcp?login
  • Gemini CLI: gemini mcp add -t http huggingface https://huggingface.co/mcp?login or gemini extensions install https://github.com/huggingface/hf-mcp-server.
  • VSCode/Cursor: Direct links or manual mcp.json configuration.

Local execution:

  • npx: npx @llmindset/hf-mcp-server (STDIO), npx @llmindset/hf-mcp-server-http (HTTP), npx @llmindset/hf-mcp-server-json (HTTP JSON).
  • Docker: docker pull ghcr.io/evalstate/hf-mcp-server:latest followed by docker run --rm -p 3000:3000 ghcr.io/evalstate/hf-mcp-server:latest.

Prerequisites include Hugging Face tokens (DEFAULT_HF_TOKEN or Authorization header). Development requires pnpm managed via Corepack.

Highlighted Details

  • Broad LLM client compatibility: Claude, Gemini, VSCode, Cursor.
  • Flexible transport options: STDIO, StreamableHTTP, StreamableHTTPJson.
  • Enables deployment of Hugging Face Hub API/Search endpoints and Gradio app integration.
  • Supports extending functionality via proxy tools defined in CSV.

Maintenance & Community

The provided README does not detail specific contributors, sponsorships, or community channels (e.g., Discord, Slack).

Licensing & Compatibility

The README does not explicitly state the software license, hindering assessment of commercial use or linking compatibility.

Limitations & Caveats

The DEFAULT_HF_TOKEN is designated for development/test environments. Proxy tool registration may lead to skipped tools if name collisions occur. Development tooling relies on pnpm and Corepack.

Health Check
Last Commit

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
19
Issues (30d)
0
Star History
14 stars in the last 30 days

Explore Similar Projects

Starred by Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), Gabriel Almeida Gabriel Almeida(Cofounder of Langflow), and
2 more.

torchchat by pytorch

0%
4k
PyTorch-native SDK for local LLM inference across diverse platforms
Created 2 years ago
Updated 10 months ago
Feedback? Help us improve.