# Hugging Face — MCP Server

> Search models, datasets and Spaces — and run Spaces as tools.

**Source:** https://mcpplaygroundonline.com/mcp-servers/huggingface  
**Transport:** http  
**Requires auth:** Yes

---

## What it does

The Hugging Face MCP server exposes the Hub as a set of tools an agent can reason over. A model can search for models matching a task and filter by library, licence or size, look up dataset cards, find papers, and inspect what a given repository contains. The more unusual capability is Spaces-as-tools: you choose Spaces from your MCP settings page and they become callable tools, so an agent can run an image generator or a transcription demo as a step in a larger task. Configure which tools and Spaces are exposed at huggingface.co/settings/mcp.

## Tools exposed

- model_search — find models by task, library, licence or author
- dataset_search — search datasets and read dataset cards
- paper_search — look up papers indexed on the Hub
- space_search — discover Spaces matching a description
- model / dataset detail — inspect files, tags and metadata for a repo
- user-selected Spaces — exposed as callable tools from your MCP settings

## Example queries you can run

- "Find a small open-licence model for speech-to-text that runs on CPU."
- "What datasets exist for multilingual sentiment classification with more than 100k rows?"
- "Compare the top three text embedding models by downloads and licence."
- "Search for recent papers on tool-use benchmarks for language models."

## Details

- **Recommended model:** anthropic/claude-sonnet-4.5 — Sonnet 4.5 handles multi-criteria search well and is good at narrowing a broad Hub query into a shortlist with reasons rather than dumping results.
- **Transport:** http
- **Authentication:** Required — Hugging Face access token from huggingface.co/settings/tokens, sent as an Authorization bearer header. A read token is enough for search.
- **Hosted endpoint:** https://huggingface.co/mcp
- **Official source:** [Hugging Face MCP Server — official repository](https://github.com/huggingface/hf-mcp-server)

## Frequently asked questions

### What is the Hugging Face MCP server?

It is the official MCP server from Hugging Face, hosted at huggingface.co/mcp. It gives AI models search across the Hub — models, datasets, papers and Spaces — and lets you expose selected Spaces as callable tools for an agent to use mid-task.

### Do I need a Hugging Face token?

Yes for the hosted endpoint. Create one at huggingface.co/settings/tokens and send it as an Authorization bearer header. A read-scoped token covers search; you only need write scope if you intend to push to repositories.

### What does "Spaces as tools" mean?

You pick Spaces from huggingface.co/settings/mcp and they become tools your agent can call. That lets a model run a hosted demo — an image generator, a transcriber, a classifier — as one step inside a longer task, rather than you opening the Space by hand.

### Can I run the Hugging Face MCP server locally?

Yes. The hf-mcp-server package can be run locally with npx or Docker if you would rather not use the hosted endpoint, which is useful when you want tighter control over which tools are exposed.

### How do I test the Hugging Face MCP server in a browser?

Paste https://huggingface.co/mcp and your token into the MCP Server Tester to list the tools it exposes, or use MCP Agent Studio to give a real model a search task and watch each tool call and response — no local setup.

---

_Test this server across 40+ models on MCP Playground: https://mcpplaygroundonline.com/mcp-servers/huggingface — free, no install._
