Dataset Viewer MCP Server
允许与 Hugging Face Dataset Viewer API 交互,使用户能够浏览、搜索、过滤和分析托管在 Hugging Face Hub 上的数据集。
Tools
get_info
Get detailed information about a Hugging Face dataset including description, features, splits, and statistics. Run validate first to check if the dataset exists and is accessible.
get_rows
Get paginated rows from a Hugging Face dataset
get_first_rows
Get first rows from a Hugging Face dataset split
search_dataset
Search for text within a Hugging Face dataset
filter
Filter rows in a Hugging Face dataset using SQL-like conditions
get_statistics
Get statistics about a Hugging Face dataset
get_parquet
Export Hugging Face dataset split as Parquet file
validate
Check if a Hugging Face dataset exists and is accessible
README
Dataset Viewer MCP 服务器
一个用于与 Hugging Face Dataset Viewer 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
: 拆分名称page
(可选): 页码 (从 0 开始)auth_token
(可选): 用于私有数据集
-
get_first_rows
- 从数据集拆分中获取前几行
- 参数:
dataset
: 数据集标识符config
: 配置名称split
: 拆分名称auth_token
(可选): 用于私有数据集
-
get_statistics
- 获取有关数据集拆分的统计信息
- 参数:
dataset
: 数据集标识符config
: 配置名称split
: 拆分名称auth_token
(可选): 用于私有数据集
-
search_dataset
- 在数据集中搜索文本
- 参数:
dataset
: 数据集标识符config
: 配置名称split
: 拆分名称query
: 要搜索的文本auth_token
(可选): 用于私有数据集
-
filter
- 使用类似 SQL 的条件过滤行
- 参数:
dataset
: 数据集标识符config
: 配置名称split
: 拆分名称where
: SQL WHERE 子句 (例如 "score > 0.5")orderby
(可选): SQL ORDER BY 子句page
(可选): 页码 (从 0 开始)auth_token
(可选): 用于私有数据集
-
get_parquet
- 以 Parquet 格式下载整个数据集
- 参数:
dataset
: 数据集标识符auth_token
(可选): 用于私有数据集
安装
前提条件
- Python 3.12 或更高版本
- uv - 快速 Python 包安装程序和解析器
设置
- 克隆存储库:
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 集成
将以下内容添加到您的 Claude Desktop 配置文件:
在 Windows 上: %APPDATA%\Claude\claude_desktop_config.json
在 MacOS 上: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"dataset-viewer": {
"command": "uv",
"args": [
"run",
"dataset-viewer"
]
}
}
}
使用示例
- 验证数据集:
{
"dataset": "stanfordnlp/imdb"
}
- 获取数据集信息:
{
"dataset": "stanfordnlp/imdb"
}
- 搜索数据集内容:
{
"dataset": "stanfordnlp/imdb",
"config": "plain_text",
"split": "train",
"query": "great movie"
}
- 过滤和排序行:
{
"dataset": "stanfordnlp/imdb",
"config": "plain_text",
"split": "train",
"where": "label = 'positive'",
"orderby": "text DESC",
"page": 0
}
- 获取数据集统计信息:
{
"dataset": "stanfordnlp/imdb",
"config": "plain_text",
"split": "train"
}
许可证
MIT 许可证 - 有关详细信息,请参见 LICENSE
推荐服务器
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。
serper-search-scrape-mcp-server
这个 Serper MCP 服务器支持搜索和网页抓取,并且支持 Serper API 引入的所有最新参数,例如位置信息。
The Verge News MCP Server
提供从The Verge的RSS feed获取和搜索新闻的工具,允许用户获取今日新闻、检索过去一周的随机文章,以及在最近的Verge内容中搜索特定关键词。
Crypto Price & Market Analysis MCP Server
一个模型上下文协议 (MCP) 服务器,它使用 CoinCap API 提供全面的加密货币分析。该服务器通过一个易于使用的界面提供实时价格数据、市场分析和历史趋势。 (Alternative, slightly more formal and technical translation): 一个模型上下文协议 (MCP) 服务器,利用 CoinCap API 提供全面的加密货币分析服务。该服务器通过用户友好的界面,提供实时价格数据、市场分析以及历史趋势数据。
MCP PubMed Search
用于搜索 PubMed 的服务器(PubMed 是一个免费的在线数据库,用户可以在其中搜索生物医学和生命科学文献)。 我是在 MCP 发布当天创建的,但当时正在度假。 我看到有人在您的数据库中发布了类似的服务器,但还是决定发布我的。
Tavily MCP Server
使用 Tavily 的搜索 API 提供 AI 驱动的网络搜索功能,使 LLM 能够执行复杂的网络搜索、获得问题的直接答案以及搜索最近的新闻文章。
mixpanel
连接到您的 Mixpanel 数据。从 Mixpanel 分析查询事件、留存和漏斗数据。

Sequential Thinking MCP Server
这个服务器通过将复杂问题分解为顺序步骤来促进结构化的问题解决,支持修订,并通过完整的 MCP 集成来实现多条解决方案路径。
mcp-shodan
用于查询 Shodan API 和 Shodan CVEDB 的 MCP 服务器。该服务器提供 IP 查询、设备搜索、DNS 查询、漏洞查询、CPE 查询等工具。