安装与连接
第三方代码:运行前请先阅读。HPSILab 审核过此说明,但不运营该服务器。
按客户端安装
claude mcp add --transport http hugging-face-mcp-server https://huggingface.co/mcp
由 HPSILab 根据本条目的端点和软件包,按各客户端官方文档的格式生成。参数、密钥和版本以官方说明为准。
官方说明
# From the official README: https://github.com/huggingface/hf-mcp-server # Remote server with Hugging Face sign-in claude mcp add hf-mcp-server -t http https://huggingface.co/mcp?login # Or with an access token claude mcp add hf-mcp-server -t http https://huggingface.co/mcp -H "Authorization: Bearer <YOUR_HF_TOKEN>"
远程 Endpoint
https://huggingface.co/mcp工具(4)
来自服务器公开端点的 tools/list,检查于 2026年11月22日。HPSILab 从不调用这些工具。
工具说明检查:1 个工具有警告
按规则检查文字中是否有提示词注入或不安全请求的迹象,不是安全保证。
hf_whoami只读Hugging Face User Info
Inspect the current Hugging Face authentication context, including the account, visible organization memberships, and credential access details. Read-only and never returns credential values.
hub_repo_search只读访问外部服务Repo Search
Search and list Hugging Face models, datasets and Spaces (sort by downloads, likes, trending) with a shared query interface. You can target models, datasets, spaces, or aggregate across multiple repo types in one call. Include links to repositories in your response.
参数(6)
query· stringSearch term. Leave blank and specify sort + limit to browse trending or recent repositories.repo_types· arrayRepository types to search. Defaults to ["model", "dataset"]. space uses keyword search via /api/spaces.author· stringOrganization or user namespace to filter by (e.g. 'google', 'meta-llama', 'huggingface').filters· arrayOptional hub filter tags. Applied to each selected repo type (e.g. ["text-generation"], ["language:en"], ["mcp-server"]).sort· stringSort order (descending): trendingScore, downloads, likes, createdAt, lastModifiedlimit· numberMaximum number of results to return per selected repo type
hub_repo_details只读访问外部服务Hub Repository Details
Get details for one or more Hugging Face repos (model, dataset, or space): card metadata, license, downloads, files, Space hardware/status, dataset configs, splits, columns and preview rows. Auto-detects type unless specified. For datasets, use operations: overview, dataset_structure, dataset_preview. Use dataset_structure first to discover configs, splits, sizes, and schema. Use dataset_preview only when config and split are known, unless the dataset has a single config/split.
参数(7)
repo_ids· array · 必填Repo IDs for (models|dataset/space) - usually in author/name format (e.g. openai/gpt-oss-120b)repo_type· stringSpecify lookup type; otherwise auto-detectsoperations· arrayDetails to return. Defaults to ["overview"]. For datasets, prefer ["overview", "dataset_structure"] first; then call ["dataset_preview"] with config and split.config· stringDataset Viewer config. Required for dataset_preview when the dataset has multiple config/split options. Discover via dataset_structure.split· stringDataset Viewer split. Required for dataset_preview when the dataset has multiple config/split options. Discover via dataset_structure.offset· integerRow offset for dataset_preview. Defaults to 0.limit· integerRow count for dataset_preview. Defaults to 5 and is clamped to 1-100.
hf_fs只读访问外部服务⚠ 说明过长Hugging Face Hub: Find, use and view models, datasets, spaces, buckets, papers, documentation and collections. Get daily papers reports, and browse trending content.
When to use: Hugging Face Hub models, datasets, Spaces, collections, papers, daily papers, today's trending models, current paper leaderboard, docs; list and read repository files, model and dataset cards (README, license). Examples: {"operations":[{"cmd":"ls","args":["hf://models/trending","--limit","10"]}]} {"operations":[{"cmd":"ls","args":["hf://papers/trending"]}]} {"operations":[{"cmd":"ls","args":["hf://papers/daily/latest"]}]} {"operations":[{"cmd":"cat","args":["hf://papers/2501.00001/paper.md"]}]} {"operations":[{"cmd":"search","args":["hf://models","--tag","base_model:finetune:org/repo"]}]} Use hf_fs for Hugging Face Hub filesystem operations. Call it with operations, an array of {cmd, args} items; multiple operations may be submitted together. Usage: {"operations":[{"cmd":"ls","args":["hf://models/org/repo"]}]} Grammar; each string below is one args array item: ls URI [--recursive] [--glob GLOB] [--type TYPE] [--sort SORT] [--limit N] cat URI [--offset N] [--max-bytes N] attach URI [--max-bytes N] stat URI find URI [--name GLOB] [--path GLOB] [--type TYPE] [--limit N] search URI [QUERY] [--type TYPE] [--sort SORT] [--tag TAG] [--kind mcp] [--limit N] COMMAND = ls|cat|attach|stat|find|search. TYPE = file|dir|repo|bucket|collection|paper|link. SORT = createdAt|downloads|likes|lastModified|likes30d|trendingScore|mainSize|id|trending|upvotes. URI is a canonical hf:// URI. QUERY and GLOB are each one string. Use search for resource discovery, not repository-content search; ls for a known directory, find for recursive file discovery by name/path (not file contents), stat for filesystem metadata or an uncertain target type, cat for text contents, and attach for a complete JPEG, PNG, or WebP image. When the request gives an exact text-file URI, use cat directly; do not add ls or stat first. stat does not read the contents of JSON, Markdown, or other text files. Search scopes: hf://models[/OWNER], hf://datasets[/OWNER], hf://spaces[/OWNER], hf://collections[/OWNER], hf://papers, and hf://docs[/...]. Repository and repository-file scopes are not supported: search a resource root or owner scope to discover resources; use find for file discovery within a repository or cat for a known text file. Paper and documentation search require QUERY. --tag filters models, datasets, and Spaces by Hub tag (repeatable; all must match) and applies only to hf://models|datasets|spaces[/OWNER]; omit QUERY when the tag already identifies the target, because QUERY also filters repository names. Derived models carry base_model:ID and base_model:RELATION:ID tags, where RELATION is finetune, adapter, merge, or quantized. --kind applies only to hf://spaces[/OWNER]; the only valid --kind value is mcp, which selects MCP Spaces. Tag families are documented at hf://README.md. Use ls hf://models/trending, hf://datasets/trending, hf://spaces/trending, or hf://papers/trending for trending listings. hf://papers/ID is a paper directory, not paper text. Use cat hf://papers/ID/paper.md for paper text and cat hf://papers/ID/metadata.json for metadata. No preliminary listing is needed for these known paths. Use ls hf://papers/ID to discover other resources. Omit --limit, --sort, and --type unless the request requires them. Limits and path-specific behavior are documented at hf://README.md. Issue one hf_fs call. Links: hf://models|datasets|spaces/OWNER/NAME/PATH maps to https://huggingface.co[/datasets|/spaces]/OWNER/NAME/resolve/main/PATH (buckets: https://huggingface.co/buckets/OWNER/NAME/resolve/PATH); URL-encode each path segment. arXiv ids (for example 2502.16161) link papers, models and datasets.
参数(1)
operations· array · 必填
链接
更多「Agent 基础设施」类 MCP Server
- Hyperbrowser MCP Server
Scrape, crawl and extract structured data, or run browser agents, through Hyperbrowser's cloud browsers.
- Jina AI MCP Server
Jina AI's reader, search, embeddings and reranking tools for agents, from a hosted server.
- Oxylabs MCP Server
Scrape and parse web pages, including JavaScript-heavy and geo-restricted sites, with Oxylabs.
- Bright Data MCP Server
Real-time web data for agents: search, scrape and browse sites without getting blocked, through Bright Data.
- Langfuse Prompt Management MCP
Fetch and use prompts managed in Langfuse, so agents and apps share versioned prompt templates.
- Docker MCP Gateway
Docker's gateway for running and managing MCP servers in isolated containers, with a shared catalog and secrets.