Hugging Face Hub Semantic Search MCP

Hugging Face Hub Semantic Search MCP

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.

Category
访问服务器

README

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"

Get Trending Content

"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

  • HF_SEARCH_API_URL: Base URL for the search API (default: https://davanstrien-huggingface-datasets-search-v2.hf.space)

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.

Related Projects

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选