Feedback

πŸ€— Hugging Face MCP Server πŸ€—

@shreyaskarnik Claim

Basic information

Runtime
python
Category
License
MIT
Transports
stdio
Author
shreyaskarnik
Submitted by
Community
Quality
25
Stars
71

About πŸ€— Hugging Face MCP Server πŸ€—

# πŸ€— Hugging Face MCP Server πŸ€—

πŸ€— Hugging Face MCP Server πŸ€— is a MCP server in the AI & Agents category listed in the AddMCP.net directory, published by shreyaskarnik. It exposes 5 tools, including Models:, Datasets:, Spaces:, Papers: and more. Supported transport: stdio. Runtime: python. License: MIT. The repository has 71 GitHub stars. Source code is hosted on github.com.

Setup

{
    "mcpServers": {
        "huggingface-mcp-server": {
            "command": "npx",
            "args": [
                "-y",
                "@smithery/cli",
                "install",
                "@shreyaskarnik/huggingface-mcp-server",
                "--client",
                "claude"
            ]
        }
    }
}

πŸ€— Hugging Face MCP Server πŸ€— config

Add this server to your MCP-compatible client using the configuration below.

{
    "mcpServers": {
        "huggingface-mcp-server": {
            "command": "npx",
            "args": [
                "-y",
                "@smithery/cli",
                "install",
                "@shreyaskarnik/huggingface-mcp-server",
                "--client",
                "claude"
            ]
        }
    }
}

πŸ€— Hugging Face MCP Server πŸ€— tools

  • Models: β€” `search-models` filters by query, author, tags and limit. `get-model-info` returns details for one model.
  • Datasets: β€” `search-datasets` and `get-dataset-info` do the same for datasets.
  • Spaces: β€” `search-spaces` can filter by SDK type, such as Gradio. `get-space-info` returns details for one Space.
  • Papers: β€” `get-paper-info` looks up a paper by arXiv ID together with its implementations on the Hub. `get-daily-papers` returns the curated daily papers list.
  • Collections: β€” `search-collections` and `get-collection-info` browse curated collections.

Overview

What is πŸ€— Hugging Face MCP Server πŸ€—?

Hugging Face MCP Server is a community huggingface mcp server by Shreyas Karnik that gives Claude and other MCP clients read-only access to the Hugging Face Hub: search and inspect models, datasets, Spaces, papers and collections.

It is a small Python server that runs locally over stdio and calls the public Hub API. It is not the official Hugging Face MCP server; Hugging Face runs its own hosted server at https://huggingface.co/mcp, covered in the comparison section below.

How to use πŸ€— Hugging Face MCP Server πŸ€—?

Prerequisites:

  • uv and Python 3.13 or newer (the project's pyproject.toml requires >=3.13)
  • A local clone of https://github.com/shreyaskarnik/huggingface-mcp-server
  • Optional: a Hugging Face access token from https://huggingface.co/settings/tokens, set as HF_TOKEN

No API key is required. The README lists HF_TOKEN as optional, for higher rate limits and access to private repositories.

Smithery (Claude Desktop)

The README's one-step install for Claude Desktop:

npx -y @smithery/cli install @shreyaskarnik/huggingface-mcp-server --client claude

Claude Desktop

Edit claude_desktop_config.json:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "huggingface": {
      "command": "uv",
      "args": [
        "--directory",
        "/absolute/path/to/huggingface-mcp-server",
        "run",
        "huggingface"
      ],
      "env": {
        "HF_TOKEN": "your_token_here"
      }
    }
  }
}

The README's sample runs huggingface_mcp_server.py, but the current repository has no file by that name. The server code is in src/huggingface/, and pyproject.toml defines a huggingface command, which is also what the Smithery config starts. That is why the example above runs huggingface. Restart Claude Desktop after saving.

Claude Code

Register the same local command over stdio:

claude mcp add huggingface -- uv --directory /absolute/path/to/huggingface-mcp-server run huggingface

Cursor and VS Code

Use the same command and args as the Claude Desktop entry in your client's MCP config file. If you want a remote server with one-click setup in Cursor or VS Code instead, use the official hosted server (see below).

Key features of πŸ€— Hugging Face MCP Server πŸ€—

  • Read-only access to the Hugging Face Hub API. It cannot upload, edit or delete anything.
  • Ten tools covering models, datasets, Spaces, papers and collections
  • A custom hf:// URI scheme for resources: hf://model/{model_id}, hf://dataset/{dataset_id}, hf://space/{space_id}, all returned as JSON
  • Two prompt templates: compare-models (takes comma-separated model_ids) and summarize-paper (takes arxiv_id, with an optional detail_level of brief or detailed)
  • Works without any configuration, with an optional HF_TOKEN
  • Runs locally over stdio and is MIT licensed
  • Install either with Smithery or with uv

πŸ€— Hugging Face MCP Server πŸ€— tools

