Generated banner for Hf MCP
Generated logo for Hf MCP

Hf MCP

Hugging FaceOfficialPublished by Hugging Face

  • Skill
  • Tool integration
  • Data and AI
  • Apache-2.0
  • Low risk

From the author

Use Hugging Face Hub via MCP server tools. Search models, datasets, Spaces, papers. Get repo details, fetch documentation, run compute jobs, and use Gradio Spaces as AI tools. Available when connected to the HF MCP server.
— the description by Hugging Face

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

The hf-mcp skill enables AI assistants to interact directly with the Hugging Face Hub. By connecting to the Hugging Face MCP server, users can search for models, datasets, research papers, and Spaces. It also provides functionality to fetch repository documentation, execute compute jobs on cloud infrastructure, and utilize Gradio Spaces as functional tools within an agentic workflow.

What it does

  • Search and retrieve details for models, datasets, and research papers.
  • Fetch and read repository documentation and model cards.
  • Discover and invoke Gradio Spaces as functional AI tools.
  • Execute and manage compute jobs on cloud GPU or CPU resources.
  • Schedule recurring tasks using cron expressions.
  • Access library documentation for Hugging Face tools.

When to use it

  • When you need to find or compare machine learning models and datasets.
  • When you want to run training or inference scripts on cloud hardware.
  • When you need to integrate specific Gradio-based applications into your workflow.
  • When researching the latest papers or library documentation for AI development.
  • When automating data synchronization or recurring compute tasks.

Advantages

  • Direct access to a vast ecosystem of models and datasets.
  • Seamless transition from model discovery to execution.
  • Ability to use external Gradio apps as modular tools.
  • Support for both interactive and scheduled compute jobs.

Usage examples

“Find the best model for code generation”
The agent performs a model search filtered by task and query, then retrieves the repository details including the readme for the top result.
“Run my training script on an A10G”
The agent initiates a compute job on the specified hardware flavor using the provided container image and training commands.
“Find a tool that can remove image backgrounds”
The agent searches for relevant Gradio Spaces, views the required parameters, and invokes the space to process the image.
“What's happening with my training job?”
The agent queries the status of active jobs and retrieves the logs for a specific job identifier.

Install

  1. Download the skill as a ZIP:

    https://autogineer.com/agent-skills/huggingface/hf-mcp/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip hf-mcp.zip -d .agents/skills

Documentation by Hugging Face

Hugging Face MCP Server

Connect AI assistants to the Hugging Face Hub. Setup: https://huggingface.co/settings/mcp

Use Cases & Examples

Find the Best Model for a Task
User: "Find the best model for code generation"

1. model_search(task="text-generation", query="code", sort="trendingScore", limit=10)
2. hub_repo_details(repo_ids=["top-result-id"], include_readme=true)
Compare Models from Different Providers
User: "Compare Llama vs Qwen for text generation"

1. model_search(author="meta-llama", task="text-generation", sort="downloads", limit=5)
2. model_search(author="Qwen", task="text-generation", sort="downloads", limit=5)
3. hub_repo_details(repo_ids=["meta-llama/Llama-3.2-1B", "Qwen/Qwen3-8B"], include_readme=true)
Find Training Datasets
User: "Find datasets for sentiment analysis in English"

1. dataset_search(query="sentiment", tags=["language:en", "task_categories:text-classification"], sort="downloads")
2. hub_repo_details(repo_ids=["top-dataset-id"], repo_type="dataset", include_readme=true)
Discover AI Tools (MCP Spaces)
User: "Find a tool that can remove image backgrounds"

1. space_search(query="background removal", mcp=true)
2. dynamic_space(operation="view_parameters", space_name="result-space-id")
3. dynamic_space(operation="invoke", space_name="result-space-id", parameters="{...}")
Generate Images
User: "Create an image of a robot reading a book"

1. dynamic_space(operation="discover")  # See available tasks
2. gr1_flux1_schnell_infer(prompt="a robot sitting in a library reading a book, warm lighting, detailed")
Research a Topic
User: "What are the latest papers on RLHF?"

