Hugging Face Hub Search MCP server

Provides semantic search capabilities for Hugging Face models and datasets using vector embeddings to find resources through natural language descriptions, similarity-based discovery, and trending content retrieval with detailed metadata extraction.
Back to servers
Setup instructions
Provider
Daniel van Strien
Release date
Jun 10, 2025
Stats
16 stars

This MCP server provides semantic search capabilities for Hugging Face models and datasets, allowing Claude and other MCP-compatible clients to search and explore the Hugging Face ecosystem using natural language queries. It enables AI-powered similarity search rather than simple keyword matching.

Installation and Setup

Prerequisites

  • UV - Fast Python package installer
  • Claude Desktop or another MCP-compatible client

Claude Desktop Configuration

Add the following to your Claude Desktop configuration file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "huggingface-hub-search": {
      "command": "uvx",
      "args": [
        "git+https://github.com/davanstrien/hub-semantic-search-mcp.git"
      ],
      "env": {
        "HF_SEARCH_API_URL": "https://davanstrien-huggingface-datasets-search-v2.hf.space"
      }
    }
  }
}

Alternative Local Setup

If you prefer to run a local version:

# Clone the repository
git clone https://github.com/davanstrien/hub-semantic-search-mcp.git
cd hub-semantic-search-mcp

# Install dependencies with UV
uv sync

Then configure Claude Desktop to use the local version:

{
  "mcpServers": {
    "huggingface-hub-search": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/hub-semantic-search-mcp",
        "run",
        "python",
        "app.py"
      ],
      "env": {
        "HF_SEARCH_API_URL": "https://davanstrien-huggingface-datasets-search-v2.hf.space"
      }
    }
  }
}

Available Tools

Dataset Tools

  • search_datasets: Search datasets using natural language queries
  • find_similar_datasets: Find datasets similar to a specified one
  • get_trending_datasets: Get currently trending datasets
  • get_dataset_info: Get detailed metadata for a specific dataset
  • download_dataset_card: Download README card for a dataset

Model Tools

  • search_models: Search models using natural language queries with parameter filtering
  • find_similar_models: Find models similar to a specified one
  • get_trending_models: Get currently trending models with parameter filtering
  • get_model_info: Get detailed metadata for a specific model
  • get_model_safetensors_metadata: Get model architecture details and parameter count
  • download_model_card: Download README card for a model

Usage Examples

Once configured, you can use natural language queries in Claude Desktop:

Searching Content

  • "Find datasets about climate change and weather patterns"
  • "Find small language models under 1B parameters for text generation"

Finding Similar Content

  • "Find datasets similar to 'squad' for question answering"

Discovering Trending Content

  • "Show me the top 10 trending AI models this week"

Getting Detailed Information

  • "Get detailed information about the 'stanford-nlp/imdb' dataset"
  • "Show me technical details and configuration for 'microsoft/DialoGPT-medium'"
  • "What's the parameter count and architecture of 'microsoft/DialoGPT-medium'?"

Accessing Documentation

  • "Download the model card for 'microsoft/DialoGPT-medium'"

Environment Variables

Search Backend Details

This server connects to a semantic search API that indexes Hugging Face models and datasets with AI-generated summaries. The search uses embedding-based similarity rather than keyword matching, making it more effective for discovering relevant content based on intent and meaning.

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "huggingface-hub-search" '{"command":"uvx","args":["git+https://github.com/davanstrien/hub-semantic-search-mcp.git"],"env":{"HF_SEARCH_API_URL":"https://davanstrien-huggingface-datasets-search-v2.hf.space"}}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "huggingface-hub-search": {
            "command": "uvx",
            "args": [
                "git+https://github.com/davanstrien/hub-semantic-search-mcp.git"
            ],
            "env": {
                "HF_SEARCH_API_URL": "https://davanstrien-huggingface-datasets-search-v2.hf.space"
            }
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "huggingface-hub-search": {
            "command": "uvx",
            "args": [
                "git+https://github.com/davanstrien/hub-semantic-search-mcp.git"
            ],
            "env": {
                "HF_SEARCH_API_URL": "https://davanstrien-huggingface-datasets-search-v2.hf.space"
            }
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later