
Library Gradio team
Gradio
Open-source Python library for building web UIs, chatbots and demos for ML models, with share links and an MCP server mode.
What it is
Gradio lets you wrap a Python function or model in a web interface with a few lines of code, using the high-level Interface, the low-level Blocks API for custom layouts, or ChatInterface for chatbots. Apps can be shared through a temporary public link with share=True, hosted on Hugging Face Spaces, called from code with gradio_client, or exposed as an MCP server so agents can use their functions as tools.
What it's useful for
Putting a quick web demo with file upload and a chat box in front of a model you are testing.
Key features
- gr.Interface, gr.Blocks and gr.ChatInterface
- Public share links with launch(share=True)
- Free hosting on Hugging Face Spaces
- gradio_client to call any Gradio app from Python
- MCP server mode: launch(mcp_server=True) serves tools at /gradio_api/mcp/ over streamable HTTP
How to use it
Before you start
- Python 3.10+
pip install --upgrade gradiopip install "gradio[mcp]"Commands are copied from the official documentation. Check the docs for the latest version before running them.
Limitations to know
- Python 3.10 or higher
- MCP server mode needs the gradio[mcp] extra
Alternatives
MCP servers for this
MCP reference server that gives an AI client controlled read/write access to chosen local directories.
Hugging Face's hosted MCP server that lets agents search models, datasets, Spaces and papers and call Gradio Spaces.
MCP reference server that gives a client persistent memory as a local knowledge graph of entities, relations and observations.
Skills for this
Anthropic skill for generative art in p5.js with seeded randomness and an interactive viewer for exploring parameters.
Anthropic's public repository of example Agent Skills, the document skills, a skill template and the spec.
Related resources
Google's web workspace for trying Gemini models and getting a Gemini API key with a free usage tier.
AWS's managed service for calling 100+ foundation models from Anthropic, OpenAI, Meta, Mistral, DeepSeek, Amazon and others in your AWS account.
Vercel's open-source Next.js and AI SDK template for building a full chatbot app with auth and saved history.
DeepSeek's MIT-licensed open-weight reasoning and chat models, also served through an OpenAI- and Anthropic-compatible API.