Hugging Face MCP Server logo

Hugging Face MCP Server

by shreyaskarnik

The Hugging Face MCP Server provides read-only access to the Hugging Face Hub APIs. It allows LLMs like Claude to interact with Hugging Face's models, datasets, spaces, papers, and collections.

View on GitHub

Last updated: N/A

What is Hugging Face MCP Server?

The Hugging Face MCP Server is a Model Context Protocol (MCP) server that exposes popular Hugging Face resources (models, datasets, spaces, papers, and collections) through a custom hf:// URI scheme. It provides tools for searching and retrieving information about these resources, as well as prompt templates for comparing models and summarizing papers.

How to use Hugging Face MCP Server?

To use the server, install it via Smithery or manually configure it in Claude Desktop. The server exposes resources via hf:// URIs. Use the provided prompt templates (compare-models, summarize-paper) with appropriate arguments. Utilize the available tools (search-models, get-model-info, etc.) to find and retrieve information about Hugging Face resources. Example prompts for Claude are provided in the README.

Key features of Hugging Face MCP Server

  • Read-only access to Hugging Face Hub APIs

  • Custom hf:// URI scheme for accessing resources

  • Prompt templates for model comparison and paper summarization

  • Tools for searching and retrieving information about models, datasets, spaces, papers, and collections

  • Optional Hugging Face authentication for higher API rate limits

Use cases of Hugging Face MCP Server

  • Enabling LLMs like Claude to access and utilize Hugging Face resources

  • Comparing different Hugging Face models based on their details

  • Summarizing research papers from Hugging Face

  • Searching for specific models, datasets, or spaces based on various filters

FAQ from Hugging Face MCP Server

How do I install the server?

You can install it via Smithery or manually configure it in Claude Desktop.

How do I access Hugging Face resources?

Use the custom hf:// URI scheme (e.g., hf://model/{model_id}).

How do I compare models?

Use the compare-models prompt template with comma-separated model IDs.

How do I summarize a paper?

Use the summarize-paper prompt template with the arXiv ID.

Where can I find the server logs?

Check the logs in Claude Desktop: macOS: ~/Library/Logs/Claude/mcp-server-huggingface.log, Windows: %APPDATA%\Claude\logs\mcp-server-huggingface.log