# How to integrate Hugging Face MCP with OpenCode

```json
{
  "title": "How to integrate Hugging Face MCP with OpenCode",
  "toolkit": "Hugging Face",
  "toolkit_slug": "hugging_face",
  "framework": "OpenCode",
  "framework_slug": "opencode",
  "url": "https://composio.dev/toolkits/hugging_face/framework/opencode",
  "markdown_url": "https://composio.dev/toolkits/hugging_face/framework/opencode.md",
  "updated_at": "2026-03-29T06:37:48.003Z"
}
```

## Introduction

### How to integrate Hugging Face MCP with OpenCode
This guide explains how to connect Hugging Face MCP to OpenCode using Composio Connect, which simplifies OAuth, API changes, and reliability concerns.
There are two ways to set this up:
- Via [Composio Connect MCP](https://dashboard.composio.dev/)
- Via the [Composio CLI](https://dashboard.composio.dev/)

## Also integrate Hugging Face with

- [ChatGPT](https://composio.dev/toolkits/hugging_face/framework/chatgpt)
- [OpenAI Agents SDK](https://composio.dev/toolkits/hugging_face/framework/open-ai-agents-sdk)
- [Claude Agent SDK](https://composio.dev/toolkits/hugging_face/framework/claude-agents-sdk)
- [Claude Code](https://composio.dev/toolkits/hugging_face/framework/claude-code)
- [Claude Cowork](https://composio.dev/toolkits/hugging_face/framework/claude-cowork)
- [Codex](https://composio.dev/toolkits/hugging_face/framework/codex)
- [Cursor](https://composio.dev/toolkits/hugging_face/framework/cursor)
- [VS Code](https://composio.dev/toolkits/hugging_face/framework/vscode)
- [OpenClaw](https://composio.dev/toolkits/hugging_face/framework/openclaw)
- [Hermes](https://composio.dev/toolkits/hugging_face/framework/hermes-agent)
- [CLI](https://composio.dev/toolkits/hugging_face/framework/cli)
- [Google ADK](https://composio.dev/toolkits/hugging_face/framework/google-adk)
- [LangChain](https://composio.dev/toolkits/hugging_face/framework/langchain)
- [Vercel AI SDK](https://composio.dev/toolkits/hugging_face/framework/ai-sdk)
- [Mastra AI](https://composio.dev/toolkits/hugging_face/framework/mastra-ai)
- [LlamaIndex](https://composio.dev/toolkits/hugging_face/framework/llama-index)
- [CrewAI](https://composio.dev/toolkits/hugging_face/framework/crew-ai)

## TL;DR

### Why use Composio?
Composio provides a single MCP server or CLI tool that exposes a set of meta-tools, allowing you to:
- Connect to 1,000+ apps with on-demand tool loading, so you do not fill your LLM context window with unnecessary tool definitions.
- Use programmatic tool calling through a remote Bash tool, letting LLMs write their own code to handle complex tool chaining. This reduces back-and-forth for frequent tool calls.
- Handle large tool responses outside the LLM context to keep conversations lean.

## Connect Hugging Face to OpenCode

### Connect Hugging Face with OpenCode
### Option 1: Using Composio CLI
### 1. Install Composio CLI
Install the Composio CLI, authenticate, and initialize your project:

```bash
# Install the Composio CLI
curl -fsSL https://composio.dev/install | bash

# Authenticate with Composio
composio login
```

## What is the Hugging Face MCP server, and what's possible with it?

The Hugging Face MCP server is an implementation of the Model Context Protocol that connects your AI agent and assistants like Claude, Cursor, etc directly to your Hugging Face account. It provides structured and secure access so your agent can perform Hugging Face operations on your behalf.

## Supported Tools

| Tool slug | Name | Description |
|---|---|---|
| `HUGGING_FACE_CHANGE_DISCUSSIONS_STATUS` | 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. |
| `HUGGING_FACE_CHECK_DATASET_VALIDITY` | 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. |
| `HUGGING_FACE_CHECK_MODELS_UPLOAD_METHOD` | 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. |
| `HUGGING_FACE_CHECK_SPACES_UPLOAD_METHOD` | 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. |
| `HUGGING_FACE_CLAIM_PAPER_AUTHORSHIP` | 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. |
| `HUGGING_FACE_REQUEST_REPOSITORY_ACCESS` | 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. |
| `HUGGING_FACE_CREATE_COLLECTION` | 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. |
| `HUGGING_FACE_CREATE_DATASETS_BRANCH` | 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. |
| `HUGGING_FACE_CREATE_DATASETS_COMMIT` | 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 request instead of directly committing. |
| `HUGGING_FACE_CHECK_DATASET_FILE_UPLOAD_METHOD` | 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. |
| `HUGGING_FACE_CREATE_DATASETS_TAG` | 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. |
| `HUGGING_FACE_CREATE_DISCUSSION` | 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. |
| `HUGGING_FACE_CREATE_DISCUSSION_COMMENT` | 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. |
| `HUGGING_FACE_PIN_DISCUSSION` | 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. |
| `HUGGING_FACE_CREATE_MODELS_BRANCH` | 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. |
| `HUGGING_FACE_CREATE_MODELS_COMMIT` | 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 performance. |
| `HUGGING_FACE_CREATE_MODELS_TAG` | 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. |
| `HUGGING_FACE_CREATE_PAPER_COMMENT` | 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. |
| `HUGGING_FACE_CREATE_PAPERS_COMMENT_REPLY` | 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. |
| `HUGGING_FACE_CREATE_PAPERS_INDEX` | 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. |
| `HUGGING_FACE_CREATE_REPOSITORY` | 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. |
| `HUGGING_FACE_CREATE_SPACES_BRANCH` | 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. |
| `HUGGING_FACE_CREATE_SPACES_COMMIT` | 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. |
| `HUGGING_FACE_CREATE_OR_UPDATE_SPACE_SECRET` | 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 doesn't exist or update it if it already exists. |
| `HUGGING_FACE_CREATE_SPACES_TAG` | 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. |
| `HUGGING_FACE_CREATE_OR_UPDATE_SPACE_VARIABLE` | 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 exist or update it if it already exists. |
| `HUGGING_FACE_CREATE_SQL_CONSOLE_EMBED` | 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., train, test, validation splits). |
| `HUGGING_FACE_CREATE_WEBHOOK` | 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. |
| `HUGGING_FACE_DELETE_DATASET_BRANCH` | Delete dataset branch | 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. |
| `HUGGING_FACE_DELETE_DATASET_TAG` | Delete Dataset Tag | Tool to delete a tag from a Hugging Face dataset. Use when you need to remove a specific tag revision from a dataset repository. |
| `HUGGING_FACE_DELETE_DISCUSSION` | Delete discussion | 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. |
| `HUGGING_FACE_DELETE_NETWORK_CIDR_LIST` | Delete network CIDR list | 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 configuration. |
| `HUGGING_FACE_DELETE_NOTIFICATIONS` | Delete notifications | 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 bulk deletion (via applyToAll with filter parameters). |
| `HUGGING_FACE_DELETE_SETTINGS_WEBHOOK` | Delete Settings Webhook | Tool to delete a webhook from Hugging Face settings. Use when you need to remove a webhook configuration that is no longer needed. |
| `HUGGING_FACE_DELETE_SPACE_BRANCH` | Delete space branch | 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. |
| `HUGGING_FACE_DELETE_SPACE_SECRET` | Delete space secret | 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 variables. |
| `HUGGING_FACE_DELETE_SPACES_TAG` | Delete Spaces Tag | Tool to delete a tag from a Hugging Face space. Use when you need to remove a specific tag revision from a space repository. |
| `HUGGING_FACE_DELETE_SPACE_VARIABLE` | Delete space variable | 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. |
| `HUGGING_FACE_FILTER_DATASET_ROWS` | 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. |
| `HUGGING_FACE_GENERATE_CHAT_COMPLETION` | 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. |
| `HUGGING_FACE_GENERATE_TEXT_EMBEDDINGS` | 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. |
| `HUGGING_FACE_GET_DAILY_PAPERS` | 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. |
| `HUGGING_FACE_GET_DATASET_CROISSANT_METADATA` | 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. |
| `HUGGING_FACE_GET_DATASET_FIRST_ROWS` | 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. |
| `HUGGING_FACE_GET_DATASET_INFO` | 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 data. |
| `HUGGING_FACE_GET_DATASET_REPOSITORY_INFO` | 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. |
| `HUGGING_FACE_GET_DATASET_ROWS` | 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 dataset without downloading the entire dataset. |
| `HUGGING_FACE_GET_DATASETS_COMPARE` | 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. |
| `HUGGING_FACE_GET_DATASET_SIZE` | 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. |
| `HUGGING_FACE_GET_DATASETS_JWT` | 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. |
| `HUGGING_FACE_GET_DATASETS_LEADERBOARD` | Get Datasets Leaderboard | Tool to retrieve evaluation results ranked by score for a dataset's leaderboard. Use when you need to compare model performance on a specific dataset or task. Returns an array of leaderboard entries with model information, scores, and rankings. |
| `HUGGING_FACE_GET_DATASET_NOTEBOOK_URL` | Get Dataset Notebook URL | Tool to get a Jupyter notebook URL from a Hugging Face dataset repository. Use when you need to retrieve the URL for a specific .ipynb file from a dataset at a particular revision. |
| `HUGGING_FACE_GET_DATASETS_RESOLVE` | Get Datasets Resolve | Tool to resolve and download a file from a Hugging Face dataset repository. This endpoint requires following redirections to retrieve file content or returns XET file info when Accept header is set appropriately. Use when you need to access files from datasets with proper redirection handling. |
| `HUGGING_FACE_GET_DATASET_SECURITY_SCAN` | Get Dataset Security Scan | Tool to retrieve the security scan status of a Hugging Face dataset repository. Use when you need to check for malware, pickle vulnerabilities, or other security issues in a dataset. |
| `HUGGING_FACE_GET_DATASET_TAGS_BY_TYPE` | Get Dataset Tags by Type | Tool to retrieve all possible tags used for datasets on Hugging Face, grouped by tag type. Use when you need to discover available dataset classification tags, filter options, or metadata categories. Optionally restrict results to a single tag type. |
| `HUGGING_FACE_GET_DATASET_STATISTICS` | Get Dataset Statistics | Tool to get comprehensive statistics about a dataset split including column statistics and data distribution information. Use when you need to analyze dataset composition, understand data distributions, or get statistical summaries of dataset features. |
| `HUGGING_FACE_GET_DATASET_REPOSITORY_SIZE` | Get dataset repository size | Tool to get the total size of a Hugging Face dataset repository at a specific revision and path. Use when you need to determine storage requirements or track repository size changes. |
| `HUGGING_FACE_GET_DATASETS_XET_READ_TOKEN` | Get Datasets XET Read Token | Tool to get a read short-lived access token for XET from Hugging Face datasets. Use when you need temporary read access to dataset content through XET protocol. |
| `HUGGING_FACE_GET_DISCUSSION_DETAILS` | Get Discussion Details | Tool to get detailed information about a specific discussion or pull request on Hugging Face Hub. Use when you need to retrieve all comments, status changes, events, and for PRs, the diff information. |
| `HUGGING_FACE_GET_DISCUSSION_DETAILS` | Get Discussion Details | Tool to retrieve discussion details from a Hugging Face repository. Use when you need to get information about a specific discussion or pull request, including comments, events, and status. |
| `HUGGING_FACE_GET_AVAILABLE_JOB_HARDWARE` | Get Available Job Hardware | Tool to retrieve available hardware configurations for Hugging Face Jobs with their specifications and pricing. Use when you need to discover compute options for running jobs. |
| `HUGGING_FACE_GET_MODEL_INFORMATION` | Get Model Information | Tool to retrieve detailed information about a Hugging Face model repository. Use when you need comprehensive metadata including downloads, likes, tags, configuration, files, and more. |
| `HUGGING_FACE_GET_MODELS_COMPARE` | Get Models Compare | Tool to compare two revisions of a Hugging Face model repository. Returns a git diff showing file changes between commits. Use when you need to see what changed between model versions. |
| `HUGGING_FACE_GET_MODELS_JWT` | Get Models JWT | Tool to generate a JWT token for accessing a Hugging Face model repository. Use when you need authenticated access to models, with optional write access for spaces in dev mode, custom expiration, and encryption support. |
| `HUGGING_FACE_GET_MODELS_NOTEBOOK` | Get Models Notebook | Tool to retrieve a Jupyter notebook URL from a Hugging Face model repository. Use when you need to access or display a notebook file stored in a model repository. |
| `HUGGING_FACE_GET_MODEL_SECURITY_SCAN_STATUS` | Get Model Security Scan Status | Tool to retrieve the security scan status of a Hugging Face model repository. Use when you need to check if a model has been scanned for security issues and view any detected problems. |
| `HUGGING_FACE_GET_MODEL_REPOSITORY_SIZE` | Get model repository size | Tool to get the total size of a Hugging Face model repository at a specific revision and path. Use when you need to determine storage requirements or track repository size changes. |
| `HUGGING_FACE_GET_MODEL_XET_READ_TOKEN` | Get Model XET Read Token | Tool to retrieve a short-lived XET read access token for a Hugging Face model repository. Use when you need to access XET (eXtensible Tensor) data for a specific model revision. |
| `HUGGING_FACE_GET_MODEL_TAGS_BY_TYPE` | Get Model Tags By Type | Tool to retrieve all possible tags used for Hugging Face models, grouped by tag type. Use when you need to discover available model tags for filtering or categorization. Optionally restrict results to a specific tag type. |
| `HUGGING_FACE_GET_ORGANIZATION_AVATAR` | Get Organization Avatar | Tool to retrieve the avatar URL for a Hugging Face organization. Use when you need to get the avatar image URL for a specific organization. |
| `HUGGING_FACE_GET_ORGANIZATION_MEMBERS` | Get Organization Members | Tool to retrieve a list of members for a Hugging Face organization. Use when you need to discover who belongs to an organization, with optional filtering by search terms, email, and pagination support. |
| `HUGGING_FACE_GET_ORGANIZATION_SOCIAL_HANDLES` | Get Organization Social Handles | Tool to retrieve an organization's social media handles from Hugging Face. Use when you need to find an organization's GitHub, LinkedIn, or Twitter/X profiles. Only returns handles that the organization has publicly shared on their Hugging Face profile. |
| `HUGGING_FACE_GET_RESOLVE` | Get Resolve | Tool to resolve a file in a Hugging Face repository. Use when you need to access files from model, dataset, or space repositories. This endpoint follows redirections (302, 307) to retrieve the actual file. When Accept header is set to 'application/vnd.xet-fileinfo+json', returns JSON file metadata instead of redirecting to file content. |
| `HUGGING_FACE_GET_RESOLVE_CACHE_DATASETS` | Get Resolve Cache Datasets | Tool to resolve a file from cache in a Hugging Face dataset repository. This endpoint follows redirections (302, 307) to retrieve file content or returns XET file info when Accept header is set appropriately. Use when you need to access cached files from datasets with proper redirection handling. |
| `HUGGING_FACE_GET_RESOLVE_CACHE_MODELS` | Get Resolve Cache Models | Tool to resolve and retrieve files from the Hugging Face model cache. Use when you need to access model configuration files, tokenizer files, or other JSON metadata files from a specific model repository. This endpoint returns the actual file content as JSON for JSON files (e.g., config.json, tokenizer.json, tokenizer_config.json). |
| `HUGGING_FACE_GET_RESOLVE_CACHE_SPACES` | Get Resolve Cache Spaces | Tool to resolve and retrieve a file from Hugging Face Spaces cache. Use when you need to download a file from a Space repository or get XET file information. This endpoint follows redirections (HTTP 302/307) to resolve the final file location. |
| `HUGGING_FACE_GET_BILLING_USAGE` | Get Billing Usage | Tool to retrieve user billing usage for a given period from Hugging Face. Use when you need to check usage statistics, billing information, or resource consumption for the authenticated user or organization. |
| `HUGGING_FACE_GET_JOBS_USAGE` | Get Jobs Usage | Tool to retrieve Jobs usage and billing information for the current subscription period from Hugging Face. Use when you need to check compute usage, costs, or job execution details for the authenticated user or organization. |
| `HUGGING_FACE_GET_LIVE_BILLING_USAGE` | Get Live Billing Usage | Tool to retrieve live billing usage stream from Hugging Face. Use when you need real-time updates on storage, inference, Zero GPU usage, and rate limits. |
| `HUGGING_FACE_GET_BILLING_USAGE_V2` | Get Billing Usage V2 | Tool to retrieve user billing usage for a custom date range from Hugging Face. Use when you need to check usage statistics or resource consumption between specific dates using Unix timestamps. |
| `HUGGING_FACE_GET_MCP_SETTINGS` | Get MCP Settings | Tool to retrieve MCP (Model Context Protocol) tools configuration for the authenticated user. Use when you need to discover available built-in tools and space-based tools configured in the user's Hugging Face settings. |
| `HUGGING_FACE_GET_SETTINGS_WEBHOOK` | Get Settings Webhook | Tool to retrieve a specific webhook configuration from Hugging Face settings. Use when you need to inspect webhook details, verify webhook status, or check webhook configuration for a given webhook ID. |
| `HUGGING_FACE_GET_SPACE_INFO` | Get Space Info | Tool to retrieve detailed information about a Hugging Face Space repository. Use when you need metadata, SDK type, hardware configuration, runtime status, or other information about a specific Space. |
| `HUGGING_FACE_GET_SPACES_COMPARE` | Get Spaces Compare | Tool to compare two revisions of a Hugging Face Space repository. Returns a git diff showing file changes between commits. Use when you need to see what changed between Space versions. |
| `HUGGING_FACE_GET_SPACES_EVENTS` | Get Spaces Events | Tool to stream status updates for a Hugging Face Space using SSE protocol. Use when you need to monitor Space build stages, runtime status, or receive real-time updates about Space state changes. |
| `HUGGING_FACE_GET_SPACES_JWT` | Get Spaces JWT | Tool to generate a JWT token for accessing a Hugging Face space repository. Use when you need authenticated access to spaces, with optional write access for spaces in dev mode, custom expiration, and encryption support. |
| `HUGGING_FACE_GET_SPACE_METRICS` | Get Space Metrics | Tool to get live metrics for a specific Space in a streaming fashion, with SSE protocol, such as current Zero-GPU usage. Use when you need real-time monitoring of Space resource utilization. |
| `HUGGING_FACE_GET_SPACES_NOTEBOOK` | Get Spaces Notebook | Tool to retrieve a Jupyter notebook URL from a Hugging Face space repository. Use when you need to access or display a notebook file stored in a space. |
| `HUGGING_FACE_GET_SPACES_RESOLVE` | Get Spaces Resolve | Tool to resolve and retrieve a file from a Hugging Face Space repository. Use when you need to download a file from a Space or get XET file information. This endpoint follows redirections (HTTP 302/307) to resolve the final file location. |
| `HUGGING_FACE_GET_SPACE_SECURITY_SCAN_STATUS` | Get Space Security Scan Status | Tool to retrieve the security scan status of a Hugging Face space repository. Use when you need to check for malware, pickle vulnerabilities, or other security issues in a space. |
| `HUGGING_FACE_GET_SPACE_REPOSITORY_SIZE` | Get space repository size | Tool to get the total size of a Hugging Face space repository at a specific revision and path. Use when you need to determine storage requirements or track repository size changes. |
| `HUGGING_FACE_GET_SPACE_XET_READ_TOKEN` | Get Space XET Read Token | Tool to retrieve a short-lived XET read access token for a Hugging Face Space repository. Use when you need to access XET (eXtensible Tensor) data for a specific Space revision. |
| `HUGGING_FACE_GET_SPACES_XET_WRITE_TOKEN` | Get Spaces XET Write Token | Tool to retrieve a short-lived XET write access token for a Hugging Face space repository. Use when you need to upload or write XET data to a specific space revision. |
| `HUGGING_FACE_GET_TRENDING_REPOSITORIES` | Get Trending Repositories | Tool to retrieve trending repositories from Hugging Face. Use when you need to discover popular models, datasets, or spaces that are currently trending on the platform. |
| `HUGGING_FACE_GET_USER_AVATAR` | Get User Avatar | Tool to retrieve the avatar URL for a Hugging Face user. Use when you need to get the avatar image URL for a specific user. |
| `HUGGING_FACE_GET_USER_OVERVIEW` | Get User Overview | Tool to retrieve a comprehensive overview of a Hugging Face user's profile. Use when you need to get user statistics, organizations, activity counts, and profile information. |
| `HUGGING_FACE_GET_USER_SOCIAL_HANDLES` | Get User Social Handles | Tool to retrieve a user's social media handles from Hugging Face. Use when you need to find a user's GitHub, LinkedIn, Twitter/X, or Bluesky profiles. Only returns handles that the user has publicly shared on their Hugging Face profile. |
| `HUGGING_FACE_GET_AUTHENTICATED_USER_INFO` | Get Authenticated User Info | Tool to get information about the authenticated Hugging Face user including username, email, organizations, and token details. Use when you need to identify the current user from an access token or retrieve user profile information. |
| `HUGGING_FACE_HANDLE_DATASET_USER_ACCESS_REQUEST` | Handle Dataset User Access Request | Tool to handle a user's access request to a gated Hugging Face dataset. Use this to accept, reject, or update the status of access requests for repositories with gated access. Either 'user' or 'userId' must be provided to identify the user. |
| `HUGGING_FACE_LIST_COLLECTIONS` | List Collections | Tool to list collections on the Hugging Face Hub. Use when you need to discover collections of models, datasets, spaces, or papers. Collections are curated groups of repositories organized by users. |
| `HUGGING_FACE_LIST_DATASET_PARQUET_FILES` | List Dataset Parquet Files | Tool to get the list of Parquet files for a dataset. Use when you need to download or access dataset files in Parquet format. Returns URLs to download Parquet files with metadata about splits, configurations, and file sizes. |
| `HUGGING_FACE_LIST_DATASET_PATHS_INFO` | List Dataset Paths Info | Tool to list detailed information about specific paths in a Hugging Face dataset repository. Use when you need to get metadata about files or directories in a dataset, including size, type, commit history, and security scan status. |
| `HUGGING_FACE_LIST_DATASETS` | List Datasets | Tool to list datasets on the Hugging Face Hub. Use when you need to discover or search for datasets. Supports filtering by author, search query, tags, and sorting by various properties. |
| `HUGGING_FACE_LIST_DATASET_COMMITS` | List Dataset Commits | Tool to list commits from a Hugging Face dataset repository. Use when you need to retrieve the commit history for a specific dataset branch or revision. |
| `HUGGING_FACE_LIST_DATASET_SPLITS` | List Dataset Splits | Tool to get the list of subsets and splits of a dataset. Returns the available configurations and splits for a given dataset on the Hub. Use when you need to understand the structure of a dataset before querying specific splits. |
| `HUGGING_FACE_LIST_DATASET_REFERENCES` | List Dataset References | Tool to list all references (branches, tags, converts, pull requests) in a Hugging Face dataset repository. Use when you need to retrieve available references for a specific dataset. |
| `HUGGING_FACE_LIST_DATASETS_TREE` | List datasets tree | Tool to list the content of a Hugging Face dataset repository tree with pagination support. Use when you need to browse or explore files and directories in a dataset repository, or to discover what data files are available in a dataset. |
| `HUGGING_FACE_LIST_DATASET_ACCESS_REQUESTS` | List Dataset Access Requests | Tool to list access requests for a gated Hugging Face dataset repository. Use when you need to view pending, accepted, or rejected access requests for datasets with restricted access. |
| `HUGGING_FACE_LIST_DISCUSSIONS` | List Discussions | Tool to list discussions for a Hugging Face repository. Use when you need to retrieve discussions or pull requests for a specific model, dataset, or space. |
| `HUGGING_FACE_LIST_REPOSITORY_DISCUSSIONS` | List Repository Discussions | Tool to list discussions and pull requests for a Hugging Face repository. Use when you need to retrieve discussion threads, issues, or PRs with their titles, status, authors, and metadata. |
| `HUGGING_FACE_LIST_AVAILABLE_DOCUMENTATION` | List Available Documentation | Tool to retrieve the list of available documentation from Hugging Face. Use when you need to discover available documentation resources. |
| `HUGGING_FACE_LIST_INFERENCE_ENDPOINTS` | List Inference Endpoints | Tool to list Hugging Face Inference Endpoints for a specific user or organization. Use when you need to retrieve endpoints, optionally filtered by tags or name. |
| `HUGGING_FACE_LIST_MODELS_ON_HUGGING_FACE_HUB` | List models on Hugging Face Hub | Tool to list models on the Hugging Face Hub with filtering options. Use when you need to search or discover models by author, tags, task type, or other criteria. |
| `HUGGING_FACE_LIST_MODEL_COMMITS` | List Model Commits | Tool to list commits from a Hugging Face model repository. Use when you need to retrieve the commit history for a specific model branch or revision. |
| `HUGGING_FACE_LIST_MODEL_PATHS_INFO` | List Model Paths Info | Tool to list detailed information about specific paths in a Hugging Face model repository. Use when you need to get metadata about files or directories in a model, including size, type, commit history, and security scan status. |
| `HUGGING_FACE_LIST_MODEL_REFERENCES` | List Model References | Tool to list all references (branches, tags, converts, and optionally pull requests) in a Hugging Face model repository. Use when you need to retrieve version control information for a specific model. |
| `HUGGING_FACE_LIST_MODEL_REPOSITORY_TREE` | List model repository tree | Tool to list the contents of a Hugging Face model repository tree at a specific revision and path, with pagination support. Use when you need to browse model files, explore repository structure, or navigate through model directories. |
| `HUGGING_FACE_LIST_NOTIFICATIONS` | List Notifications | Tool to list notifications for the authenticated Hugging Face user. Use when you need to retrieve user notifications, optionally filtered by read status, repository type, author, or other criteria. |
| `HUGGING_FACE_LIST_REPOSITORY_COMMITS` | List Repository Commits | Tool to list commits for a Hugging Face repository. Use when you need to retrieve commit history including commit hashes, messages, authors, and timestamps for models, datasets, or spaces. |
| `HUGGING_FACE_LIST_REPOSITORY_FILES` | List repository files | Tool to get the file tree of a Hugging Face repository with pagination support. Use when you need to browse files and folders in any repository type (model, dataset, or space), explore repository structure, or discover available files. |
| `HUGGING_FACE_LIST_WEBHOOKS` | List Webhooks | Tool to list all webhooks configured in Hugging Face settings. Use when you need to retrieve webhook configurations for the authenticated user's account. |
| `HUGGING_FACE_LIST_SPACES_ON_HUGGING_FACE_HUB` | List Spaces on Hugging Face Hub | Tool to list Spaces on the Hugging Face Hub with filtering options. Use when you need to discover or search for ML demo applications hosted on Hugging Face. |
| `HUGGING_FACE_LIST_SPACE_COMMITS` | List Space Commits | Tool to list commits from a Hugging Face Space repository. Use when you need to retrieve the commit history for a specific Space branch or revision. |
| `HUGGING_FACE_LIST_AVAILABLE_SPACE_HARDWARE` | List Available Space Hardware | Tool to retrieve available hardware configurations for Hugging Face Spaces with their specifications and pricing. Use when you need to discover compute options for running spaces. |
| `HUGGING_FACE_LIST_SPACE_LFS_FILES` | List Space LFS Files | Tool to list LFS (Large File Storage) files from a Hugging Face Space repository. Use when you need to retrieve large files stored in a Space using Git LFS. |
| `HUGGING_FACE_LIST_SPACE_PATHS_INFO` | List Space Paths Info | Tool to list detailed information about specific paths in a Hugging Face space repository. Use when you need to get metadata about files or directories in a space, including size, type, commit history, and security scan status. |
| `HUGGING_FACE_LIST_SPACE_REFERENCES` | List Space References | Tool to list all references (branches, tags, converts, pull requests) in a Hugging Face space repository. Use when you need to retrieve available references for a specific space. |
| `HUGGING_FACE_LIST_SPACES_TREE` | List spaces tree | Tool to list the content of a Hugging Face space repository tree with pagination support. Use when you need to browse or explore files and directories in a space repository, or to discover what files are available in a space. |
| `HUGGING_FACE_LIST_CLOUD_PROVIDER_VENDORS` | List Cloud Provider Vendors | Tool to list available cloud provider vendors for Hugging Face Inference Endpoints. Use when you need to discover available infrastructure options across AWS, Azure, and GCP. Returns vendors with their regions and compute instance types for deploying models. |
| `HUGGING_FACE_SEARCH_DATASET` | Search dataset | Tool to search text in a dataset split on Hugging Face. Searches in columns of type string, even if values are nested in a dictionary. Use when you need to find specific text or patterns within a dataset's content. Returns matching rows with their data. |
| `HUGGING_FACE_SEARCH_DOCUMENTATION` | Search Documentation | Tool to search Hugging Face documentation across all products and libraries. Use when you need to find information about HF tools, models, datasets, or API usage. |
| `HUGGING_FACE_SEARCH_PAPERS` | Search Papers | Tool to perform hybrid semantic/full-text search on papers in Hugging Face. Use when you need to find research papers by keywords, topics, or authors. |
| `HUGGING_FACE_SQUASH_DATASET_COMMITS` | Squash Dataset Commits | Tool to squash all commits in a dataset ref into a single commit with the given message. Use when consolidating commit history into a single commit. WARNING: This operation is irreversible. |
| `HUGGING_FACE_SQUASH_SPACES_COMMITS` | Squash Spaces Commits | Tool to squash all commits in a space ref into a single commit with the given message. Use when consolidating commit history into a single commit. WARNING: This operation is irreversible. |
| `HUGGING_FACE_UPDATE_DATASET_SETTINGS` | Update Dataset Settings | Tool to update settings for a Hugging Face dataset repository. Use when you need to configure visibility, discussions, gating, or access control for a dataset. |
| `HUGGING_FACE_UPDATE_DISCUSSION_TITLE` | Update Discussion Title | Tool to change the title of an existing discussion on a Hugging Face repository (model, dataset, or Space). Use when you need to update or correct a discussion's title. |
| `HUGGING_FACE_UPDATE_MODEL_REPOSITORY_SETTINGS` | Update Model Repository Settings | Tool to update settings for a Hugging Face model repository. Use when you need to modify repository configuration such as privacy, discussions, or gated access settings. |
| `HUGGING_FACE_UPDATE_NOTIFICATION_SETTINGS` | Update Notification Settings | Tool to update notification settings for the authenticated Hugging Face user. Use when you need to enable or disable various notification types such as announcements, discussions, paper digests, or product updates. |
| `HUGGING_FACE_UPDATE_WATCH_SETTINGS` | Update Watch Settings | Tool to update watch settings for your Hugging Face account. Use when you want to get notified about discussions on organizations, users, or repositories. You can add new items to watch and/or remove items from your watch list in a single request. |
| `HUGGING_FACE_UPDATE_WEBHOOK` | Update Webhook | Tool to update an existing webhook in Hugging Face settings. Use when you need to modify webhook configuration such as watched entities, event domains, target URL, or job settings. |
| `HUGGING_FACE_UPDATE_SPACES_REPOSITORY_SETTINGS` | Update Spaces Repository Settings | Tool to update settings for a Hugging Face Spaces repository. Use when you need to modify repository configuration such as privacy, discussions, or gated access settings. |
| `HUGGING_FACE_UPDATE_SQL_CONSOLE_EMBED` | Update SQL Console Embed | Tool to update an existing SQL console embed for a Hugging Face dataset. Use when you need to modify the SQL query, title, or privacy settings of an existing embed. |
| `HUGGING_FACE_ENABLE_OR_DISABLE_WEBHOOK` | Enable or Disable Webhook | Tool to enable or disable a webhook on Hugging Face. Use when you need to temporarily deactivate a webhook without deleting it, or reactivate a previously disabled webhook. |

## Supported Triggers

None listed.

## Creating MCP Server - Stand-alone vs Composio SDK

Once connected, OpenCode can access the Hugging Face MCP server via Composio to run the app actions you authorize, directly from your coding workflow.

## Complete Code

None listed.

## Conclusion

### Way Forward
Now that Hugging Face is connected, extend your setup by connecting the other apps you already use every day, so your agent can run true cross-app workflows end to end.
- Connect Calendar to turn threads into scheduled meetings automatically.
- Connect Slack or Teams to post summaries, approvals, and alerts where your team works.
- Connect Notion, Linear, Jira, or Asana to convert requests into tickets, tasks, and docs.
- Connect Drive, Dropbox, or OneDrive to fetch, file, and share attachments without manual steps.
Start with one workflow you do repeatedly, then keep adding apps as you find new handoffs. With everything behind a single MCP endpoint, your agent can coordinate multiple tools safely and reliably in one conversation.

## How to build Hugging Face MCP Agent with another framework

- [ChatGPT](https://composio.dev/toolkits/hugging_face/framework/chatgpt)
- [OpenAI Agents SDK](https://composio.dev/toolkits/hugging_face/framework/open-ai-agents-sdk)
- [Claude Agent SDK](https://composio.dev/toolkits/hugging_face/framework/claude-agents-sdk)
- [Claude Code](https://composio.dev/toolkits/hugging_face/framework/claude-code)
- [Claude Cowork](https://composio.dev/toolkits/hugging_face/framework/claude-cowork)
- [Codex](https://composio.dev/toolkits/hugging_face/framework/codex)
- [Cursor](https://composio.dev/toolkits/hugging_face/framework/cursor)
- [VS Code](https://composio.dev/toolkits/hugging_face/framework/vscode)
- [OpenClaw](https://composio.dev/toolkits/hugging_face/framework/openclaw)
- [Hermes](https://composio.dev/toolkits/hugging_face/framework/hermes-agent)
- [CLI](https://composio.dev/toolkits/hugging_face/framework/cli)
- [Google ADK](https://composio.dev/toolkits/hugging_face/framework/google-adk)
- [LangChain](https://composio.dev/toolkits/hugging_face/framework/langchain)
- [Vercel AI SDK](https://composio.dev/toolkits/hugging_face/framework/ai-sdk)
- [Mastra AI](https://composio.dev/toolkits/hugging_face/framework/mastra-ai)
- [LlamaIndex](https://composio.dev/toolkits/hugging_face/framework/llama-index)
- [CrewAI](https://composio.dev/toolkits/hugging_face/framework/crew-ai)

## Related Toolkits

- [Composio](https://composio.dev/toolkits/composio) - Composio is an integration platform that connects AI agents with hundreds of business tools. It streamlines authentication and lets you trigger actions across services—no custom code needed.
- [Composio search](https://composio.dev/toolkits/composio_search) - Composio search is a unified web search toolkit spanning travel, e-commerce, news, financial markets, images, and more. It lets you and your apps tap into up-to-date web data from a single, easy-to-integrate service.
- [Perplexityai](https://composio.dev/toolkits/perplexityai) - Perplexityai delivers natural, conversational AI models for generating human-like text. Instantly get context-aware, high-quality responses for chat, search, or complex workflows.
- [Browser tool](https://composio.dev/toolkits/browser_tool) - Browser tool is a virtual browser integration that lets AI agents interact with the web programmatically. It enables automated browsing, scraping, and action-taking from any AI workflow.
- [Ai ml api](https://composio.dev/toolkits/ai_ml_api) - Ai ml api is a suite of AI/ML models for natural language and image tasks. It provides fast, scalable access to advanced AI capabilities for your apps and workflows.
- [Aivoov](https://composio.dev/toolkits/aivoov) - Aivoov is an AI-powered text-to-speech platform offering 1,000+ voices in over 150 languages. Instantly turn written content into natural, human-like audio for any application.
- [All images ai](https://composio.dev/toolkits/all_images_ai) - All-Images.ai is an AI-powered image generation and management platform. It helps you create, search, and organize images effortlessly with advanced AI capabilities.
- [Anthropic administrator](https://composio.dev/toolkits/anthropic_administrator) - Anthropic administrator is an API for managing Anthropic organizational resources like members, workspaces, and API keys. It helps you automate admin tasks and streamline resource management across your Anthropic organization.
- [Api labz](https://composio.dev/toolkits/api_labz) - Api labz is a platform offering a suite of AI-driven APIs and workflow tools. It helps developers automate tasks and build smarter, more efficient applications.
- [Apipie ai](https://composio.dev/toolkits/apipie_ai) - Apipie ai is an AI model aggregator offering a single API for accessing top AI models from multiple providers. It helps developers build cost-efficient, latency-optimized AI solutions without juggling multiple integrations.
- [Astica ai](https://composio.dev/toolkits/astica_ai) - Astica ai provides APIs for computer vision, NLP, and voice synthesis. Integrate advanced AI features into your app with a single API key.
- [Bigml](https://composio.dev/toolkits/bigml) - BigML is a machine learning platform that lets you build, train, and deploy predictive models from your data. Its intuitive interface and robust API make machine learning accessible and efficient.
- [Botbaba](https://composio.dev/toolkits/botbaba) - Botbaba is a platform for building, managing, and deploying conversational AI chatbots across messaging channels. It streamlines chatbot automation, making it easier to integrate AI into customer interactions.
- [Botpress](https://composio.dev/toolkits/botpress) - Botpress is an open-source platform for building, deploying, and managing chatbots. It helps teams automate conversations and deliver rich, interactive messaging experiences.
- [Chatbotkit](https://composio.dev/toolkits/chatbotkit) - Chatbotkit is a platform for building and managing AI-powered chatbots using robust APIs and SDKs. It lets you easily add conversational AI to your apps for better user engagement.
- [Cody](https://composio.dev/toolkits/cody) - Cody is an AI assistant built for businesses, trained on your company's knowledge and data. It delivers instant answers and insights, tailored for your team.
- [Context7 MCP](https://composio.dev/toolkits/context7_mcp) - Context7 MCP delivers live, version-specific code docs and examples right from the source. It helps developers and AI agents instantly retrieve authoritative programming info—no more out-of-date docs.
- [Customgpt](https://composio.dev/toolkits/customgpt) - CustomGPT.ai lets you build and deploy chatbots tailored to your own data and business needs. Get precise and context-aware AI conversations without writing code.
- [Datarobot](https://composio.dev/toolkits/datarobot) - Datarobot is a machine learning platform that automates model development, deployment, and monitoring. It empowers organizations to quickly gain predictive insights from large datasets.
- [Deepgram](https://composio.dev/toolkits/deepgram) - Deepgram is an AI-powered speech recognition platform for accurate audio transcription and understanding. It enables fast, scalable speech-to-text with advanced audio intelligence features.

## Frequently Asked Questions

### What are the differences in Tool Router MCP and Hugging Face MCP?

With a standalone Hugging Face MCP server, the agents and LLMs can only access a fixed set of Hugging Face tools tied to that server. However, with the Composio Tool Router, agents can dynamically load tools from Hugging Face and many other apps based on the task at hand, all through a single MCP endpoint.

### Can I use Tool Router MCP with OpenCode?

Yes, you can. OpenCode fully supports MCP integration. You get structured tool calling, message history handling, and model orchestration while Tool Router takes care of discovering and serving the right Hugging Face tools.

### Can I manage the permissions and scopes for Hugging Face while using Tool Router?

Yes, absolutely. You can configure which Hugging Face scopes and actions are allowed when connecting your account to Composio. You can also bring your own OAuth credentials or API configuration so you keep full control over what the agent can do.

### How safe is my data with Composio Tool Router?

All sensitive data such as tokens, keys, and configuration is fully encrypted at rest and in transit. Composio is SOC 2 Type 2 compliant and follows strict security practices so your Hugging Face data and credentials are handled as safely as possible.

---
[See all toolkits](https://composio.dev/toolkits) · [Composio docs](https://docs.composio.dev/llms.txt)
