
Hugging Face数据集查看器的MCP服务器
概览
一个MCP服务器,用于与Hugging Face数据集查看器API交互,提供浏览和分析托管在Hugging Face Hub上的数据集的功能。 - 使用 dataset:// URI 方案访问 Hugging Face 数据集 - 支持数据集配置和拆分 - 提供分页访问数据集内容 - 处理私有数据集的认证 - 支持搜索和过滤数据集内容 - 提供数据集统计和分析 服务器提供以下工具: 1. - 检查数据集是否存在且可访问 - 参数:- 数据集标识符(如“stanfordnlp/imdb”) - auth_token(可选):针对私有数据集 2. - 获取数据集的详细信息 - 参数:- 数据集:数据集标识符 - auth_token(可选):针对私有数据集 3.
概述(AI 翻译)
一个MCP服务器,用于与Hugging Face数据集查看器API交互,提供浏览和分析托管在Hugging Face Hub上的数据集的功能。
特色
资源
- 使用
dataset://URI 方案访问 Hugging Face 数据集 - 支持数据集配置和拆分
- 提供分页访问数据集内容
- 处理私有数据集的认证
- 支持搜索和筛选数据集内容
- 提供数据集统计和分析
工具
服务器提供以下工具:
- 验证
- 检查数据集是否存在且可访问
- 参数:
dataset:数据集标识符(例如 ‘stanfordnlp/imdb’)auth_token(可选):针对私有数据集
- get_info
- 获取数据集的详细信息
- 参数:
dataset:数据集标识符auth_token(可选):用于私有数据集
- get_rows
- 获取数据集的分页内容
- 参数:
dataset:数据集标识符config:配置名称split:拆分名称page(可选):页码(基于0)auth_token(可选):用于私有数据集
- get_first_rows
- 从数据集拆分中获取首行
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Dataset Viewer MCP Server
An MCP server for interacting with the Hugging Face Dataset Viewer API, providing capabilities to browse and analyze datasets hosted on the Hugging Face Hub.
Features
Resources
- Uses
dataset://URI scheme for accessing Hugging Face datasets - Supports dataset configurations and splits
- Provides paginated access to dataset contents
- Handles authentication for private datasets
- Supports searching and filtering dataset contents
- Provides dataset statistics and analysis
Tools
The server provides the following tools:
-
validate
- Check if a dataset exists and is accessible
- Parameters:
dataset: Dataset identifier (e.g. ‘stanfordnlp/imdb’)auth_token(optional): For private datasets
-
get_info
- Get detailed information about a dataset
- Parameters:
dataset: Dataset identifierauth_token(optional): For private datasets
-
get_rows
- Get paginated contents of a dataset
- Parameters:
dataset: Dataset identifierconfig: Configuration namesplit: Split namepage(optional): Page number (0-based)auth_token(optional): For private datasets
-
get_first_rows
- Get first rows from a dataset split
- Parameters:
dataset: Dataset identifierconfig: Configuration namesplit: Split nameauth_token(optional): For private datasets
-
get_statistics
- Get statistics about a dataset split
- Parameters:
dataset: Dataset identifierconfig: Configuration namesplit: Split nameauth_token(optional): For private datasets
-
search_dataset
- Search for text within a dataset
- Parameters:
dataset: Dataset identifierconfig: Configuration namesplit: Split namequery: Text to search forauth_token(optional): For private datasets
-
filter
- Filter rows using SQL-like conditions
- Parameters:
dataset: Dataset identifierconfig: Configuration namesplit: Split namewhere: SQL WHERE clause (e.g. “score > 0.5”)orderby(optional): SQL ORDER BY clausepage(optional): Page number (0-based)auth_token(optional): For private datasets
-
get_parquet
- Download entire dataset in Parquet format
- Parameters:
dataset: Dataset identifierauth_token(optional): For private datasets
Installation
Prerequisites
- Python 3.12 or higher
- uv - Fast Python package installer and resolver
Setup
- Clone the repository:
git clone https://github.com/privetin/dataset-viewer.git
cd dataset-viewer
- Create a virtual environment and install:
# Create virtual environment
uv venv
# Activate virtual environment
# On Unix:
source .venv/bin/activate
# On Windows:
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"dataset-viewer": {
"command": "uv",
"args": [
"--directory",
"parent_to_repo/dataset-viewer",
"run",
"dataset-viewer"
]
}
}
}