Hugging Face MCP server

Connect Hugging Face to Claude, ChatGPT, Cursor, Claude Code, Codex, Gemini, GitHub Copilot and any other MCP client, for your whole team. Metorial adds security, governance, and tracing, and gives everyone one Magic MCP URL to connect.

What you can do with the Hugging Face MCP server

Ask your agent in plain language. Each of these maps to a real tool on the server.

  • Use the control space tool in Hugging Face
  • Use the run inference tool in Hugging Face
  • Use the create discussion tool in Hugging Face
  • Use the search datasets tool in Hugging Face
  • Use the create collection tool in Hugging Face
  • Use the manage space secrets tool in Hugging Face

Supported Tools

control_space

Control Space

Control a Space's lifecycle: pause, restart, or change hardware. Use this to manage running Spaces.

run_inference

Run Inference

Run generic inference on any Hugging Face model. Supports a wide range of tasks: summarization, classification, NER, translation, embeddings, image classification, and more. Pass task-specific inputs and parameters.

create_discussion

Create Discussion

Create a new discussion or pull request on a Hugging Face repository. Use this for opening conversations, requesting changes, or proposing contributions.

search_datasets

Search Datasets

Search for datasets on Hugging Face Hub. Filter by keyword, author, and tags. Results include dataset metadata such as downloads and likes.

create_collection

Create Collection

Create a new collection to curate related models, datasets, and Spaces.

manage_space_secrets

Manage Space Secrets

Add or delete secrets on a Space. Secrets are encrypted environment variables available at runtime.

get_discussion

Get Discussion

Get detailed information about a specific discussion or pull request, including all comments and events.

list_discussions

List Discussions

List discussions and pull requests on a Hugging Face repository. Returns summaries including title, status, and whether each item is a PR.

get_user_info

Get User Info

Get information about the authenticated user, including username, email, organizations, and account details.

create_repository

Create Repository

Create a new model, dataset, or Space repository on Hugging Face Hub. Supports setting visibility, SDK type (for Spaces), and license.

delete_repository

Delete Repository

Permanently delete a model, dataset, or Space repository from Hugging Face Hub. This action is irreversible.

upload_file

Upload File

Upload or update a text file in a Hugging Face repository. Creates a commit with the file content.

remove_collection_item

Remove Collection Item

Remove an item from a collection.

update_repository_visibility

Update Repository Visibility

Change a repository's visibility between public and private.

list_repo_files

List Repository Files

List files and directories in a Hugging Face repository at a given path and revision. Returns file metadata including type, size, and OID.

get_collection

Get Collection

Retrieve a Hugging Face collection by its slug. Returns the collection's title, description, and all items (models, datasets, spaces) it contains.

search_spaces

Search Spaces

Search for Spaces (ML application demos) on Hugging Face Hub. Filter by keyword, author, and tags. Results include Space metadata such as SDK type and likes.

manage_space_variables

Manage Space Variables

Add or delete environment variables on a Space. Variables are public configuration values available at runtime.

add_collection_item

Add Collection Item

Add a model, dataset, or space to an existing collection with an optional note.

get_space_runtime

Get Space Runtime

Get runtime information for a Space, including hardware, stage, SDK, and storage details.

get_file_content

Get File Content

Read the text content of a file in a Hugging Face repository. Best suited for text files such as config files, model cards, and code.

text_generation

Text Generation

Generate text using a model on the Hugging Face Inference API. Provide a prompt and receive generated text continuation.

chat_completion

Chat Completion

Run a chat completion using a model on the Hugging Face Inference API. Follows the OpenAI-compatible chat completions format. Supports conversation history with system, user, and assistant messages.

delete_file

Delete File

Delete a file from a Hugging Face repository. Creates a commit that removes the specified file.

update_discussion_status

Update Discussion Status

Open or close a discussion or pull request. Optionally merge a pull request instead of just closing it.

comment_on_discussion

Comment on Discussion

Post a comment on an existing discussion or pull request.

get_repository_info

Get Repository Info

Get detailed information about a model, dataset, or Space repository on Hugging Face Hub. Returns metadata including tags, downloads, likes, pipeline task, and configuration.

delete_collection

Delete Collection

Delete a collection. This does not delete the items within the collection, only the collection grouping itself.

search_models

Search Models

Search for machine learning models on Hugging Face Hub. Filter by keyword, author, library framework, pipeline task, and tags. Results include model metadata such as downloads, likes, and pipeline task.

Connect Hugging Face to your AI client

Every client uses the same Magic MCP URL, and so does any other MCP client. Add it once and sign in with SSO.

  1. Enable Hugging Face in Metorial. In your Metorial portal, enable the Hugging Face MCP server and sign in with the account that owns the data. Access stays governed by your team policies.
  2. Add a custom connector. Open Customize, then Connectors. Select Add, then Custom, then Web.
  3. Paste your Metorial MCP URL. Name it Metorial, paste your Magic MCP URL (<your-magic-mcp-url>) and continue.
  4. Sign in. Select Add and sign in to load Hugging Face tools.

