vapt-agent / README.md
chsubhasis's picture
Update README.md
f617144 verified
|
raw
history blame
19.8 kB
metadata
title: Vapt Agent
emoji: ๐Ÿ‘
colorFrom: red
colorTo: green
sdk: gradio
sdk_version: 6.0.1
app_file: app.py
pinned: false
license: apache-2.0
short_description: AI-powered VAPT agent built with Claude, MCP, and Gradio.
tags:
  - mcp-in-action-track-enterprise
  - mcp-in-action-track-consumer
  - mcp-in-action-track-creative
  - building-mcp-track-enterprise
  - building-mcp-track-consumer
  - building-mcp-track-creative
thumbnail: >-
  https://cdn-uploads.huggingface.co/production/uploads/66d9b98cec009ab887601d00/2x4OCbl46kVrGOh1a2S4z.png

๐Ÿ† VAPT Agent - Intelligent API Security Testing

MCP's 1st Birthday Hackathon Submission ๐ŸŽ‰
Hosted by Anthropic & Gradio on Hugging Face
๐Ÿ”— Hackathon Page

LinkedIn post - Refer HERE || Demo Video - Refer HERE

๐Ÿ“‹ Project Overview

VAPT Agent is an autonomous, AI-powered Vulnerability Assessment and Penetration Testing (VAPT) platform that revolutionizes API security testing. By combining Anthropic's Claude Agent SDK, Postman MCP Server, Gradio Web Interface, and RAG-based security education, this project showcases the power of Model Context Protocol (MCP) for building intelligent, context-aware security tools.

๐ŸŽฏ What Makes This Special?

This project demonstrates three powerful MCP integrations:

  1. ๐Ÿค– Anthropic Claude Agent SDK - Powers the core VAPT reasoning agent with Claude Haiku 4.5 from AWS Bedrock.
  2. ๐Ÿ“ฎ Postman MCP Server - Enables automatic API discovery and OpenAPI specification generation
  3. ๐Ÿ› ๏ธ Custom VAPT MCP Server - Provides specialized security testing tools (SQL injection, XSS, auth testing, etc.)
  4. ๐Ÿงฉ Gradio Web Interface โ€“ Provides an interactive, real-time UI for the VAPT workflow, enabling progress streaming, report visualization, dashboard analytics, and an integrated AI Security Tutor.

Combined with a modern Gradio interface and RAG-powered AI tutor using Chroma vector search, VAPT Agent bridges the gap between automated security testing and developer education.


๐Ÿ—๏ธ Architecture Overview

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    Gradio Web Interface                         โ”‚
โ”‚  (Real-time Progress, Visual Dashboard, AI Security Tutor)      โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                     โ”‚
                     โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚              VAPT Agent Orchestrator                            โ”‚
โ”‚              (vapt_agent.py)                                    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
      โ”‚                              โ”‚
      โ–ผ                              โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Claude Agent SDK   โ”‚    โ”‚     MCP Servers (via Claude SDK)     โ”‚
โ”‚  (Haiku 4.5 Model)  โ”‚โ—„โ”€โ”€โ”€โ”ค  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
โ”‚                     โ”‚    โ”‚  โ”‚ Postman    โ”‚  โ”‚ Custom VAPT    โ”‚ โ”‚
โ”‚ โ€ข Reasoning         โ”‚    โ”‚  โ”‚ MCP Server โ”‚  โ”‚ MCP Tools      โ”‚ โ”‚
โ”‚ โ€ข Test Planning     โ”‚    โ”‚  โ”‚ (SSE)      โ”‚  โ”‚ (Local Server) โ”‚ โ”‚
โ”‚ โ€ข Report Gen        โ”‚    โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                     โ”‚
                     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                     โ–ผ                               โ–ผ
              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”            โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
              โ”‚ Postman API  โ”‚            โ”‚ Target API Endpoint โ”‚
              โ”‚ โ€ข Discovery  โ”‚            โ”‚ โ€ข Security Testing  โ”‚
              โ”‚ โ€ข Schema Gen โ”‚            โ”‚ โ€ข Vuln Detection    โ”‚
              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜            โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    AI Security Tutor (RAG)                      โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
