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: units/en/unit1/gradio-mcp.mdx
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -114,6 +114,16 @@ When you set `mcp_server=True` in `launch()`, several things happen:
114
114
115
115
4.**Hosted MCP Servers on 🤗 Spaces**: You can publish your Gradio application for free on Hugging Face Spaces, which will allow you to have a free hosted MCP server. Here's an example of such a Space: https://huggingface.co/spaces/abidlabs/mcp-tools
116
116
117
+
## Use MCP-compatible Spaces from your client
118
+
119
+
You can connect any MCP-compatible Space to your assistant via Hugging Face MCP settings:
2. Open https://huggingface.co/settings/mcp (logged in) and add the Space.
123
+
3. Restart or refresh your MCP client so it discovers the new tools.
124
+
125
+
These Spaces expose their functions as tools with arguments and descriptions, so your assistant can call them directly.
126
+
117
127
## Troubleshooting Tips
118
128
119
129
1.**Type Hints and Docstrings**: Ensure you provide type hints and valid docstrings for your functions. The docstring should include an "Args:" block with indented parameter names.
0 commit comments