Spaces:
Runtime error
Runtime error
phil71x
commited on
Commit
·
4d5b0f4
1
Parent(s):
ae7ffd8
docs: Update section numbering in MCP server documentation for consistency
Browse files- docs/01_mcp_server.md +3 -3
docs/01_mcp_server.md
CHANGED
@@ -120,7 +120,7 @@ Gradio significantly simplifies exposing a Python function as an MCP tool:
|
|
120 |
|
121 |
3. **MCP Endpoint**: Gradio hosts the MCP service at a specific path (usually `/gradio_api/mcp/sse` relative to the base URL), handling the JSON-RPC communication required by MCP.
|
122 |
|
123 |
-
##
|
124 |
|
125 |
1. **Type Hints and Docstrings**:
|
126 |
* Always provide type hints for your function parameters and return values.
|
@@ -152,7 +152,7 @@ Gradio significantly simplifies exposing a Python function as an MCP tool:
|
|
152 |
* Check that the server is running and accessible.
|
153 |
* Verify that the MCP schema is available at the expected URL (e.g., `http://localhost:7860/gradio_api/mcp/schema`).
|
154 |
|
155 |
-
##
|
156 |
|
157 |
To make your server available to others, you can deploy it to Hugging Face Spaces:
|
158 |
|
@@ -186,7 +186,7 @@ https://YOUR_USERNAME-mcp-sentiment.hf.space/gradio_api/mcp/sse
|
|
186 |
|
187 |
For more details, see the [Hugging Face MCP Course documentation](https://huggingface.co/learn/mcp-course/unit2/gradio-server).
|
188 |
|
189 |
-
##
|
190 |
|
191 |
We have successfully built the server-side component of our application. This server uses Gradio to:
|
192 |
* Provide a web UI for direct interaction with our `sentiment_analysis` function.
|
|
|
120 |
|
121 |
3. **MCP Endpoint**: Gradio hosts the MCP service at a specific path (usually `/gradio_api/mcp/sse` relative to the base URL), handling the JSON-RPC communication required by MCP.
|
122 |
|
123 |
+
## 6. Troubleshooting Tips
|
124 |
|
125 |
1. **Type Hints and Docstrings**:
|
126 |
* Always provide type hints for your function parameters and return values.
|
|
|
152 |
* Check that the server is running and accessible.
|
153 |
* Verify that the MCP schema is available at the expected URL (e.g., `http://localhost:7860/gradio_api/mcp/schema`).
|
154 |
|
155 |
+
## 7. Deploying to Hugging Face Spaces
|
156 |
|
157 |
To make your server available to others, you can deploy it to Hugging Face Spaces:
|
158 |
|
|
|
186 |
|
187 |
For more details, see the [Hugging Face MCP Course documentation](https://huggingface.co/learn/mcp-course/unit2/gradio-server).
|
188 |
|
189 |
+
## 8. Conclusion for Part 1
|
190 |
|
191 |
We have successfully built the server-side component of our application. This server uses Gradio to:
|
192 |
* Provide a web UI for direct interaction with our `sentiment_analysis` function.
|