Hugging Face
Build, train and deploy state of the art models powered by the reference open source in machine learning.
Verdict
Common use cases
- Find pre-trained models for a new feature
- Validate dataset structure before training
- Organize team models into shared collections
- Check discussion status on forked repositories
- Determine upload method for large model files
Integration
- Vendor
- Hugging Face
- Category
- other
- Auth
- API_KEY
- Tools
- 50
- Composio slug
hugging_face
Tools
- Change Discussion Status
Tool to change the status of a Hugging Face repository discussion. Use when you need to open or close discussions on models, datasets, or spaces.
- Check Dataset File Upload Method
Tool to check if files should be uploaded via Large File Storage (LFS) or directly to a Hugging Face dataset repository. Use before uploading files to determine the correct upload method for each file based on size and repository settings.
- Check Dataset Validity
Tool to check whether a specific dataset is valid on Hugging Face Hub. Use when you need to determine what features (preview, viewer, search, filter, statistics) are available for a dataset.
- Check Models Upload Method
Tool to check if files should be uploaded through the Large File mechanism or directly. Use when preparing to upload files to a Hugging Face model repository to determine the appropriate upload method for each file.
- Check Spaces Upload Method
Tool to check if files should be uploaded through the Large File mechanism or directly to Hugging Face Spaces. Use when preparing to upload files to a Hugging Face Space repository to determine the appropriate upload method for each file.
- Claim Paper Authorship
Tool to claim authorship of a paper on Hugging Face. Use when you need to associate yourself or another user with an ArXiv paper.
- Create Collection
Tool to create a new collection on Hugging Face. Use when you need to organize and curate models, datasets, spaces, papers, or other collections into a named collection.
- Create Datasets Branch
Tool to create a new branch in a Hugging Face dataset repository. Use when you need to create a branch for versioning or experimentation with dataset changes.
- Create Datasets Commit
Tool to create a commit in a Hugging Face dataset repository. Use when you need to add, update, or delete files in a dataset. Supports both regular files and Large File Storage (LFS) for large binary files. Can optionally create a pull requ
- Create Datasets Tag
Tool to create a tag on a Hugging Face dataset repository. Use when you need to mark a specific revision with a named tag.
- Create Discussion
Tool to create a new discussion on a Hugging Face repository (model, dataset, or Space). Use when you need to start a conversation, report an issue, or create a pull request discussion.
- Create Discussion Comment
Tool to create a new comment on a Hugging Face repository discussion. Use when you need to add comments or replies to discussions on models, datasets, or spaces.
- Create models branch
Tool to create a new branch in a Hugging Face model repository. Use when you need to create a branch for experimenting with model changes, versioning, or creating isolated development environments.
- Create Models Commit
Tool to create a commit to a Hugging Face model repository. Use when you need to add, update, or delete files in a model repository. Supports both standard JSON and JSON-lines (NDJSON) formats. JSON-lines format is recommended for better pe
- Create Models Tag
Tool to create a tag on a Hugging Face model repository. Use when you need to mark a specific revision with a named tag.
- Create or update Space secret
Tool to create or update a secret in a Hugging Face Space. Use when you need to add or update environment variables or sensitive configuration values for a Space. This action upserts the secret, meaning it will create a new secret if it doe
- Create or update Space variable
Tool to create or update a variable in a Hugging Face Space. Use when you need to add or update environment variables or configuration values for a Space. This action upserts the variable, meaning it will create a new variable if it doesn't
- Create Paper Comment
Tool to create a new comment on a Hugging Face paper. Use when you need to add comments or feedback to research papers on Hugging Face.
- Create Papers Comment Reply
Tool to create a reply to a comment on a Hugging Face paper. Use when you need to respond to an existing comment on a paper discussion.
- Create Papers Index
Tool to index a paper from arXiv by its ID on Hugging Face. Use when you need to make a paper searchable and accessible on the platform. Note: If the paper is already indexed, only its authors can re-index it.
- Create Repository
Tool to create a new repository (model, dataset, or Space) on Hugging Face Hub. Use when you need to initialize a new repository for uploading models, datasets, or deploying Spaces applications.
- Create spaces branch
Tool to create a new branch in a Hugging Face space repository. Use when you need to create a branch for experimenting with space changes, versioning, or creating isolated development environments.
- Create Spaces Commit
Tool to create a commit in a Hugging Face Space repository. Use when you need to add, update, or delete files in a Space. Supports both JSON and NDJSON (recommended) payload formats for commits.
- Create Spaces Tag
Tool to create a tag on a Hugging Face space repository. Use when you need to mark a specific revision with a named tag.
- Create SQL Console Embed
Tool to create a SQL Console embed for querying datasets on Hugging Face. Use when you need to create a shareable SQL query interface for exploring dataset splits. The embed allows users to execute SQL queries against dataset views (e.g., t
- Create Webhook
Tool to create a webhook on Hugging Face that triggers on repository or discussion events. Use when you need to receive notifications for changes to specific models, datasets, or spaces.
- Delete dataset branchdestructive
Tool to delete a branch from a Hugging Face dataset repository. Use when you need to remove a branch that is no longer needed. This action permanently removes the specified branch from the dataset.
- Delete Dataset Tagdestructive
Tool to delete a tag from a Hugging Face dataset. Use when you need to remove a specific tag revision from a dataset repository.
- Delete discussiondestructive
Tool to delete a discussion from a Hugging Face repository. Use when you need to remove a discussion that is no longer needed. This action permanently removes the specified discussion from the repository.
- Delete network CIDR listdestructive
Tool to delete a network CIDR list entry from Hugging Face Inference Endpoints. Use when you need to remove a CIDR configuration that is no longer needed. This action permanently removes the specified CIDR from the namespace's network confi
- Delete notificationsdestructive
Tool to delete notifications from Hugging Face. Use when you need to remove notifications either by specific discussion IDs or by applying filters to delete multiple notifications at once. Supports targeted deletion (via discussion_ids) or
- Delete Settings Webhookdestructive
Tool to delete a webhook from Hugging Face settings. Use when you need to remove a webhook configuration that is no longer needed.
- Delete space branchdestructive
Tool to delete a branch from a Hugging Face space repository. Use when you need to remove a branch that is no longer needed. This action permanently removes the specified branch from the space.
- Delete space secretdestructive
Tool to delete a secret from a Hugging Face space. Use when you need to remove sensitive credentials or configuration values that are no longer needed. This action permanently removes the specified secret from the space's environment variab
- Delete Spaces Tagdestructive
Tool to delete a tag from a Hugging Face space. Use when you need to remove a specific tag revision from a space repository.
- Delete space variabledestructive
Tool to delete a variable from a Hugging Face space. Use when you need to remove configuration values or environment variables that are no longer needed. This action permanently removes the specified variable from the space's environment.
- Filter dataset rows
Tool to filter rows in a Hugging Face dataset split based on SQL-like query conditions. Use when you need to search or filter specific rows from a dataset based on column values, or to retrieve sorted subsets of data.
- Generate Chat Completion
Tool to generate a response given a list of messages in a conversational context. Supports both conversational Language Models (LLMs) and Vision-Language Models (VLMs). Compatible with OpenAI SDK.
- Generate Text Embeddings
Tool to convert text into vector embeddings for feature extraction, semantic search, and similarity tasks. Use when you need numerical representations of text for ML applications.
- Get Daily Papers
Tool to retrieve daily papers from Hugging Face. Use when you need to fetch the latest AI/ML research papers shared on Hugging Face.
- Get Dataset Croissant Metadata
Tool to get Croissant metadata about a Hugging Face dataset. Croissant is a metadata format built on schema.org aimed at describing datasets used for machine learning. Use when you need structured metadata in JSON-LD format.
- Get Dataset First Rows
Tool to get the first 100 rows of a dataset split along with column data types and features. Use when you need to preview or sample dataset content.
- Get Dataset Info
Tool to get general information about a dataset including description, citation, homepage, license, and features (column schemas). Use when you need to understand dataset structure, available splits, and metadata before working with the dat
- Get Dataset Repository Info
Tool to retrieve detailed information about a Hugging Face dataset repository. Use when you need metadata, card data, tags, downloads, likes, configurations, or other information about a specific dataset.
- Get Dataset Rows
Tool to retrieve a slice of rows from a Hugging Face dataset split at any given location (offset). Returns up to 100 rows at a time with complete feature type information and no truncation. Use when you need to inspect specific rows from a
- Get Datasets Compare
Tool to get a comparison (diff) between two revisions of a Hugging Face dataset. Use when you need to see what changed between dataset versions or commits.
- Get Dataset Size
Tool to get the size of a Hugging Face dataset including number of rows and size in bytes. Use when you need to determine dataset size, memory requirements, or storage needs for a specific dataset.
- Get Datasets JWT
Tool to generate a JWT token for accessing a Hugging Face dataset repository. Use when you need authenticated access to datasets, optionally with write access for spaces in dev mode, custom expiration, or encryption.
- Pin discussion
Tool to pin or unpin a discussion on a Hugging Face repository (model, dataset, or Space). Use when you need to highlight important discussions by pinning them to the top of the list, or unpin them when they're no longer priority.
- Request Repository Access
Tool to request access to a gated repository on Hugging Face Hub. Use when you need to submit an access request for models, datasets, or Spaces that require approval. The fields required vary by repository.
Setup
Setup guide
- 11. In Switchy, open your workspace settings and navigate to the MCP Integrations tab. 2. Click 'Add Integration' and select Hugging Face from the list. 3. Open huggingface.co/settings/tokens in a new tab and generate a new API token with 'read' and 'write' scopes (or use an existing token with those permissions). 4. Copy the token and paste it into the API Key field in Switchy, then click 'Connect'. 5. Switchy will verify the token and confirm the connection within a few seconds. 6. To test, create or open a Space and type '@huggingface search for sentiment analysis models' — the MCP should return a list of matching repositories. 7. If you see results, the integration is live and ready for your team to use in any Space.
What teammates see: by default, memories from Hugging Face are scoped to the Space (PROJECT visibility) - you can mark any memory PRIVATE or share it ORG-wide.
Works well with
Top models
Compatibility data appears once enough Spaces have used this MCP together with a given model.
How Switchy teams use it
Starter prompts
Find Vision Models
@huggingface search for image classification models sorted by downloads and show me the top 5 with their model IDs and descriptionsOpen in a Space →
Validate Dataset
@huggingface check if the 'squad' dataset is valid and tell me which features are available like preview viewer search and statisticsOpen in a Space →
Create Model Collection
@huggingface create a collection called 'Q1 Production Models' with a description 'Models deployed or under review for Q1 release' and set it to privateOpen in a Space →
Check Upload Method
@huggingface check if a 5GB safetensors file should use LFS or direct upload for the 'myorg/custom-llama' model repositoryOpen in a Space →
Manage Discussion
@huggingface close discussion number 12 in the 'myorg/finance-dataset' repository and confirm the new statusOpen in a Space →
Example outputs
Illustrative - representative of the model's voice and quality, not literal recordings.
@huggingface check if the 'squad' dataset supports preview and search features, then show me what's available
The 'squad' dataset on Hugging Face Hub is valid and supports the following features: dataset preview (enabled), dataset viewer (enabled), search functionality (enabled), filter capabilities (enabled), and statistics generation (enabled). This dataset contains 87,599 training examples and 10,570 validation examples in its default configuration. The preview shows question-answer pairs with context passages from Wikipedia articles. All interactive exploration features are fully functional for this dataset.
This example demonstrates the MCP's ability to validate datasets and report available Hub features before you commit to using them in a workflow. Useful when evaluating whether a dataset meets your team's exploration needs. Requires a valid Hugging Face API key with read access to public datasets.
@huggingface create a new collection called 'Q1 2025 Research Models' and add the 'meta-llama/Llama-3.2-1B' model to it
Created collection 'Q1 2025 Research Models' with slug 'q1-2025-research-models-67a3f2'. The collection is currently private and contains 1 item. Successfully added model 'meta-llama/Llama-3.2-1B' to the collection. You can view and manage this collection at huggingface.co/collections/your-username/q1-2025-research-models-67a3f2. To make it public or add more items (datasets, spaces, papers), use the collection management tools or visit the collection page directly.
This example shows the MCP's ability to organize Hugging Face resources into curated collections, which is valuable for team knowledge management. The operation creates a persistent artifact on your Hugging Face account. Requires write permissions on your account. Collection slugs are auto-generated and permanent once created.
@huggingface I'm about to upload a 2.3GB safetensors file to my model repo 'acme/custom-llama-7b' — should I use LFS or direct upload?
For the file you're uploading to 'acme/custom-llama-7b', you should use Large File Storage (LFS). Files larger than 10MB must be uploaded via LFS on Hugging Face Hub. Your 2.3GB safetensors file exceeds this threshold significantly. The MCP recommends using `huggingface_hub.upload_file()` with LFS enabled, or the `git lfs` command if working locally. Direct upload will fail for files of this size. Ensure your API token has write access to the repository before proceeding.
This example highlights the MCP's pre-flight validation capability, preventing upload failures by checking size thresholds against Hub requirements. Particularly useful when automating model deployment pipelines. The 10MB LFS threshold is a Hugging Face platform constraint, not an MCP limitation. Always verify your token has write scope before attempting uploads.
Use-case deep-dives
When Hugging Face MCP beats Git for model iteration
A 6-person ML research team ships 3-5 experimental model variants per week to internal stakeholders. The Hugging Face MCP lets them branch model repos, check upload methods for large weights files, and update discussion statuses without leaving their AI workspace. This beats raw Git workflows when your team already hosts models on HF Hub and needs to coordinate who's testing which checkpoint. The MCP's 50 tools cover the full repo lifecycle—branching, LFS routing, metadata updates—so you're not context-switching to the web UI or writing custom API scripts. If your models live elsewhere (S3, GCS, internal registry), this MCP adds no value. But if HF Hub is your source of truth and you're iterating fast, the MCP collapses 4-5 manual steps into one conversational exchange.
Hugging Face MCP for dataset validity checks at scale
A 3-person data team maintains 20+ fine-tuning datasets for a product org's LLM features. Before each training run, they need to verify dataset validity (preview, viewer, search availability) and route file uploads correctly (LFS vs. direct). The Hugging Face MCP surfaces these checks in Switchy without opening 20 browser tabs or writing throwaway Python scripts. The win is speed: you ask "which datasets need LFS for the new embeddings files" and get answers in 10 seconds instead of 10 minutes. The threshold: if your datasets rarely change or you're only working with 2-3 repos, the overhead of API key setup and learning the tool names isn't worth it. But once you're managing a portfolio of datasets with weekly updates, the MCP pays for itself in saved context-switching.
When this MCP matters for research attribution workflows
A university lab publishes 8-12 ArXiv papers per year and mirrors models on Hugging Face for reproducibility. The lab manager needs to claim authorship for each paper so the models link back to the correct researchers. The Hugging Face MCP's "Claim Paper Authorship" tool handles this in one step from Switchy, versus logging into HF Hub, finding the paper, and clicking through the claim flow. This is a narrow win: it only matters if you're publishing frequently enough that the manual web flow becomes a tax, and if your team already uses Switchy for other research coordination. For a solo researcher publishing once a quarter, the MCP is overkill. For a lab shipping monthly and tracking attribution across 15 people, it's a small but real time-saver that keeps the workflow in one place.
Frequently asked
What does the Hugging Face MCP do in Switchy?
It lets your team manage Hugging Face repositories — models, datasets, and spaces — directly from Switchy. You can create branches, upload files, manage discussions, claim paper authorship, and organise collections without leaving the workspace. It's useful if your team builds or fine-tunes ML models and needs to coordinate on Hugging Face assets.
Do I need a Hugging Face Pro account to connect this MCP?
No. The MCP uses an API key, which any Hugging Face account can generate. You'll need write access to the repositories you want to manage — so if you're working on an organisation's models or datasets, make sure you're added as a collaborator. Personal free accounts work fine for your own repos.
Can the Hugging Face MCP train or run inference on models?
No. It manages repository metadata and files — creating branches, uploading weights, changing discussion statuses, checking dataset validity. If you need to actually train or run a model, use Hugging Face's Inference API or Spaces directly. This MCP is for repo administration, not compute.
Why use this instead of the Hugging Face web UI or CLI?
Use the MCP when your team's ML workflow lives in Switchy alongside other tools. You can automate repo tasks — like creating a branch after a training run or uploading a dataset from a pipeline — without context-switching. If you're only doing one-off uploads, the web UI or CLI is faster.
Who on the team should connect the Hugging Face MCP?
Whoever owns the API key will grant Switchy access to their Hugging Face repositories. If you're working on shared organisation repos, connect it with a service account or a team member who has write access to all the models and datasets you need to manage.