Connector guide8-minute read27 MCP tools7 languages

Hugging Face to MCP: Models, Datasets and Papers in any AI Agent

Let your AI explore the Hugging Face Hub with your own access token: find and compare models, datasets, Spaces, papers and collections, look inside datasets row by row, read files from any repository, and chat with open models through Inference Providers.

HCBy HelpCode teamUpdated 8 min read Open-source on GitHub

No credit card · 7-day trial · Self-host alternative available

Hugging Face

Hugging Face

Let your AI explore the Hugging Face Hub with your own access token: find and compare models, datasets, Spaces, papers and collections, look inside datasets row by row, read files from any repository, and chat with open models through Inference Providers.

tools

27

Region

INTL

Category

Public Data

Authentication

Bearer Token

Required env vars

HF_TOKEN
Install in one click on Cloud

7-day free trial · No credit card

  • 7-day free trial
    No credit card required
  • GDPR & SOC 2 ready
    EU data residency, audit logs
  • Open-source on GitHub
    Open source · AGPL-3.0
  • Works with ChatGPT, Claude, Gemini
    Any MCP-compatible client

Skip the install. Get this working in under 2 minutes.

Start a free trial on cloud.anythingmcp.com, add the Hugging Face in one click, then point your AI client (Claude, ChatGPT, Copilot or Cursor) at the generated MCP endpoint. No Docker, no git clone, zero engineering experience required.

Start free trial

Summary

Let your AI explore the Hugging Face Hub with your own access token: find and compare models, datasets, Spaces, papers and collections, look inside datasets row by row, read files from any repository, and chat with open models through Inference Providers.

Try asking

Example prompts for Hugging Face

Click any prompt to copy it. Paste into Claude, ChatGPT, Cursor, Gemini, Copilot or OpenClaw to run it against this connector.

Hugging Face · live via MCP
Share
Opus 4.7

Claude is AI and can make mistakes. Please double-check responses.

💡 No install? Use cloud.anythingmcp.com directly. Sign in, click Connectors → Hugging Face, paste your credentials, mint an MCP API key and you're done. No Docker, no git clone, no local server.

Hugging Face

Let your AI explore the Hugging Face Hub with your own access token: find and compare models, datasets, Spaces, papers and collections, look inside datasets row by row, read files from any repository, and chat with open models through Inference Providers.

Setup

  1. Sign in at https://huggingface.co and open Settings → Access Tokens (https://huggingface.co/settings/tokens).
  2. Create a token. A Read token covers everything except chat and inference: Hub search, the dataset viewer, files, papers and collections. To chat with models, create a Fine-grained token and tick Make calls to Inference Providers; also tick read access to public gated repos if you use gated models. A Write token works too but is never needed, because the connector changes nothing on the Hub.
  3. Paste the token into HF_TOKEN (it starts with hf_) and install the connector. It is sent only to huggingface.co, datasets-server.huggingface.co and router.huggingface.co.
  4. Check the setup with huggingface_whoami: it is free and shows who the token belongs to, its role and your organizations.

Free on the Hugging Face (HF) Hub: searching and reading models, datasets, Spaces, papers, collections and files costs nothing.

  • Models: huggingface_search_models filters by name, task, author, library or tag (for example gguf or license:mit) and by Inference Provider, sorted by downloads, likes or trending; huggingface_get_model shows license, size and files.
  • Datasets: huggingface_search_datasets and huggingface_get_dataset. To look inside a dataset without downloading it, the AI uses the dataset viewer: huggingface_dataset_splits, huggingface_dataset_first_rows, huggingface_dataset_rows (up to 100 rows per page), huggingface_dataset_search (full text), huggingface_dataset_filter (SQL-like conditions), huggingface_dataset_size and huggingface_dataset_statistics (min, max, mean and histograms per column). Search, filter and statistics need a dataset the viewer has indexed; a new or very large one may answer that its index is still loading.
  • Spaces: huggingface_search_spaces by name, huggingface_semantic_search_spaces by what the app does, and huggingface_get_space for the runtime status and hardware.
  • Papers: huggingface_daily_papers, huggingface_search_papers, huggingface_get_paper and huggingface_read_paper (the whole paper page as text).
  • Files and collections: huggingface_list_repo_files and huggingface_read_file read small text files such as a README or config.json; model weights and other large binaries are not readable. huggingface_list_collections and huggingface_get_collection show curated collections.