1. paper_search(query="reinforcement learning from human feedback", results_limit=10)
2. hub_repo_details(repo_ids=["paper-linked-model"], include_readme=true)  # If paper links to models
Learn How to Use a Library
User: "How do I fine-tune with LoRA using PEFT?"

1. hf_doc_search(query="LoRA fine-tuning", product="peft")
2. hf_doc_fetch(doc_url="https://huggingface.co/docs/peft/...")
Run a Quick GPU Job
User: "Run this Python script on a GPU"

hf_jobs(operation="uv", args={
  "script": "# /// script\n# dependencies = [\"torch\"]\n# ///\nimport torch\nprint(torch.cuda.is_available())",
  "flavor": "t4-small"
})
Train a Model on Cloud GPU
User: "Run my training script on an A10G"

hf_jobs(operation="run", args={
  "image": "pytorch/pytorch:2.5.1-cuda12.4-cudnn9-runtime",
  "command": ["/bin/sh", "-lc", "pip install transformers trl && python train.py"],
  "flavor": "a10g-small",
  "secrets": {"HF_TOKEN": "$HF_TOKEN"}
})
Check Job Status
User: "What's happening with my training job?"

1. hf_jobs(operation="ps")
2. hf_jobs(operation="logs", args={"job_id": "job-xxxxx"})
User: "What models are trending right now?"

model_search(sort="trendingScore", limit=20)
Get Model Card Details
User: "Tell me about Mistral-7B"

hub_repo_details(repo_ids=["mistralai/Mistral-7B-v0.1"], include_readme=true)
Find Quantized Models
User: "Find GGUF versions of Llama 3"

model_search(query="Llama 3 GGUF", sort="downloads", limit=10)
Use a Gradio Space as a Tool
User: "Transcribe this audio file"

1. space_search(query="speech to text transcription", mcp=true)
2. dynamic_space(operation="view_parameters", space_name="openai/whisper")
3. dynamic_space(operation="invoke", space_name="openai/whisper", parameters="{\"audio\": \"...\"}")
Schedule Recurring Jobs
User: "Run this data sync every day at midnight"

hf_jobs(operation="scheduled uv", args={
  "script": "...",
  "cron": "0 0 * * *",
  "flavor": "cpu-basic"
})

Tool Selection Guide

GoalTool
Find modelsmodel_search
Find datasetsdataset_search
Find Spaces/appsspace_search
Find paperspaper_search
Get repo README/detailshub_repo_details
Learn library usagehf_doc_search → hf_doc_fetch
Run code on GPU/CPUhf_jobs
Use Gradio apps as toolsdynamic_space
Generate imagesgr1_flux1_schnell_infer or dynamic_space
Check authhf_whoami

Tips

  • Use sort="trendingScore" to find what's popular now

  • Use sort="downloads" to find battle-tested options

  • Set mcp=true in space_search to find Spaces usable as tools

  • Use include_readme=true in hub_repo_details for full model/dataset documentation

  • For jobs accessing private repos, always include secrets: {"HF_TOKEN": "$HF_TOKEN"}

  • Use dynamic_space(operation="discover") to see all available Space-based tasks

Files

ATTRIBUTION.md

Attribution

This folder is an unmodified copy of the Agent Skill "hf-mcp", distributed by AutoGineer (https://autogineer.com/agent-skills).

The skill's own files are unmodified copies. AutoGineer is not affiliated with or endorsed by the author or the publisher.

Files added by AutoGineer

  • ATTRIBUTION.md: this file, written by AutoGineer

  • LICENSE: copied from LICENSE

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Needs an MCP server, Needs Python

Security

What our scanner noticed· Low risk

  • Instructions that use the network

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Published by
Hugging Face
Publisher
Hugging Face (Official)
Source
huggingface/skills · hf-mcp/skills/hf-mcp · commit 25910b3
Licence
Apache License 2.0 (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Hugging Face or Hugging Face.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download hf-mcp.zip