You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/hub/spaces-mcp-servers.md
+11-4Lines changed: 11 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -4,11 +4,14 @@ You can **expose any public Space that has a visible `MCP` badge into a callable
4
4
5
5
## Setup your MCP Client
6
6
7
-
From your [Hub MCP settings](https://huggingface.co/settings/mcp), select your MCP client (VSCode, Cursor, Claude Code, ...) then follow the setup instructions.
7
+
From your [Hub MCP settings](https://huggingface.co/settings/mcp), select your MCP client (VSCode, Cursor, Claude Code, etc.) then follow the setup instructions.
> **Important:** You need a valid Hugging Face token with **READ** permissions to use MCP tools. If you don't have one, [create a new "Read" access token here](https://huggingface.co/settings/tokens/new?tokenType=read).
11
+
12
+
<Tipwarning={true}>
13
+
You need a valid Hugging Face token with <strong>READ</strong> permissions to use MCP tools. If you don't have one, <ahref="https://huggingface.co/settings/tokens/new?tokenType=read"target="_blank">create a new "Read" access token here</a>.
14
+
</Tip>
12
15
13
16
## Add an existing Space to your MCP tools
14
17
@@ -25,7 +28,9 @@ From your [Hub MCP settings](https://huggingface.co/settings/mcp), select your M
25
28
26
29
If your MCP client is configured correctly, the Spaces you added will be available instantly without changing anything (if it doesn't restart your client and it should appear). Most MCP clients will list what tools are currently loaded so you can make sure the Space is available.
27
30
28
-
> **Note:** For ZeroGPU Spaces, your quota will be used when the tool is called, if you run out of quota you can [subscribe to PRO](https://huggingface.co/subscribe/pro?from=ZeroGPU) to get 25 minutes of daily quota (x8 more quota than free users). For example your PRO account lets you generate up to 600 images per day using FLUX.1-schnell.
31
+
<Tip>
32
+
For ZeroGPU Spaces, your quota will be used when the tool is called, if you run out of quota you can <ahref="https://huggingface.co/subscribe/pro?from=ZeroGPU"target="_blank">subscribe to PRO</a> to get 25 minutes of daily quota (x8 more quota than free users). For example your PRO account lets you generate up to 600 images per day using FLUX.1-schnell.
Push the app to a **Gradio Space** and it will automatically receive the **MCP** badge. Anyone can then add it as a tool with a single click.
64
69
65
-
> **Note:** It's also quite easy to convert an existing Gradio Space to MCP server. Duplicate it from the context menu then just add the `mcp_server=True` parameter to your `launch()` method, and ensure your functions have clear type hints and docstrings - you can use AI tools to automate this quite easily ([example](https://huggingface.co/spaces/Lightricks/ltx-video-distilled/discussions/22/files) of AI generated docstrings).
70
+
<Tip>
71
+
It's also quite easy to convert an existing Gradio Space to MCP server. Duplicate it from the context menu then just add the <code>mcp_server=True</code> parameter to your <code>launch()</code> method, and ensure your functions have clear type hints and docstrings - you can use AI tools to automate this quite easily (<ahref="https://huggingface.co/spaces/Lightricks/ltx-video-distilled/discussions/22/files"target="_blank">example</a> of AI generated docstrings).
0 commit comments