I’m trying to expose my Gradio interface as an MCP server using the latest gradio[mcp]
package (version 5.27.1). I’ve followed all the instructions in the MCP course and docs, including setting the environment variable before execution:
$env:GRADIO_MCP_SERVER="True"
py app.py
However, the server only outputs:
Running on local URL: http://127.0.0.1:7860
and I never see the expected line:
MCP server available at: http://127.0.0.1:7860/gradio_api/mcp/sse
I confirmed:
gradio==5.27.1
is installedgradio-mcp
is also installed- I’m not using
mcp_server=True
in.launch()
(since it’s removed in v5) - Tried both
py
andpython
after setting the environment variable - Tested on a fresh virtual environment
Still, the MCP server routes /gradio_api/mcp/sse
and /schema
never activate.
Could someone from the Gradio or MCP team help confirm if this is a bug or if something changed in v5 that isn’t reflected in the documentation?
Reference: Building the Gradio MCP Server - Hugging Face MCP Course