Discover trending open weights, verify dataset gated/disabled flags, and rank live Spaces demos without scraping HTML pages. Three dedicated MCP organs—hf_hub_models, hf_hub_datasets, and hf_hub_spaces—normalize HuggingFace Hub REST JSON at sub-second cached latency.
Model selection agents need likes, trendingScore, downloads, library_name, and tags from /api/models, paired with gated and disabled flags plus SHA revisions from /api/datasets, and runtime SDK metadata from /api/spaces. Separating these into three typed organs keeps JSON schemas clean and prevents payload ambiguity.
Public unauthenticated HuggingFace Hub GET routes allow roughly 1,000 requests per 5-minute IP window. Caching popular searches (such as bert models or gsm8k evaluation datasets) for 7 days (604,800 seconds) avoids 429 bursts, while anti-fake-200 screening guarantees HTML error responses never enter the cache or incur charges.
Primary upstream endpoint for hf_hub_models: https://huggingface.co/api/models?search={query}&limit={limit}. Empty-result guard: Return non-billable empty result if JSON array is empty ([]) or HTTP status >= 400.
| Organ & MCP Tool | API & Subdomain | Protocol | Cache TTL | Live Probe | Verified Sample Fields |
|---|---|---|---|---|---|
hf_hub_modelsMCP: airesearch_hf_hub_models | HuggingFace Hub Models API ai_models_datasets | rest_json | 7d (604800s) | HTTP 200 (1544 ms) | _id, id, likes, trendingScore, private |
hf_hub_datasetsMCP: airesearch_hf_hub_datasets | HuggingFace Hub Datasets API ai_models_datasets | rest_json | 7d (604800s) | HTTP 200 (1254 ms) | _id, id, author, disabled, gated |
hf_hub_spacesMCP: airesearch_hf_hub_spaces | HuggingFace Hub Spaces API ai_models_datasets | rest_json | 7d (604800s) | HTTP 200 (1543 ms) | _id, id, likes, private, sdk |
Connect to https://devour-ai.fastmesh.dev/mcp or SuperBus https://mcp.fastmesh.dev/mcp (JSON-RPC 2.0):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "airesearch_hf_hub_models",
"arguments": {
"query": "bert",
"limit": 2
}
}
}
Or call the deterministic REST endpoint directly:
curl -sS -X POST https://devour-ai.fastmesh.dev/v1/organs/hf_hub_models/invoke \
-H "Content-Type: application/json" \
-d '{"params": {"query": "bert", "limit": 2}}'
Per the organ empty_result_rule, empty JSON arrays or responses blocked by gated/disabled flags return non-billable results (billable_micros: 0).
Yes. airesearch_hf_hub_spaces accepts limit, sort (e.g. likes), and direction (-1 for descending) parameters.