Access and Analyze Hugging Face Datasets
An MCP server for the Hugging Face Dataset Viewer API - browse, search, filter, and analyze Hub datasets.
Why it matters
Effortlessly interact with Hugging Face datasets. View, analyze, search, and filter datasets hosted on the Hugging Face Hub using a dedicated MCP server.
Outcomes
What it gets done
Validate dataset existence and accessibility
Retrieve and paginate dataset content
Search and filter dataset rows using SQL-like conditions
Download datasets in Parquet format
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/vb-dataset-viewer | bash Capabilities
Tools your agent gets
Checks whether a dataset exists and is accessible
Retrieves detailed information about a dataset
Retrieves dataset content with pagination
Retrieves the first rows from a dataset split
Retrieves statistics for a dataset split
Searches for text in a dataset
Filters rows using SQL-like conditions
Downloads the full dataset in Parquet format
Overview
Dataset Viewer MCP Server
This MCP server exposes eight tools for the Hugging Face Dataset Viewer API: validating, inspecting, paginating, searching, SQL-filtering, and downloading datasets as Parquet. Use it when an AI assistant needs to explore, validate, or query Hugging Face Hub datasets. Private datasets require a Hugging Face API token.
What it does
An MCP server for the Hugging Face Dataset Viewer API, letting an AI assistant browse and analyze datasets hosted on the Hugging Face Hub. It exposes eight tools: validate checks whether a dataset exists and is accessible; get_info retrieves detailed information about a dataset; get_rows returns paginated contents of a dataset given a config and split, with an optional page number; get_first_rows returns just the first rows of a split without pagination; get_statistics returns statistics about a dataset split; search_dataset searches for a text query within a split; filter applies SQL-like conditions to a split via a WHERE clause (e.g. "score > 0.5") with optional ORDER BY and pagination; and get_parquet downloads an entire dataset in Parquet format. It also exposes datasets as resources under a dataset:// URI scheme, supporting dataset configurations and splits, pagination, authentication for private datasets, search and filtering, and dataset statistics as first-class MCP resources rather than only tool calls.
When to use - and when NOT to
Use it when an AI assistant needs to check whether a Hugging Face dataset exists, inspect its structure and statistics, page through or search its contents, run SQL-like filters against a split, or download it wholesale as Parquet - for exploring or validating datasets before using them in a pipeline. Private datasets require a Hugging Face API token; public datasets need no authentication. It is not a general Hugging Face Hub browser - it is scoped specifically to the Dataset Viewer API's dataset-inspection capabilities.
Capabilities
Eight tools spanning existence/accessibility checking (validate), metadata retrieval (get_info, get_statistics), paginated and first-N-row content access (get_rows, get_first_rows), full-text search (search_dataset), SQL-like filtering with WHERE/ORDER BY (filter), and bulk Parquet download (get_parquet) - all parameterized by dataset identifier, config name, and split name, with an optional auth_token for private datasets on every tool.
How to install
git clone https://github.com/privetin/dataset-viewer.git
cd dataset-viewer
uv venv
source .venv/bin/activate
uv add -e .
Requires Python 3.12 or higher and uv. Configure the optional HUGGINGFACE_TOKEN environment variable for private-dataset access. A Claude Desktop config points uv at the cloned repository's directory and runs the dataset-viewer command:
{
"mcpServers": {
"dataset-viewer": {
"command": "uv",
"args": ["--directory", "parent_to_repo/dataset-viewer", "run", "dataset-viewer"]
}
}
}
Who it's for
Data scientists and ML engineers who want to explore, validate, and query Hugging Face Hub datasets conversationally - checking a dataset's structure, searching or filtering its contents, or pulling statistics and Parquet exports - before wiring it into a training or evaluation pipeline.
Source 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:
.venv\Scripts\activate
# Install in development mode
uv add -e .
Configuration
Environment Variables
HUGGINGFACE_TOKEN: Your Hugging Face API token for accessing private datasets
Claude Desktop Integration
Add the following to your Claude Desktop config file:
On Windows: %APPDATA%\Claude\claude_desktop_config.json
On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"dataset-viewer": {
"command": "uv",
"args": [
"--directory",
"parent_to_repo/dataset-viewer",
"run",
"dataset-viewer"
]
}
}
}
FAQ
Common questions
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.