Hugging Face MCP Server Cursor IDE Setup 2026: Hub Search, Spaces & Jobs from Chat
Connect the official Hugging Face MCP server to Cursor IDE: generate the client config from huggingface.co/settings/mcp, search models and datasets, and run Spaces without leaving your editor.
Hugging Face MCP Server Cursor IDE Setup 2026
How do you connect Hugging Face to Cursor via MCP? Log into huggingface.co, open huggingface.co/settings/mcp, pick "Cursor" from the client list, and copy the config snippet the page generates for you. Paste it into ~/.cursor/mcp.json, restart Cursor, and your assistant can search Hub models, datasets, and Spaces, pull documentation, and run community tools — all from chat.
The one thing worth knowing up front: Hugging Face doesn't publish a single static JSON block for you to copy from a blog post. The settings page builds the config per-client and per-account, tied to your own access token, so it's worth treating that page as the source of truth rather than a snippet you found elsewhere — including this one.
What the Hugging Face MCP Server Actually Gives You
This isn't a code-hosting integration like the GitHub or GitLab servers — it's a research and discovery layer on top of the Hub. Connected, Cursor can:
Most of this runs through one built-in tool called hf_fs, which handles Hub navigation and semantic search. Three additional tool groups — repo contribution, Sandboxes, and Jobs — are opt-in and toggled from the same settings page, not enabled by default.
Why This Matters for a Coding Workflow
The practical use case isn't "chat about AI" — it's cutting out the browser round-trip when you're picking a model or checking whether a dataset actually has the license you need before you build on top of it. Asking "find a small quantized model I can run locally for sentiment classification" and getting back real, current Hub results beats a training-data-based guess about what exists, especially since new models ship constantly and any static knowledge here goes stale fast.
The Jobs and Sandboxes tools take it further — instead of describing what you want to run and copy-pasting the result into Hugging Face's UI, you can ask Cursor to kick off a job on Hugging Face's infrastructure directly and check back on it later in the same chat.
Prerequisites
Step 1: Open Your MCP Settings on Hugging Face
Go to huggingface.co/settings/mcp while logged in. This page is the actual control panel — it's where you toggle on Contribute Repos, Sandboxes, and Jobs, add community Spaces as extra tools, and generate the connection snippet for whichever client you're using.
Step 2: Pick Cursor as Your Client
The settings page lists supported clients — Cursor, VS Code, Zed, Claude Desktop, Codex, and others — and shows a ready-to-copy configuration block specific to the one you select. Pick Cursor and copy what it gives you.
Under the hood this is a remote, authenticated MCP connection — structurally similar to how other hosted servers (Sentry, Stripe's official server) connect: a url pointing at Hugging Face's MCP endpoint, with your access token passed as a bearer credential rather than stored as a separate env block. The exact field names can shift as Hugging Face iterates on the server, which is the whole reason the settings page generates it live instead of a guide hard-coding it.
Step 3: Paste, Save, Restart
Add the copied block to ~/.cursor/mcp.json, save the file, and fully restart Cursor (not just reload the window — MCP connections are read at startup). Check Cursor's MCP panel for a connected "Hugging Face" entry.
Step 4: Verify the Connection
In Cursor chat, try:
Search Hugging Face for small quantized models good for local sentiment classification
Or:
Find a Space on Hugging Face that can transcribe audio files
If you get back real model names, download counts, and links rather than a generic answer, the connection is live.
Turning On Extra Tools
Search and documentation lookup work by default. Three tool groups are opt-in, toggled from the settings page itself — not from mcp.json:
Flip these on only if you actually want write/execute capability — leaving them off keeps the connection read-only and lower-risk, similar to the read-vs-write distinction that matters on any API-key-based MCP server.
Adding Community Tools from Spaces
Beyond Hugging Face's own tools, any MCP-compatible Gradio app hosted on a Space can be added as a tool your assistant can call directly — browse MCP-enabled Spaces here and add the ones you want from the same settings page. There's also a "Dynamic Spaces" option that lets your assistant discover and call compatible Spaces on the fly, without you adding each one manually. After adding a Space, restart or reload your client — new tools don't appear in an already-running session.
Practical Workflows
Model selection during development
I need a model for extractive question-answering that's small enough to run
on CPU. Search Hugging Face for options, and check their licenses before you
suggest anything — I can't use anything with a non-commercial restriction.
Dataset discovery
Find datasets on Hugging Face about weather time-series with hourly
granularity, and tell me their size and license
Documentation lookup without a browser tab
How do I use LoRA adapters with PEFT? Search the Hugging Face docs directly
rather than guessing from general knowledge.
Running a Space as a tool
Find a Space that can transcribe an audio file, then run it on
this recording and give me the transcript
Gotchas
Search results reflect the live Hub, not a fixed snapshot. A model that ranked well last month might not today — treat every search as current, not cached, which is the actual point of using MCP over a static training-data answer.
Write and execute tools are opt-in for a reason. Contribute Repos, Sandboxes, and Jobs all consume your account's quota or permissions. If you're on a free-tier account, Jobs and Sandboxes may hit usage limits faster than you expect — check your account's plan limits before scripting anything that loops.
License fields aren't always populated consistently across the Hub. If a model card is missing clear licensing info, don't treat "no license shown" as "safe to use commercially" — ask Cursor to flag ambiguous cases rather than assume.
Troubleshooting
Server doesn't appear as connected in Cursor
Confirm you fully restarted Cursor after pasting the config — a window reload isn't sufficient for MCP connections to re-initialize. Also check that the snippet was copied completely; remote MCP configs with auth headers are easy to truncate on copy.
Searches return nothing or an auth error
Your access token may have expired or been revoked. Return to huggingface.co/settings/mcp and regenerate the client config rather than trying to patch the existing one by hand.
Jobs or Sandboxes tools aren't showing up even though I want them
These are opt-in per the settings page, not automatic. Toggle them on there, then restart Cursor — enabling them in the browser doesn't push live to an already-connected client.
A Space I added as a tool isn't callable
Not every Space on the Hub supports MCP — only ones explicitly built as MCP-compatible Gradio apps. Confirm the Space appears in the MCP-filtered Spaces list before assuming your config is broken.
Frequently Asked Questions
Q: Is there a fixed JSON config block I can copy for Hugging Face MCP in Cursor?
A: Not a static one worth trusting long-term. Hugging Face generates the config per-client and per-account from huggingface.co/settings/mcp, tied to your own access token. Use that page directly rather than a hard-coded snippet from a guide, since the exact shape can change as the server evolves.
Q: Does this let Cursor push code to my Hugging Face repos?
A: Only if you enable the "Contribute Repos" tool, and even then it's limited to repos your assistant created through the same connection — it doesn't get arbitrary write access to every repo you own.
Q: Can I run inference through this, or is it search-only?
A: Both. Search and documentation lookup are the default tools, but you can also run community MCP-compatible Spaces as tools — including ones that do inference (transcription, image generation, classification) — and the Jobs tool can run workloads on Hugging Face's own infrastructure if you enable it.
Q: Is this specific to Cursor, or does the same server work with other clients?
A: The server itself is generic MCP — the settings page just generates a client-specific snippet for whichever tool you pick (Cursor, VS Code, Zed, Claude Desktop, and others). The underlying Hugging Face MCP endpoint is the same regardless of client.
Q: What happens if I don't have a paid Hugging Face account?
A: Search, documentation lookup, and basic Hub browsing work on the free tier. Jobs and Sandboxes consume compute and may hit free-tier usage limits faster, since those tools run actual workloads rather than just querying metadata.
Q: Can I add a specific team's private models to this search?
A: Search respects your account's own access — if your Hugging Face account has access to a private or gated repo, results should include it; if it doesn't, the MCP connection doesn't grant any additional visibility beyond what your account already has on the Hub.
Q: Is there a local, self-hosted version instead of the remote huggingface.co/mcp endpoint?
A: Hugging Face publishes the server's source as an open-source project (hf-mcp-server on GitHub), so a local run is possible for teams that want it, but the settings-page flow described in this guide is the officially documented path for most Cursor users and is what stays current as the tool set changes.
Related Guides
---
Related guides
- Netlify MCP Server Setup for Cursor IDE (2026): Deploy & Manage Sites from Chat
- New Relic MCP Server Cursor IDE Setup (2026): Hosted Endpoint with a User API Key
- Notion MCP Server Cursor IDE Setup 2026: Query Your Workspace from Composer
- Okta MCP Server Cursor IDE Setup (2026): Self-Hosted Python Server with Device or JWT Auth