Guida al connettore8 minuti di lettura27 tool MCP7 lingue

Come collegare Hugging Face a Gemini via MCP

Fai esplorare alla tua AI l'Hugging Face Hub con il tuo access token: trova e confronta modelli, dataset, Spaces, paper e collection, guarda dentro i dataset riga per riga, leggi i file di qualsiasi repository e chatta con modelli aperti tramite Inference Providers.

HCA cura del team HelpCodeAggiornato 8 min di lettura Open source su GitHub

Nessuna carta di credito · 7 giorni di prova · Alternativa self-host disponibile

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.

tool

27

Regione

INTL

Categoria

Dati pubblici

Autenticazione

Bearer Token

Env vars richieste

HF_TOKEN
Installa con un clic su Cloud

7 giorni di prova gratuita · Nessuna carta di credito

  • Prova gratuita di 7 giorni
    Nessuna carta di credito
  • GDPR & SOC 2 ready
    Dati in UE, log di audit
  • Open source su GitHub
    Open source · AGPL-3.0
  • Funziona con ChatGPT, Claude, Gemini
    Qualsiasi client compatibile MCP

Salta l'installazione. Attivo in meno di 2 minuti.

Avvia una prova gratuita su cloud.anythingmcp.com, aggiungi Hugging Face con un clic, poi punta il tuo client AI (Claude, ChatGPT, Copilot o Cursor) all'endpoint MCP generato. Niente Docker, niente git clone, nessuna esperienza di sviluppo richiesta.

Inizia la prova gratuita

In breve

Fai esplorare alla tua AI l'Hugging Face Hub con il tuo access token: trova e confronta modelli, dataset, Spaces, paper e collection, guarda dentro i dataset riga per riga, leggi i file di qualsiasi repository e chatta con modelli aperti tramite Inference Providers.

Prova a chiedere

Prompt di esempio per Hugging Face

Clicca su un prompt per copiarlo. Incollalo in Claude, ChatGPT, Cursor, Gemini, Copilot o OpenClaw per eseguirlo contro questo connettore.

Hugging Face · live via MCP
Condividi
Opus 4.7

Claude è un'AI e può sbagliare. Verifica sempre le risposte.

💡 Niente installazione? Vai direttamente su cloud.anythingmcp.com. Accedi, clicca Connectors → Hugging Face, inserisci le credenziali, genera una MCP API key e hai finito. Niente Docker, niente git clone, niente server locale.

Hugging Face + Gemini

Fai esplorare alla tua AI l'Hugging Face Hub con il tuo access token: trova e confronta modelli, dataset, Spaces, paper e collection, guarda dentro i dataset riga per riga, leggi i file di qualsiasi repository e chatta con modelli aperti tramite Inference Providers.

Prerequisiti

Le istruzioni di setup complete sono incluse nel connettore stesso (visibili nello store quando lo selezioni). Le variabili d'ambiente richieste sono:

HF_TOKEN

Step 1 — Ottieni le credenziali

  1. Accedi a https://huggingface.co e apri Settings → Access Tokens (https://huggingface.co/settings/tokens).
  2. Crea un token. Un token Read copre tutto tranne chat e inferenza: ricerca sull'Hub, dataset viewer, file, paper e collection. Per chattare con i modelli crea un token Fine-grained e spunta Make calls to Inference Providers; spunta anche l'accesso in lettura ai repo gated pubblici se usi modelli gated. Anche un token Write funziona, ma non serve mai, perché il connettore non modifica nulla sull'Hub.
  3. Incolla il token in HF_TOKEN (inizia con hf_) e installa il connettore. Viene inviato solo a huggingface.co, datasets-server.huggingface.co e router.huggingface.co.
  4. Verifica la configurazione con huggingface_whoami: è gratuito e mostra a chi appartiene il token, il suo ruolo e le tue organizzazioni.

