一个用于与Hugging Face 数据集查看器 API交互的MCP服务器,提供浏览和分析托管在Hugging Face Hub上的数据集的功能。
dataset://
URI方案访问Hugging Face数据集服务器提供以下工具:
validate
dataset
:数据集标识符(例如'stanfordnlp/imdb')auth_token
(可选):用于私有数据集get_info
dataset
:数据集标识符auth_token
(可选):用于私有数据集get_rows
dataset
:数据集标识符config
:配置名称split
:分割(split)名称page
(可选):页码(从0开始)auth_token
(可选):用于私有数据集get_first_rows
dataset
:数据集标识符config
:配置名称split
:分割(split)名称auth_token
(可选):用于私有数据集get_statistics
dataset
:数据集标识符config
:配置名称split
:分割(split)名称auth_token
(可选):用于私有数据集search_dataset
dataset
:数据集标识符config
:配置名称split
:分割(split)名称query
:要搜索的文本auth_token
(可选):用于私有数据集filter
dataset
:数据集标识符config
:配置名称split
:分割(split)名称where
:SQL WHERE子句(例如"score > 0.5")orderby
(可选):SQL ORDER BY子句page
(可选):页码(从0开始)auth_token
(可选):用于私有数据集get_parquet
dataset
:数据集标识符auth_token
(可选):用于私有数据集git clone https://github.com/privetin/dataset-viewer.git
cd dataset-viewer

# 创建虚拟环境
uv venv
# 激活虚拟环境
# 在Unix系统上:
source .venv/bin/activate
# 在Windows系统上:
.venv\Scripts\activate
# 以开发模式安装
uv add -e .

HUGGINGFACE_TOKEN
:您的Hugging Face API令牌,用于访问私有数据集将以下内容添加到您的Claude Desktop配置文件中:
在Windows上:%APPDATA%\Claude\claude_desktop_config.json
在MacOS上:~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"dataset-viewer": {
"command": "uv",
"args": [
"--directory",
"parent_to_repo/dataset-viewer",
"run",
"dataset-viewer"
]
}
}
}

MIT许可证 - 详情请参见LICENSE文件