The tools fall into five groups:

  • Models: search-models filters by query, author, tags and limit. get-model-info returns details for one model.
  • Datasets: search-datasets and get-dataset-info do the same for datasets.
  • Spaces: search-spaces can filter by SDK type, such as Gradio. get-space-info returns details for one Space.
  • Papers: get-paper-info looks up a paper by arXiv ID together with its implementations on the Hub. get-daily-papers returns the curated daily papers list.
  • Collections: search-collections and get-collection-info browse curated collections.

None of the tools runs inference or generates content. They only return Hub metadata.

Use cases of πŸ€— Hugging Face MCP Server πŸ€—

  • Model discovery: "Search for BERT models on Hugging Face with less than 100 million parameters."
  • Picking between models: "Compare the Llama-3-8B and Mistral-7B models from Hugging Face." This can use the compare-models prompt.
  • Dataset research: "Find the most popular datasets for text classification on Hugging Face."
  • Keeping up with research: "What are today's featured AI research papers on Hugging Face?"
  • Reading a paper quickly: "Summarize the paper with arXiv ID 2307.09288 using the Hugging Face MCP server."
  • Finding demos: "Show me the most popular Gradio spaces for image generation." Or: "Find collections created by TheBloke that include Mixtral models."

Hugging Face MCP Server vs alternatives

  • Official Hugging Face MCP server (https://huggingface.co/mcp, source at huggingface/hf-mcp-server). This is the hosted server that Hugging Face maintains. It connects over HTTP, so nothing runs locally. It supports sign-in via ?login or an Authorization: Bearer <YOUR_HF_TOKEN> header. You choose its tools and Spaces at https://huggingface.co/settings/mcp. Beyond Hub search it can call MCP-enabled Gradio Spaces, for example to generate images. Documented setups cover Claude Desktop/claude.ai, Claude Code, Gemini CLI, VS Code and Cursor. In Claude Code:
  claude mcp add hf-mcp-server -t http https://huggingface.co/mcp?login

For Cursor or VS Code with a token, the official snippet is:

  "huggingface": {
    "url": "https://huggingface.co/mcp",
    "headers": {
      "Authorization": "Bearer <YOUR_HF_TOKEN>"
    }
  }
  • This community server. It is a fixed, read-only toolset running on your own machine. It suits you if you want a small local process with no Hugging Face login, or if you want the hf:// resources and the two prompt templates. The repository has had no new commits since March 2025.

Most people searching for "hugging face mcp" today want the official hosted server. Use the community one when you specifically want a local, read-only Hub browser.

Troubleshooting Hugging Face MCP Server

  • Server does not start in Claude Desktop: check the logs at ~/Library/Logs/Claude/mcp-server-huggingface.log (macOS) or %APPDATA%\Claude\logs\mcp-server-huggingface.log (Windows). A common cause is pointing uv run at huggingface_mcp_server.py, which is not in the repository. Run huggingface instead, and make sure --directory is an absolute path.
  • Python version errors: the project requires Python 3.13 or newer. Let uv install a matching interpreter, or upgrade the one you have.
  • Rate limit errors: the README suggests adding a Hugging Face token. In the current source, Hub requests go out through a plain HTTP client without an auth header, so a token may not raise limits. Switch to the official server if you need authenticated access.
  • Debugging tool calls: run the MCP Inspector against the server: npx @modelcontextprotocol/inspector uv --directory /path/to/huggingface-mcp-server run huggingface. Then open the URL it prints.
  • A tool returns nothing: check that you have internet access, then look up the same model or dataset on huggingface.co to confirm it exists.

Frequently asked questions

1 Is this the official Hugging Face MCP server?

No. This listing is a community project by Shreyas Karnik. The official Hugging Face MCP server is hosted by Hugging Face at https://huggingface.co/mcp, with source code at github.com/huggingface/hf-mcp-server.

2 Is the Hugging Face MCP Server free?

Yes. The server is open source under the MIT license, and it reads the public Hugging Face Hub API without requiring a token.

3 Do I need a Hugging Face API key?

No. The README lists HF_TOKEN as optional, for higher rate limits and private repository access. Without a token the server reads public Hub data.

4 Does it work with Claude Code, Cursor and VS Code?

Yes. It is a standard stdio MCP server, so any client that can launch a local command can run it. The README only documents Claude Desktop and Smithery, though. For one-click setup in Cursor, VS Code or Claude Code, the official hosted server has documented instructions.

5 Is it a remote or a local MCP server?

Local. It runs on your machine over stdio. The official Hugging Face MCP server is remote and connects over HTTP at https://huggingface.co/mcp.

6 Can it modify my Hugging Face repositories?

No. It is read-only. It can search and fetch information about models, datasets, Spaces, papers and collections, but it cannot upload, edit or delete anything.

7 Can it generate images or run models?

No. This server only returns Hub metadata. To run Gradio Spaces such as image generators from your assistant, use the official Hugging Face MCP server and add Spaces at https://huggingface.co/settings/mcp.

8 What does the hf:// URI scheme do?

It exposes Hub entries as MCP resources: hf://model/{model_id}, hf://dataset/{dataset_id} and hf://space/{space_id}. Clients that support resources can attach these entries as JSON context.

Comments

No comments yet

Be the first to share feedback about this listing. Sign in to leave a comment.

Sign In

Feedback πŸ’¬