Skip to main content
Glama

Hugging Face Hub Semantic Search MCP

by davanstrien
MIT License
3
  • Apple

Hugging Face Hub Semantic Search MCP Server

⚠️ Note: This is an unofficial MCP server inspired by Hugging Face's official MCP server. It may be deprecated at any time if official functionality supersedes it. For the official server, see hf.co/mcp.

An MCP (Model Context Protocol) server that provides semantic search capabilities for Hugging Face models and datasets. This server enables Claude and other MCP-compatible clients to search, discover, and explore the Hugging Face ecosystem using natural language queries.

Features

  • Semantic Search: AI-powered similarity search (not just keyword matching)
  • Dataset Search: Find datasets based on natural language descriptions
  • Model Search: Find models with optional parameter count filtering
  • Similarity Search: Find similar models/datasets to a given one
  • Trending Content: Get currently trending models and datasets
  • Detailed Metadata: Access comprehensive technical information via HuggingFace API
  • Model/Dataset Cards: Download README cards for detailed information

Tools Available

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 from safetensors
  • download_model_card: Download README card for a model

Installation

Prerequisites

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

Quick Start

No installation needed! UV will automatically fetch and run the server.

Configuration

Claude Desktop Setup

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 Development Setup

If you want to contribute or modify the code:

# 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" } } } }

Usage Examples

Once configured, you can use the tools in Claude Desktop:

Search for Datasets

"Find datasets about climate change and weather patterns"

Search for Models

"Find small language models under 1B parameters for text generation"

Find Similar Content

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

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

Get Detailed Metadata

"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'?"

Download Documentation

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

Environment Variables

Search Backend

This MCP 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.

Development

Running Locally

# Run the server directly uv run python app.py # Or activate the virtual environment uv shell python app.py

Testing with MCP Inspector

# Test the GitHub version npx @modelcontextprotocol/inspector uvx git+https://github.com/davanstrien/hub-semantic-search-mcp.git # Or test locally npx @modelcontextprotocol/inspector uv run python app.py

Contributing

Contributions are welcome! Please feel free to submit issues and pull requests.

Development Setup

git clone https://github.com/davanstrien/hub-semantic-search-mcp.git cd hub-semantic-search-mcp uv sync --dev

License

MIT License - see LICENSE file for details.

-
security - not tested
A
license - permissive license
-
quality - not tested

An unofficial MCP server that provides semantic search capabilities for Hugging Face models and datasets, enabling Claude and other MCP-compatible clients to search, discover, and explore the Hugging Face ecosystem using natural language queries.

  1. Features
    1. Tools Available
      1. Dataset Tools
      2. Model Tools
    2. Installation
      1. Prerequisites
      2. Quick Start
    3. Configuration
      1. Claude Desktop Setup
      2. Alternative: Local Development Setup
    4. Usage Examples
      1. Search for Datasets
      2. Search for Models
      3. Find Similar Content
      4. Get Trending Content
      5. Get Detailed Metadata
      6. Download Documentation
    5. Environment Variables
      1. Search Backend
        1. Development
          1. Running Locally
          2. Testing with MCP Inspector
        2. Contributing
          1. Development Setup
        3. License
          1. Related Projects

            Related MCP Servers

            • -
              security
              A
              license
              -
              quality
              The Search MCP Server enables seamless integration of network and local search capabilities in tools like Claude Desktop and Cursor, utilizing the Brave Search API for high-concurrency and asynchronous requests.
              Last updated -
              1
              52
              Python
              MIT License
              • Linux
            • -
              security
              A
              license
              -
              quality
              An MCP server that generates 2D and 3D game assets from text prompts using AI models from Hugging Face Spaces, allowing developers to easily create game art through Claude Desktop or other MCP clients.
              Last updated -
              34
              JavaScript
              MIT License
              • Apple
              • Linux
            • -
              security
              A
              license
              -
              quality
              A Model Context Protocol server that provides Claude and other LLMs with read-only access to Hugging Face Hub APIs, enabling interaction with models, datasets, spaces, papers, and collections through natural language.
              Last updated -
              4
              Python
              MIT License
              • Apple
            • -
              security
              A
              license
              -
              quality
              An MCP server that tracks trending AI models, datasets, and spaces on Hugging Face.
              Last updated -
              Python
              MIT License

            View all related MCP servers

            MCP directory API

            We provide all the information about MCP servers via our MCP API.

            curl -X GET 'https://glama.ai/api/mcp/v1/servers/davanstrien/hub-semantic-search-mcp'

            If you have feedback or need assistance with the MCP directory API, please join our Discord server