โ”‚  โ”‚ Nebius LLM   โ”‚  โ”‚ Chroma DB    โ”‚  โ”‚ Nebius Embeddings  โ”‚   โ”‚
โ”‚  โ”‚ (gpt-oss-20b)โ”‚โ—„โ”€โ”ค Vector Store โ”‚โ—„โ”€โ”ค (Qwen3-Embed-8B)   โ”‚   โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
โ”‚         โ–ฒ                   โ–ฒ                                   โ”‚
โ”‚         โ”‚                   โ”‚                                   โ”‚
โ”‚         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€ VAPT Report Context           โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ”„ How It Works

  1. User Input โ†’ User provides API endpoint via Gradio interface
  2. Discovery โ†’ Claude agent uses Postman MCP to discover endpoints and generate OpenAPI spec
  3. Testing โ†’ Agent invokes Custom VAPT MCP tools to test for vulnerabilities
  4. Reasoning โ†’ Claude Haiku 4.5 through AWS Bedrock analyzes results and generates comprehensive security report
  5. Visualization โ†’ Gradio dashboard displays risk scores and severity charts
  6. Education โ†’ User asks questions โ†’ AI Tutor uses RAG (Chroma + Nebius embeddings) to retrieve relevant report sections โ†’ Nebius LLM generates educational explanations

โœจ Key Features

๐Ÿ”’ Comprehensive Security Testing

Automated vulnerability detection powered by Claude's reasoning and custom MCP tools:

  • Injection Attacks: SQL injection, XSS, path traversal
  • Authentication & Authorization: Broken auth detection, token validation
  • Rate Limiting: DoS vulnerability assessment, burst testing (50 requests)
  • CORS Policy: Origin validation, wildcard detection
  • Security Headers: HSTS, CSP, X-Frame-Options, X-Content-Type-Options, etc.

๐ŸŽจ Modern Gradio Web Interface

Beautiful, responsive UI built with Gradio featuring:

  • Real-time Progress Streaming from Claude agent
  • Downloadable Markdown Reports for audit trails
  • Visual Risk Dashboard with interactive charts (risk gauge + severity pie chart)
  • Tabbed Interface for organized information flow
  • Custom CSS Styling for professional appearance

๐Ÿง  RAG-Powered AI Security Tutor

Context Engineering & Retrieval-Augmented Generation (RAG) implementation:

