hf-model-explorer-mcp
Provides tools for searching and exploring Hugging Face models, retrieving model details, comparing models, finding similar models, and estimating GPU VRAM requirements across precisions to determine hardware fit.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@hf-model-explorer-mcp Find a 7B instruct model that fits in 12GB VRAM"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
hf-model-explorer-mcp
An MCP server that lets AI agents search, compare, and right-size Hugging Face models — including estimating whether a model will actually fit in your available GPU VRAM before you download 15GB of weights and find out the hard way.
Works with any MCP-compatible client: Claude, Google Antigravity, Cursor, and others.
Why
Picking a model off Hugging Face usually means checking the model card, guessing at parameter count, mentally doing GB-per-precision math, and hoping it fits your GPU. This wraps that into tools an agent can call directly, so you can ask things like:
"Find me a small instruction-tuned model I can run locally on a 12GB GPU"
and get an actual, sized answer instead of a guess.
Related MCP server: nodegrove VRAM: can I run it?
Tools
Tool | What it does |
| Search HF Hub by query and task, sorted by downloads/likes/recency |
| Full details on one model: params, license, tags, task |
| Side-by-side comparison of 2–4 models |
| Estimates VRAM needed at fp32/fp16/int8/int4 and whether it fits your GPU |
| Finds lighter/heavier/similar-sized alternatives for the same task |
Install
pip install hf-model-explorer-mcpOr run directly without installing, via uvx:
uvx hf-model-explorer-mcpConfigure
Claude Desktop / Claude Code
Add to your MCP config (claude_desktop_config.json or .mcp.json):
{
"mcpServers": {
"hf-model-explorer": {
"command": "uvx",
"args": ["hf-model-explorer-mcp"]
}
}
}Google Antigravity
Add to ~/.gemini/antigravity/mcp_config.json (path may vary by Antigravity version —
check Settings → MCP Servers in the IDE):
{
"mcpServers": {
"hf-model-explorer": {
"command": "uvx",
"args": ["hf-model-explorer-mcp"]
}
}
}Example
User: I want to run an instruction-tuned 7B-ish model locally. I have a 12GB GPU.
Agent calls: search_models(query="instruct", task="text-generation")
Agent calls: check_hardware_fit(model_id="mistralai/Mistral-7B-Instruct-v0.2", available_vram_gb=12)
→ {
"parameters": "7.0B",
"recommended_precision": "fp16",
"estimated_vram_by_precision_gb": { "fp16": 15.65, "int8": 7.82, "int4": 3.91 },
"fits": true
}How hardware-fit estimation works
Parameter count comes from the model's safetensors metadata on the Hub. Memory is
estimated as params × bytes_per_param × 1.2 (a 20% overhead margin for activations
and KV-cache), using standard bytes-per-parameter figures:
Precision | Bytes/param |
fp32 | 4.0 |
fp16 / bf16 | 2.0 |
int8 | 1.0 |
int4 | 0.5 |
This is an estimate, not a guarantee — actual usage varies by framework, batch size, and context length. Models without safetensors metadata return an explicit "unknown" rather than a guessed number.
Development
git clone https://github.com/YOUR_USERNAME/hf-model-explorer-mcp
cd hf-model-explorer-mcp
pip install -e ".[dev]"
pytestAll 23 tests mock the Hugging Face API, so the suite runs offline with no rate limits.
Publishing (for your own fork)
PyPI:
python -m build && twine upload dist/*MCP Registry: update
server.jsonwith your GitHub username and package version, then follow the MCP Registry publishing guide to submit it — typically viamcp-publisherauthenticated against your GitHub repo.
License
MIT
Available Tools
5 toolscheck_hardware_fitA
Estimate whether a Hugging Face model will fit in a given amount of GPU VRAM, and at which precision. Uses the model's parameter count and standard bytes-per-parameter figures for each precision, plus a runtime overhead margin for activations and KV-cache. This is an estimate, not a guarantee — actual usage varies by framework, batch size, and context length.
Args: model_id: the HF model repo id, e.g. "mistralai/Mistral-7B-v0.1" available_vram_gb: available GPU VRAM in gigabytes, e.g. 24 precision: specific precision to check, or "auto" to find the lowest-precision option that fits
Inputs: model_id (required), available_vram_gb (required), precision. Returns: object
compare_modelsA
Compare 2-4 Hugging Face models side by side: parameters, license, downloads, task, and last update.
Args: model_ids: list of 2-4 HF model repo ids to compare
Inputs: model_ids (required). Returns: object
find_similar_modelsA
Find alternative models for the same task as the given model, filtered by relative size (lighter, heavier, or similar-sized alternatives).
Args: model_id: the HF model repo id to find alternatives for variant: "lighter" (fewer params), "heavier" (more params), or "same_size" (roughly comparable) limit: max number of alternatives to return (1-20)
Inputs: model_id (required), limit, variant. Returns: object
get_model_detailsA
Get full details for a single Hugging Face model, including parameter count, license, tags, and pipeline task.
Args: model_id: the HF model repo id, e.g. "meta-llama/Llama-3.1-8B-Instruct"
Inputs: model_id (required). Returns: object
search_modelsA
Search Hugging Face Hub for models matching a query, optionally filtered by task (pipeline_tag), sorted by popularity or recency.
Args: query: free-text search, e.g. "llama instruct" or "sentiment analysis" task: optional HF pipeline tag filter, e.g. "text-generation", "text-classification", "image-classification", "translation" limit: max number of results (1-50) sort_by: "downloads" (default), "likes", or "last_modified"
Inputs: query (required), task, limit, sort_by. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose: search, get details, compare, hardware fit, and find similar models. There is no meaningful overlap between them, even though several take model_id as input.
All tool names follow the same verb_noun snake_case pattern: get_model_details, search_models, compare_models, check_hardware_fit, find_similar_models. The naming is predictable and readable.
Five tools is a well-scoped set for a model exploration server. Each tool adds a distinct capability without redundancy or bloat.
The server covers the full exploration workflow: discovering models via search, inspecting individual models, comparing models, checking hardware compatibility, and finding alternatives. No obvious gaps exist for its stated purpose.
Maintenance
Related MCP Connectors
AI model/agent directory with pricing and comparisons, plus GPU VRAM fit and tokens/sec estimates.
Find open-weight AI models that fit your hardware, with weight sizes, memory and sources.
Does an LLM fit on your GPU? VRAM, KV cache and GPU count for any Hugging Face model.
Can this LLM run on my GPU? VRAM, speed ceiling and what fits instead, for any model and GPU.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables users to download HuggingFace models through natural language requests with support for file filtering, size limits, and custom download directories. Supports various AI development environments including Claude Desktop, VS Code, and Cursor.452 npm3MIT
- AlicenseAqualityBmaintenanceChecks whether an open-weight LLM fits your GPU: VRAM for weights, KV cache and overhead at each quantisation, a tokens-per-second ceiling, the longest context that fits, and what would work instead when it doesn't. Reads any Hugging Face repo's config.json. Free, read-only, no API key.6MIT
- AlicenseBqualityCmaintenanceEnables LLMs to search and retrieve read-only information from the Hugging Face Hub about models, datasets, Spaces, papers, and collections. It also supports model comparison and paper summarization prompts.10MIT
- AlicenseAqualityBmaintenanceTell your AI agent what you want a model to do. It searches Hugging Face for each part of the job and tells you which parts already exist there: which are an exact fit, which to fine-tune, which to train, and which are just code. Every model it names is real, current, and sized for your hardware.3370 npm1MIT