A newer version of the Gradio SDK is available:
5.44.1
π Quick Start Guide
Getting Started in 3 Steps
Step 1: Test Your Setup
python test_setup.py
This will verify all dependencies are working correctly.
Step 2: Start the Application
Option A: Use the batch file (Windows)
run.bat
Option B: Manual start
# Activate virtual environment
venv\Scripts\activate # Windows
# or
source venv/bin/activate # Linux/Mac
# Run the app
python app.py
Step 3: Access the Application
- Web Interface: http://127.0.0.1:7860
- MCP Endpoint: http://127.0.0.1:7860/gradio_api/mcp/sse
Claude Desktop Integration
Prerequisites
- Install Node.js from https://nodejs.org
- Install mcp-remote:
npm install -g mcp-remote
Configuration
Find your Claude Desktop config file:
- Windows:
%APPDATA%\Claude\claude_desktop_config.json
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
Copy the contents of
claude_config.json
to your Claude config fileRestart Claude Desktop
Testing Claude Integration
In Claude Desktop, try these prompts:
Generate a UML diagram for this Python code:
class Vehicle:
def __init__(self, brand):
self.brand = brand
def start(self):
pass
class Car(Vehicle):
def start(self):
return "Engine started"
or
Analyze the structure of this Python code:
class Calculator:
def add(self, a, b):
return a + b
def multiply(self, a, b):
return a * b
Troubleshooting
Common Issues
Import errors when running test_setup.py:
pip install -r requirements.txt
Claude Desktop doesn't recognize the MCP server:
- Check Node.js installation:
node --version
- Check mcp-remote installation:
npx mcp-remote --version
- Verify the app is running: visit http://127.0.0.1:7860
- Restart Claude Desktop after config changes
- Check Node.js installation:
No diagram generated:
- Ensure your Python code contains class definitions
- Check for syntax errors in your code
- Verify internet connection (PlantUML service)
Debug Commands
# Check if the app is running
curl http://127.0.0.1:7860/gradio_api/mcp/schema
# Test MCP endpoint
npx mcp-remote http://127.0.0.1:7860/gradio_api/mcp/sse --transport sse-only
Next Steps
- Try the sample code in the web interface
- Experiment with your own Python classes
- Test the MCP integration with Claude Desktop
- Explore the code analysis features
Happy diagramming! π¨