Gratis sull'Hugging Face (HF) Hub: cercare e leggere modelli, dataset, Spaces, paper, collection e file non costa nulla.

  • Modelli: huggingface_search_models filtra per nome, task, autore, libreria o tag (per esempio gguf o license:mit) e per Inference Provider, ordinando per download, like o tendenza; huggingface_get_model mostra licenza, dimensioni e file.
  • Dataset: huggingface_search_datasets e huggingface_get_dataset. Per guardare dentro un dataset senza scaricarlo, l'AI usa il dataset viewer: huggingface_dataset_splits, huggingface_dataset_first_rows, huggingface_dataset_rows (fino a 100 righe per pagina), huggingface_dataset_search (testo completo), huggingface_dataset_filter (condizioni in stile SQL), huggingface_dataset_size e huggingface_dataset_statistics (minimo, massimo, media e istogrammi per colonna). Ricerca, filtro e statistiche richiedono un dataset indicizzato dal viewer; uno nuovo o molto grande può rispondere che il suo indice è ancora in caricamento.
  • Spaces: huggingface_search_spaces per nome, huggingface_semantic_search_spaces in base a cosa fa l'app e huggingface_get_space per stato di esecuzione e hardware.
  • Paper: huggingface_daily_papers, huggingface_search_papers, huggingface_get_paper e huggingface_read_paper (l'intera pagina del paper come testo).
  • File e collection: huggingface_list_repo_files e huggingface_read_file leggono piccoli file di testo come un README o config.json; i pesi dei modelli e altri file binari grandi non sono leggibili. huggingface_list_collections e huggingface_get_collection mostrano le collection curate.

Chat e inferenza costano, quindi l'AI chiede prima: huggingface_chat_completion e huggingface_run_inference_task sono addebitati sui tuoi crediti Hugging Face. Gli account PRO ricevono 2 dollari di crediti al mese; gli account gratuiti devono prima acquistare crediti su https://huggingface.co/settings/billing. Prima di ogni chiamata a pagamento l'AI ti dice quale modello userà e aspetta il tuo sì, e non ripete mai chiamate a pagamento senza chiedere. huggingface_list_chat_models mostra il prezzo per milione di token e huggingface_get_model_providers quali provider servono un modello.

Scegliere il provider: per impostazione predefinita risponde il provider attivo più veloce. Aggiungi :cheapest, :fastest, :preferred (il tuo ordine nelle impostazioni di Hugging Face) o il nome di un provider come :groq all'id del modello per scegliere tu. Un'organizzazione di cui fai parte può pagare al posto tuo. huggingface_run_inference_task esegue classificazione, riconoscimento di entità, fill-mask, riassunto, traduzione, classificazione zero-shot, risposta a domande, similarità tra frasi ed embedding sul provider hf-inference.

Contenuti non affidabili: model card, righe dei dataset, file, paper e risposte dei modelli provengono da terzi. L'AI tratta le istruzioni che contengono come dati, non come ordini.

Errori comuni: 401 su huggingface_whoami o in chat: il token è errato, revocato o mancante. 401 o 403 su un repository: è privato, gated (accetta prima le condizioni nella pagina del modello) o il tuo token fine-grained non lo copre; l'Hub risponde 401 anche per un repository che non esiste. 402 o un messaggio sui crediti: i crediti sono finiti. 403 in chat: al token fine-grained manca Make calls to Inference Providers. 400 model not supported: nessun provider attivo serve quel modello per la chat. 429: limite di frequenza; attendi un minuto e riprova.

Il connettore non crea né modifica repository, non carica file, non gestisce Spaces, Inference Endpoints o Jobs e non genera immagini.

Step 2 — Installa l'adapter

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

Step 3 — Aggiungi il connettore in Gemini

L'URL del tuo server: in AnythingMCP apri MCP Servers → il server su cui si trova questo connettore e copia il suo URL (https://cloud.anythingmcp.com/mcp/…). Usalo ovunque questa guida mostra YOUR_SERVER_ID.

Gemini CLI legge i server MCP da ~/.gemini/settings.json (su Windows %USERPROFILE%\.gemini\settings.json). Aggiungi:

{
  "mcpServers": {
    "anythingmcp": {
      "httpUrl": "https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID",
      "headers": { "X-API-Key": "YOUR_MCP_API_KEY" }
    }
  }
}
  1. Crea una chiave API MCP in AnythingMCP da MCP Servers → il tuo server → API keys e incollala al posto di YOUR_MCP_API_KEY.
  2. Salva il file e riavvia gemini.
  3. Esegui /mcp in Gemini CLI (oppure gemini mcp list dal terminale): anythingmcp dovrebbe risultare connesso.
  4. Inizia a scrivere prompt: Gemini CLI ora può chiamare i tool di Hugging Face.

Tool disponibili

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…

Esempi di prompt

  • "Trova i cinque modelli di classificazione del testo in italiano più scaricati su Hugging Face e confronta licenze e dimensioni."
  • "Mostrami le prime righe dello split test di stanfordnlp/imdb e conta quante recensioni hanno label 1."
  • "Quali paper hanno avuto più upvote questa settimana su Hugging Face Daily Papers? Riassumi i primi tre."
  • "Quali provider servono adesso openai/gpt-oss-120b per la chat e quanto costa per milione di token?"
  • "Trova uno Space attivo che rimuove lo sfondo dalle immagini e dimmi quale modello usa."
  • "Riassumi questo paragrafo con meta-llama/Llama-3.1-8B-Instruct sul provider più economico. Dimmi modello e prezzo prima di eseguirlo."

FAQ

Dove cerca i server MCP Gemini CLI? In ~/.gemini/settings.json per il tuo utente, oppure in .gemini/settings.json dentro un progetto. gemini mcp list mostra ogni server e se si connette.

Prossimi passi

Questa guida ti è stata utile?

Il tuo agente Hugging Face è a un clic di distanza.

Installa il connettore, incolla la chiave, chiedi a Gemini. 7 giorni gratis, senza carta di credito.

Guide correlate

Connettori

Come collegare Hugging Face a ChatGPT via MCP

Fai esplorare alla tua AI l'Hugging Face Hub con il tuo access token: trova e confronta modelli, dataset, Spaces, paper e collection, guarda dentro i dataset riga per riga, leggi i file di qualsiasi repository e chatta con modelli aperti tramite Inference Providers.

Connettori

Come collegare Hugging Face a Claude via MCP

Fai esplorare alla tua AI l'Hugging Face Hub con il tuo access token: trova e confronta modelli, dataset, Spaces, paper e collection, guarda dentro i dataset riga per riga, leggi i file di qualsiasi repository e chatta con modelli aperti tramite Inference Providers.

Connettori

Come collegare Hugging Face a Cursor via MCP

Fai esplorare alla tua AI l'Hugging Face Hub con il tuo access token: trova e confronta modelli, dataset, Spaces, paper e collection, guarda dentro i dataset riga per riga, leggi i file di qualsiasi repository e chatta con modelli aperti tramite Inference Providers.

Connettori

Come collegare Hugging Face a Meta Muse via MCP

Fai esplorare alla tua AI l'Hugging Face Hub con il tuo access token: trova e confronta modelli, dataset, Spaces, paper e collection, guarda dentro i dataset riga per riga, leggi i file di qualsiasi repository e chatta con modelli aperti tramite Inference Providers.

Connettori

Hugging Face su MCP: modelli, dataset e paper in qualsiasi agente AI

Fai esplorare alla tua AI l'Hugging Face Hub con il tuo access token: trova e confronta modelli, dataset, Spaces, paper e collection, guarda dentro i dataset riga per riga, leggi i file di qualsiasi repository e chatta con modelli aperti tramite Inference Providers.

Connettori

Come collegare Avito a Gemini via MCP

Fai lavorare la tua AI con il tuo account business Avito: elenca gli annunci e cambiane i prezzi, leggi le statistiche di visualizzazioni, contatti e chiamate, controlla i caricamenti autoload e i loro errori, il formato del feed e il tuo portafoglio, e leggi le chat di Avito Messenger. Inviare messaggi e cambiare le impostazioni autoload sono opzionali e disattivati di default.