How RAG Works in VAPT Agent:

  1. Document Chunking (ai_tutor.py):

    • Report split into logical sections based on markdown headers (##)
    • Large sections auto-chunked to ~2000 characters for optimal retrieval
    • Preserves context boundaries for coherent answers
  2. Vector Embedding (Nebius + Chroma):

    • Each chunk embedded using Qwen3-Embedding-8B (Nebius)
    • Vectors stored in Chroma ephemeral in-memory database
    • Index automatically rebuilt when report changes (SHA-256 content hashing)
    • Never reuses old vectors for new reports
  3. Semantic Search:

    • User question embedded with same model
    • Top-K (default: 4) relevant chunks retrieved via cosine similarity
    • Context passed to LLM for grounded responses
  4. Context Engineering:

    • System prompt instructs LLM to prioritize retrieved VAPT report context
    • Combines report snippets + optional web search (Tavily)
    • Prevents hallucination by grounding answers in actual findings

Benefits:

  • โœ… Accurate answers specific to YOUR security report
  • โœ… No generic security advice - tailored to actual findings
  • โœ… Efficient: Only relevant context sent to LLM (cost-effective)
  • โœ… Educational: Explains vulnerabilities in your specific API

๐Ÿ“ฎ Postman MCP Integration

Leverages Postman's official MCP server (SSE protocol):

  • Automatic API endpoint discovery
  • OpenAPI/Swagger specification generation
  • Request/response schema analysis
  • Collection management for organized testing
  • Seamless integration via Claude Agent SDK

๐Ÿค– Anthropic Claude SDK

Core agent powered by Claude Agent SDK:

  • Model: Claude Haiku 4.5 (fast, cost-efficient, high-quality reasoning)
  • Multi-turn Reasoning: Agent conversations up to 100 turns
  • Tool Orchestration: Coordinates Postman MCP + Custom VAPT MCP tools
  • Flexible Deployment: Anthropic API or AWS Bedrock
  • Permission Mode: Bypass permissions for automated testing

๐ŸŽ Benefits & Impact

For Security Professionals

  • โšก Save Time: Automate repetitive VAPT tasks
  • ๐Ÿ“Š Visual Insights: Instantly understand risk posture with charts
  • ๐ŸŽ“ Learn On-the-Go: AI tutor explains findings while you work
  • ๐Ÿ“„ Audit-Ready Reports: Comprehensive markdown reports with evidence

For Developers

  • ๐Ÿ›ก๏ธ Shift-Left Security: Test APIs during development
  • ๐Ÿ“š Security Education: Learn secure coding through AI tutor
  • ๐Ÿ”ง Easy Integration: Simple API endpoint input
  • ๐Ÿš€ Fast Feedback: Get results in minutes, not days

For Organizations

  • ๐Ÿ’ฐ Cost-Effective: Reduce manual penetration testing costs
  • ๐Ÿ“ˆ Scalable: Test multiple APIs rapidly
  • ๐Ÿ“‹ Compliance: Generate audit-ready security reports
  • ๐Ÿ”„ Continuous Testing: Integrate into CI/CD pipelines

Technical Innovation

  • ๐Ÿงฉ MCP Showcase: Demonstrates multiple MCP server integration
  • ๐Ÿ”ฌ RAG Best Practices: Production-ready context engineering
  • ๐ŸŽจ UX Excellence: Beautiful, intuitive Gradio interface
  • ๐Ÿ”“ Open Source: Extensible architecture for custom tools

๐Ÿš€ Prerequisites


๐Ÿ“ฆ Installation

  1. Clone the repository:

    git clone <repository-url>
    cd vapt-agent
    
  2. Create virtual environment:

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
    
  3. Install dependencies:

    pip install -r requirements.txt
    
  4. Configure environment:

    cp .env.template .env
    # Edit .env with your credentials
    

โš™๏ธ Configuration

Create a .env file with the following variables:

# --- Core VAPT Agent Configuration ---

# AWS Bedrock (set to 1 to use Bedrock, 0 for Anthropic API)
CLAUDE_CODE_USE_BEDROCK=1

# AWS Credentials (if using Bedrock)
AWS_ACCESS_KEY_ID=your_access_key
AWS_SECRET_ACCESS_KEY=your_secret_key
AWS_REGION=us-east-1

# Model selection for VAPT Agent (Haiku 4.5 recommended)
ANTHROPIC_MODEL=global.anthropic.claude-haiku-4-5-20251001-v1:0
# If using Anthropic API directly:
# ANTHROPIC_API_KEY=sk-ant-...

# Postman API key (get from https://postman.com/settings/api-keys)
POSTMAN_API_KEY=your_postman_api_key

# --- AI Tutor Configuration (Nebius) ---

# Nebius API Key for Tutor and Embeddings
NEBIUS_API_KEY=your_nebius_api_key

# Nebius Base URL (optional, defaults to standard endpoint)
# NEBIUS_BASE_URL=https://api.tokenfactory.nebius.com/v1

# AI Tutor Chat Model
NEBIUS_TUTOR_MODEL=gpt-oss-20b

# Embedding Model for Vector Search (REQUIRED for RAG)
NEBIUS_EMBEDDING_MODEL=Qwen3-Embedding-8B

# --- Optional Web Search ---
# TAVILY_API_KEY=tvly-...

๐ŸŽฎ Usage

1. Web Interface (Recommended)

Launch the Gradio dashboard for an interactive experience:

python app.py
  • Open your browser at http://localhost:7861
  • Enter the API endpoint and HTTP method
  • Watch the real-time progress log
  • View the generated report, risk dashboard, and chat with the AI Security Tutor

2. Command Line Interface

Run the agent directly from the terminal:

python vapt_agent.py

(Ensure TEST_API_ENDPOINT and TEST_API_METHOD are set in your .env file for CLI usage)


๐Ÿ” Security Tests Performed

The agent uses custom MCP tools (vapt_tools.py) to perform:

1. Injection Testing

  • SQL Injection with various payloads (e.g., ' OR '1'='1)
  • XSS (Cross-Site Scripting) detection
  • Path traversal attempts (../../../etc/passwd)

2. Authentication Testing

  • Endpoint access without credentials
  • Authentication bypass attempts
  • Token validation and expiration checks

3. Rate Limiting

  • Burst request testing (50 rapid requests)
  • 429 status code detection
  • DoS vulnerability assessment

4. CORS Policy

  • Origin validation testing
  • Wildcard (*) detection
  • Cross-origin request testing

5. Security Headers

  • Strict-Transport-Security (HSTS)
  • X-Content-Type-Options
  • X-Frame-Options
  • Content-Security-Policy
  • X-XSS-Protection

๐Ÿ“Š Output

The agent generates a comprehensive Markdown report saved as vapt_report_YYYYMMDD_HHMMSS.md containing:

  • Executive Summary with risk score
  • Vulnerability Details (Severity, Description, Evidence, Remediation)
  • Security Headers Analysis
  • CORS Policy Review
  • Rate Limiting Assessment
  • Recommendations for fixes

๐Ÿ› ๏ธ Troubleshooting

Postman API Key Issues

AWS Bedrock Issues

  • Verify AWS credentials are correct
  • Ensure you have access to Claude models in your region
  • Check IAM permissions for Bedrock

AI Tutor Not Working

  • Check NEBIUS_API_KEY is set
  • Ensure NEBIUS_EMBEDDING_MODEL is set to Qwen3-Embedding-8B for vector search to work
  • Verify chromadb is installed: pip install chromadb

Gradio Interface Issues

  • Ensure port 7861 is not blocked
  • Try clearing browser cache
  • Check console logs for errors

๐Ÿค Contributing

Contributions are welcome! Please follow the existing code structure:

  • Keep tools modular in vapt_tools.py
  • Add configuration in config.py
  • Update .env.template for new variables
  • Follow Python best practices (PEP 8)
  • Add docstrings for new functions

๐Ÿ“œ License

MIT License


โš ๏ธ Disclaimer

This tool is for authorized security testing only. Always obtain proper authorization before testing any API endpoints. Unauthorized testing may be illegal and unethical.


๐Ÿ™ Acknowledgments

Built for MCP's 1st Birthday Hackathon hosted by Anthropic and Gradio.

Technologies Used:

VAPT Agent MCP Server

This Gradio application has been integrated with Model Context Protocol (MCP) to enable AI assistants and other MCP clients to interact with the VAPT (Vulnerability Assessment and Penetration Testing) agent programmatically.

MCP Server Overview

The MCP server exposes the VAPT agent's functionality through a standardized interface, allowing AI assistants like Claude to perform security testing and receive guidance directly.

MCP Server URL: http://<ip>:<port>/gradio_api/mcp/

Available MCP Tools

The server provides 4 MCP tools:

  1. run_security_test - Execute a security test on an API endpoint

    • Parameters:
      • api_endpoint (string): The target API endpoint URL
      • http_method (string): HTTP method (GET, POST, PUT, DELETE, etc.)
      • api_key (string): API authentication key
    • Returns: Progress updates, vulnerability report markdown, report file path, and button state
  2. update_dashboard - Update the security dashboard

    • Parameters:
      • report_md (string): Report markdown content
  3. tutor_respond - Get security guidance from the AI tutor

    • Parameters:
      • question (string): Security-related question
      • history (array): Conversation history
      • report_md (string): Current report markdown for context
    • Note: If passing a file as input, use the upload_file_to_gradio tool first

Configuration

Streamable HTTP Transport

For MCP clients that support Streamable HTTP, add this configuration:

{
  "mcpServers": {
    "gradio": {
      "url": "http://<ip>:<port>/gradio_api/mcp/"
    },
    "upload_files_to_gradio": {
      "command": "uvx",
      "args": [
        "--from",
        "gradio[mcp]",
        "gradio",
        "upload-mcp",
        "http://<ip>:<port>/",
        "<UPLOAD_DIRECTORY>"
      ]
    }
  }
}

STDIO Transport

For clients like Claude Desktop that only support STDIO, first install Node.js, then use:

{
  "mcpServers": {
    "gradio": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "http://<ip>:<port>/gradio_api/mcp/",
        "--transport",
        "streamable-http"
      ]
    },
    "upload_files_to_gradio": {
      "command": "uvx",
      "args": [
        "--from",
        "gradio[mcp]",
        "gradio",
        "upload-mcp",
        "http://<ip>:<port>/",
        "<UPLOAD_DIRECTORY>"
      ]
    }
  }
}

File Upload Support

The upload_files_to_gradio tool uploads files from your local <UPLOAD_DIRECTORY> (or any subdirectories) to the Gradio app. This is required because MCP servers need files as URLs. You can omit this tool if you prefer manual file uploads.

Requirements: uv must be installed.

Resources