Run Hugging Face through the Metorial gateway

One governed layer for every app your agents reach, not a separate connector per tool.

  • Give Hugging Face and every other app to your whole team through one MCP gateway, behind your SSO.
  • Scope which teams and agents can use Hugging Face tools with role-based access control, and trace every call.
  • Prefer to run it yourself? Metorial is open source and self-hostable.

More integrations teams use with Hugging Face

Google Sheets

Create, read, and update spreadsheets and their cell data. Read and write values to individual cells, ranges, or multiple ranges using A1 notation or named ranges. Apply cell formatting including text styles, backgrounds, borders, number formats, and conditional formatting. Manage sheets (tabs) within a spreadsheet—add, delete, copy, rename, and reorder them. Create and manage embedded charts, pivot tables, filter views, data validation rules, protected ranges, named ranges, and merged cells. Perform batch operations to apply multiple updates atomically.

GitHub

Manage repositories, issues, and pull requests. Create and configure branches, star repositories, review code, and merge changes. Automate CI/CD workflows with GitHub Actions, manage workflow runs, secrets, and artifacts. Track issues with labels, milestones, and assignees. Search across code, repositories, issues, and users. Manage organizations, teams, and memberships. Create and manage projects, gists, packages, deployments, and environments. Access security alerts including code scanning, secret scanning, and Dependabot alerts. Read and write file contents in repositories. Manage webhooks, notifications, and codespaces.

Salesforce

Manage CRM data including Accounts, Contacts, Leads, Opportunities, Cases, and custom objects. Create, read, update, and delete records. Query data using SOQL and search across objects using SOSL. Perform bulk data operations for large-scale imports, exports, and migrations. Execute composite requests to batch multiple operations in a single API call. Access analytics, reports, and dashboards. Manage files and attachments associated with records. Interact with Chatter feeds, posts, and groups for social collaboration. Manage org metadata including custom objects, fields, layouts, and workflows. Query data using GraphQL for precise data retrieval across related objects.

Sharepoint

Manage SharePoint sites, document libraries, lists, and files. Create, read, update, and delete lists and list items with custom columns. Resolve site users to numeric Person/Group LookupId values. Upload, download, move, copy, and version files in document libraries. Search across sites, files, folders, lists, and list items using Microsoft Search. Manage permissions at site, list, and item levels with granular access control. Define and manage content types and site columns. Retrieve site properties and search for sites across Microsoft 365.

Airtable

Create, read, update, and delete records in Airtable bases and tables. Manage base schemas including creating tables and fields. Filter records using formulas, sort by fields, and scope queries to specific views. Upsert records to find, create, or update in a single call. Upload attachments to records, read and write record comments, list accessible bases, and receive real-time base change events through webhooks.

Google Drive

Upload, download, create, copy, move, rename, trash, and permanently delete files and folders in Google Drive. Search for files using complex queries filtering by name, MIME type, owner, modification date, labels, and other metadata. Share files and folders with specific users, groups, or domains with role-based permissions (owner, writer, commenter, reader). Manage shared drives and their members. Export Google Workspace files (Docs, Sheets, Slides) to standard formats like PDF, DOCX, and XLSX. Track file revision history and restore earlier versions. Create, read, update, and delete threaded comments and replies on files. Read label definitions and search files by label. Browse the Drive apps installed for your account. Store app-specific data in a hidden per-user folder.

Technical notes for Hugging Face

Manage machine learning model, dataset, and Spaces repositories on Hugging Face Hub. Create, update, delete, and configure Git-based repositories with version control, branching, tagging, and pull requests. Upload and download model files and datasets. Run model inference for tasks like text generation, image generation, summarization, embeddings, and classification via serverless or dedicated endpoints. Search and discover models, datasets, and Spaces by author, task, language, or tags. Create and manage Spaces for hosting ML-powered application demos. Participate in community discussions, open pull requests, and post comments on repositories. Organize related items into collections. Manage organizations and access control. Listen for repository, discussion, and comment events via webhooks.

Frequently asked questions

Common questions about connecting Hugging Face to AI agents with Metorial.

  1. How many tools does the Hugging Face MCP server have?
    The Hugging Face MCP server exposes 29 tools, including Control Space, Run Inference, Create Discussion. Each one is governed and traced through Metorial.
  2. Hugging Face exposes tools your agents call on demand; it does not publish event triggers yet. Everything still runs through one governed MCP URL.
  3. Any MCP client, including VS Code, Windsurf, Zed, OpenCode and Grok. Each one reaches the Hugging Face MCP server through the same Metorial URL.
  4. Use role-based access control to decide which teams, users, and agents can use Hugging Face and which of its tools they can call.
  5. Yes. Metorial is open source, so you can run the Hugging Face MCP server yourself or use the hosted gateway.

Connect Hugging Face to production AI agents

See how Metorial gives your team governed access to Hugging Face, with tracing and security controls built in.