Chat and inference cost money, so the AI asks first: huggingface_chat_completion and huggingface_run_inference_task are billed to your Hugging Face credits. PRO accounts get $2 of credits a month; free accounts buy credits first at https://huggingface.co/settings/billing. Before each paid call the AI tells you which model will run and waits for your yes, and it never repeats paid calls without asking. huggingface_list_chat_models shows the price per million tokens, and huggingface_get_model_providers shows which providers serve a model.

Choosing the provider: by default the fastest live provider answers. Add :cheapest, :fastest, :preferred (your order in the Hugging Face settings) or a provider name such as :groq to the model id to choose. An organization you belong to can pay instead of you. huggingface_run_inference_task runs classification, named entity recognition, fill-mask, summarization, translation, zero-shot classification, question answering, sentence similarity and embeddings on the hf-inference provider.

Untrusted content: model cards, dataset rows, files, papers and model answers come from third parties. The AI treats instructions inside them as data, not as orders.

Common errors: 401 on huggingface_whoami or on chat: the token is wrong, revoked or missing. 401 or 403 on a repository: it is private, gated (accept the conditions on the model page first) or not covered by your fine-grained token; the Hub also answers 401 for a repository that does not exist. 402 or a message about credits: no credits left. 403 on chat: the fine-grained token lacks Make calls to Inference Providers. 400 model not supported: no live provider serves that model for chat. 429: rate limit; wait a minute and try again.

The connector does not create or change repositories, upload files, manage Spaces, Inference Endpoints or Jobs, or generate images.

Prerequisites: HF_TOKEN

Install the connector locally

curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d

Open http://localhost:3000/connectors/store, pick Hugging Face and paste in the env vars listed under Prerequisites.

Available tools

