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.
Tools
| Tool | What it does |
|---|---|
search_models |
Search HF Hub by query and task, sorted by downloads/likes/recency |
get_model_details |
Full details on one model: params, license, tags, task |
compare_models |
Side-by-side comparison of 2–4 models |
check_hardware_fit |
Estimates VRAM needed at fp32/fp16/int8/int4 and whether it fits your GPU |
find_similar_models |
Finds lighter/heavier/similar-sized alternatives for the same task |
Install
pip install hf-model-explorer-mcp
Or run directly without installing, via uvx:
uvx hf-model-explorer-mcp
Configure
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]"
pytest
All 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
Metadata
Release files for hf-model-explorer-mcp 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hf_model_explorer_mcp-0.1.1.tar.gz | 9.9 kB | With provenance | Details for hf_model_explorer_mcp-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hf_model_explorer_mcp-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for hf_model_explorer_mcp-0.1.1-py3-none-any.whl |
Total release size: 18.1 kB
Release files / hf_model_explorer_mcp-0.1.1.tar.gz
| Download URL | hf_model_explorer_mcp-0.1.1.tar.gz |
|---|---|
| Size | 9.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
620261f12263918508e4b39d9c985bf7cdd96802204d36d52c0e1cb5307f16b0
|
|
BLAKE2b-256 checksum How to use checksums |
73bf24fe2e59d358508618a2efcdd2d4b3eba299a92f644de4fcb307fb6e554d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 24, 2026.
Transparency logRelease files / hf_model_explorer_mcp-0.1.1-py3-none-any.whl
| Download URL | hf_model_explorer_mcp-0.1.1-py3-none-any.whl |
|---|---|
| Size | 8.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c70f54a72f577a67be8b2c0058cfb1c3ee26a38cca14a156546389bec49d39da
|
|
BLAKE2b-256 checksum How to use checksums |
fd4356977a8282e7a4ac6d75661f60c18678e54bf22479695e95e65666c46d03
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 24, 2026.
Transparency logSecurity for hf-model-explorer-mcp 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for hf_model_explorer_mcp-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 24, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.