← Back to Leaderboard
Hhuggingface

huggingface/hf-mcp-server

A TypeScript MCP gateway for Hugging Face Hub APIs and Gradio tools

Engineering Health (Methodology)
A+ · 93/100
Maintenance Activity
● Updated yesterday
Latest Release
v0.5.3
Commercial License Check
MIT · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance35/35
Fork Adoption18/25
Release Cadence20/20
License Clarity20/20
DockerSelf-HostedMCPCLIAPI1 README badge views (30d)
Total Stars
★ 326
24h Growth
+0
7d Growth
+2
Forks
110

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

huggingface/hf-mcp-server Star History (2025-05-20 - 2026-12-03) ALL-TIME STAR HISTORY (2025-05 – 2026-12) +325 in 562d · avg +1/day 344 172 0 2025-05-20: ★ 12025-06-28: ★ 392025-08-02: ★ 672025-09-06: ★ 762025-10-11: ★ 1042025-11-15: ★ 1292025-12-20: ★ 1632026-01-24: ★ 1822026-02-28: ★ 1962026-04-04: ★ 2132026-05-09: ★ 2312026-06-13: ★ 2432026-07-18: ★ 2572026-08-22: ★ 2752026-09-26: ★ 2982026-10-31: ★ 3112026-12-03: ★ 326 ★ 326 2025-05 2026-02 2026-12

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

This TypeScript pnpm workspace separates Hub API and search tool implementations in packages/mcp from the MCP server and web application in packages/app. The same integration is available as a STDIO subprocess or as stateless Streamable HTTP JSON at /mcp. The web app serves /metrics, and HTTP deployments publish a server card at /mcp/server-card with ETag-based revalidation. On HTTP, tool exposure follows the caller's resolved Hugging Face token permissions rather than a process-wide default token.

The tool surface extends beyond built-in Hub operations to Gradio Spaces and upstream MCP servers. PROXY_TOOLS_CSV accepts a local path or HTTPS URL; at startup the server runs initialize and tools/list against each configured endpoint with a 10-second timeout and skips sources that fail or return no tools. The gateway can consume upstream SSE or JSON responses without changing its own direct JSON-RPC response mode. Schema discovery uses a separate optional PROXY_TOKEN; forwarding the caller's token during calls and MCP App resource reads is a per-source policy.

Key Capabilities & Differentiators

The server gives MCP clients a tool interface to Hub search and APIs and access to Gradio applications. Anonymous callers receive read-only discovery. Authenticated callers can receive write, repository-creation, Jobs, or Sandbox tools as their scopes permit. One meaningful least-privilege distinction is Jobs: the legacy combined hf_jobs tool requires Jobs write capability, whereas ?bouquet=ptc exposes hf_jobs_list, hf_job_get, and hf_job_logs to read-only tokens.

The management UI covers server status and MCP method metrics. Its Skills tab separates metadata probes from successful reads of SKILL.md and supporting files; a read is not evidence of execution or complete installation. The live view is process-local, capped at 10,000 events and 24 hours, and currently covers Streamable HTTP JSON. A separate Events view tracks SEP-3415 capability advertisement, listing, and polling outcomes. For catalog operators, the Python 3 dynamic-Space health check inspects Hub runtime state and Gradio MCP schemas without invoking tools or waking sleeping Spaces by default.

Trade-offs & Limitations

Compared with calling the Hub API directly, this server removes the need to build a separate tool integration for each MCP client. In exchange, integrators must account for transport compatibility, token-dependent tool discovery, and the availability of configured upstreams. Compared with the hosted Hugging Face endpoint, self-hosting gives operators control over host policy, proxy sources, and telemetry exposure, but also transfers responsibility for TLS, access control, credentials, and upgrades. It does not turn the Hub or Spaces into an offline stack.

Two defaults deserve an explicit deployment decision. HTTP allows anonymous discovery by default; MCP_STRICT_TOKEN=true requires a token, rejects invalid tokens with 401, and returns 503 when validation is unavailable. Separately, proxy token forwarding defaults to true for compatibility; disable it for any upstream that does not need the caller's Hugging Face credential. The optional metrics password is a shared gate without user roles, rate limiting, or an audit trail. Use platform or reverse-proxy controls for management access rather than relying on that password alone.

Hardware & Deployment Guide