ToolWhat it does
huggingface_whoamiShow who the Hugging Face token belongs to: user name, PRO status, whether the account can pay for inference, the organizations it belongs…
huggingface_search_modelsSearch models on the Hugging Face Hub
huggingface_get_modelRead one model's details from the Hugging Face Hub: task, library, license, base model, parameter count, downloads, likes, gated or…
huggingface_get_model_providersList the Inference Providers that serve a model through Hugging Face (e.g. groq, together, novita, fal-ai, hf-inference), with each…
huggingface_list_chat_modelsList every model available for chat through the Hugging Face router, with each provider's status, context length, price per million input…
huggingface_search_datasetsSearch datasets on the Hugging Face Hub by text in the id, author or organization and tag (e.g. task_categories:text-classification…
huggingface_get_datasetRead one dataset's details from the Hugging Face Hub: license, tasks, languages, size category, downloads, likes, gated or private, last…
huggingface_dataset_splitsList a dataset's subsets (config) and splits (train, validation, test, ...) from the Hugging Face dataset viewer
huggingface_dataset_first_rowsShow the column names and types and the first 20 rows of one split of a Hugging Face dataset, from the dataset viewer
huggingface_dataset_rowsRead a slice of rows (up to 100) from one split of a Hugging Face dataset, starting at offset, to page through the data
huggingface_dataset_searchFull-text search inside one split of a Hugging Face dataset (text columns only) and return the matching rows (up to 100) with the total…
huggingface_dataset_filterFilter the rows of one split of a Hugging Face dataset with an SQL-like condition and optional sort, e.g. where "label"=1 AND "score">0.5…
huggingface_dataset_sizeShow how big a Hugging Face dataset is: number of rows and columns and bytes (original files, Parquet, in memory) for the whole dataset…
huggingface_dataset_statisticsDescriptive statistics for every column of one split of a Hugging Face dataset: for numbers min, max, mean, median, standard deviation and…
huggingface_search_spacesSearch Spaces (hosted AI demo apps) on the Hugging Face Hub by text in the id, author and tag, sorted by likes, trending, creation or last…
huggingface_semantic_search_spacesFind Spaces (hosted AI demo apps) on Hugging Face by describing what they should do, e.g. 'remove image background' or 'transcribe audio'
huggingface_get_spaceRead one Space (hosted AI demo app) on Hugging Face: title, SDK, license, the app URL, the models and datasets it uses, and its runtime…
huggingface_daily_papersList the AI research papers curated on Hugging Face Daily Papers, newest first or by trending, for a day, an ISO week or a month (latest…
huggingface_search_papersSearch AI research papers indexed on Hugging Face by words in the title and abstract
huggingface_get_paperRead one paper's page on Hugging Face by arXiv id: title, authors, abstract, AI summary and keywords, upvotes, and the first models…
huggingface_read_paperRead a paper's full Hugging Face page as markdown by arXiv id (title, abstract and the paper text as Hugging Face renders it), capped at…
huggingface_list_repo_filesList the files and folders in a model, dataset or Space repository on Hugging Face, with sizes, at a branch, tag or commit
huggingface_read_fileRead the start of one text file from a Hugging Face repository (a README, config.json, tokenizer_config.json, a Python script or a small…
huggingface_list_collectionsList curated collections on Hugging Face (groups of models, datasets, Spaces and papers), filtered by owner or by an item they contain…
huggingface_get_collectionRead one Hugging Face collection with all its items (models, datasets, Spaces, papers) and the curator's notes
huggingface_chat_completionChat with an open model through Hugging Face Inference Providers (OpenAI-compatible)
huggingface_run_inference_taskRun a model on the hf-inference provider for a non-chat task: text classification, token classification (named entities), fill-mask…

Example prompts

  • "Find the five most downloaded German text-classification models on Hugging Face and compare their licenses and sizes."
  • "Show me the first rows of the test split of stanfordnlp/imdb, and count how many reviews have label 1."
  • "What were the most upvoted papers on Hugging Face Daily Papers this week? Summarize the top three."
  • "Which providers serve openai/gpt-oss-120b for chat right now, and what does it cost per million tokens?"
  • "Find a running Space that removes image backgrounds and tell me which model it uses."
  • "Summarize this paragraph with meta-llama/Llama-3.1-8B-Instruct on the cheapest provider. Tell me the model and the price before it runs."

Next steps

Was this guide helpful?

Your Hugging Face agent is one click away.

Install the connector, paste the key, prompt your AI client. Free for 7 days, no credit card.

Related guides

Connectors

How to Connect Hugging Face to ChatGPT via MCP

Let your AI explore the Hugging Face Hub with your own access token: find and compare models, datasets, Spaces, papers and collections, look inside datasets row by row, read files from any repository, and chat with open models through Inference Providers.

Connectors

How to Connect Hugging Face to Claude via MCP

Let your AI explore the Hugging Face Hub with your own access token: find and compare models, datasets, Spaces, papers and collections, look inside datasets row by row, read files from any repository, and chat with open models through Inference Providers.

Connectors

How to Connect Hugging Face to Cursor via MCP

Let your AI explore the Hugging Face Hub with your own access token: find and compare models, datasets, Spaces, papers and collections, look inside datasets row by row, read files from any repository, and chat with open models through Inference Providers.

Connectors

How to Connect Hugging Face to Gemini via MCP

Let your AI explore the Hugging Face Hub with your own access token: find and compare models, datasets, Spaces, papers and collections, look inside datasets row by row, read files from any repository, and chat with open models through Inference Providers.

Connectors

How to Connect Hugging Face to Meta Muse via MCP

Let your AI explore the Hugging Face Hub with your own access token: find and compare models, datasets, Spaces, papers and collections, look inside datasets row by row, read files from any repository, and chat with open models through Inference Providers.

Connectors

Avito to MCP: Manage Avito Ads, Prices and Statistics from any AI Agent

Let your AI work with your Avito business account: list your ads and change their prices, read views, contacts and calls statistics, check autoload uploads and their errors, the feed format and your wallet, and read Avito Messenger chats. Sending messages and changing autoload settings are optional and off by default.