The lowest-maintenance path is https://huggingface.co/mcp. For a local client subprocess, use npx @llmindset/hf-mcp-server; for local stateless HTTP, use npx @llmindset/hf-mcp-server-http. Docker defaults to HTTP on port 3000, with /mcp for clients and /metrics for operators. The supplied Dockerfile uses node:24.22.3-alpine, tini, Corepack, and a frozen-lockfile pnpm install. Source builds use the Corepack-managed pnpm 10.12.3 workflow with pnpm install and pnpm build.

For shared HTTP deployments, set MCP_ALLOWED_HOSTS for the intended hostnames, decide whether anonymous discovery should be available, and protect management routes at the reverse proxy or platform. DEFAULT_HF_TOKEN and the HF_TOKEN fallback apply to STDIO only. Local hosting moves the gateway, not the Hub or remote tool execution, so plan for upstream connectivity rather than local inference hardware. Release v0.5.1 aligned Hub Link pagination, FUSE volume rules, and Job log streaming; v0.5.2 added MCP Events tracking and a dashboard tab; v0.5.3 updated the inference-provider examples for hf_models_search.

Transport: STDIO and stateless Streamable HTTP JSON; HTTP uses /mcp and publishes a revalidatable server card at /mcp/server-card.
Authorization: Anonymous callers receive read-only discovery; authenticated tool visibility follows resolved Hugging Face token scopes and permissions.
Job inspection: The ?bouquet=ptc profile exposes hf_jobs_list, hf_job_get, and hf_job_logs to read-only tokens; the legacy combined hf_jobs tool requires Jobs write access.
Proxy isolation: PROXY_TOKEN serves startup schema discovery, while per-source forward_hf_token controls whether the caller's credential goes upstream.
Observability: Skills metrics distinguish metadata probes from content reads and retain at most 10,000 live events within a 24-hour window; process restart clears that view.
Deployment: Hosted MCP, separate npx launchers for STDIO and HTTP, and a Docker image that defaults to HTTP on port 3000.
Best For

Teams that want MCP clients to discover Hub resources, invoke selected Gradio tools, or inspect Jobs with Hugging Face permissions enforced at tool registration.

Skip If

You need offline inference, a general-purpose model-serving runtime, or a fixed set of Hub API calls that application code can make directly.

Reviewed on 2026-12-02 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

DockerSelf-HostedMCPCLI
npx @llmindset/hf-mcp-server       # Start in STDIO mode
npx @llmindset/hf-mcp-server-http  # Start in stateless Streamable HTTP JSON mode

Comparison vs. Top Coding, Skills & MCP Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
hf-mcp-server ★326+2TypeScriptMITA TypeScript MCP gateway for Hugging Face Hub APIs and Gradio tools
rea488.8k+7.6kTypeScriptMITA local CLI and MCP server for evidence-backed app and binary analysis
chrome-devtools-mcp60.4k+760TypeScriptApache-2.0Chrome DevTools via MCP and CLI for live browser debugging and performance analy
skills42.3k+1.1kTypeScriptMITTypeScript CLI for distributing and restoring skills across coding agents

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/huggingface/hf-mcp-server.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

huggingface/hf-mcp-server Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about hf-mcp-server

How do I connect an MCP client, and where do credentials go?

Use the hosted Streamable HTTP endpoint at https://huggingface.co/mcp for a client that supports it, or run the local STDIO package for a subprocess-based client. The hosted ?login flow is documented for Claude Code and Gemini CLI; bearer-token configuration is also available. On self-hosted HTTP, send credentials per request: DEFAULT_HF_TOKEN is a STDIO default, not an HTTP fallback.

Does self-hosting require a GPU, and how should I size it?

The MCP server is a Node.js integration layer, not a local model runtime. No GPU or VRAM requirement is specified for the server itself. Size the Node process for concurrent requests, discovery traffic, and telemetry, then measure with your workload. Compute used by a selected Space or Job is separate from the MCP server's footprint.

Can I run it commercially or deploy it inside my organization?

The server code is MIT-licensed and can be used commercially or self-hosted, subject to the license's notice requirements. That license does not cover models, datasets, Spaces, or upstream services accessed through the server. Check their terms separately and enforce your own access controls and credential handling.

When should I use hosted MCP, self-hosted MCP, or the Hub API directly?

Use the hosted MCP endpoint when you want the same Hub-facing tool interface without operating a server. Self-host when you need control over transport, host policy, proxy credentials, or dashboard exposure. Call the Hub API directly when application code already knows which endpoints to use and you do not need MCP tool discovery or a client-facing tool registry.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining huggingface/hf-mcp-server? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature huggingface/hf-mcp-server on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare