mcp-generator / README.md
visproj's picture
Update README.md
e0bc24e verified

A newer version of the Gradio SDK is available: 6.1.0

Upgrade
metadata
title: MCP Generator
emoji: πŸ’»
colorFrom: blue
colorTo: purple
sdk: gradio
app_file: app.py
pinned: false
license: other
tags:
  - mcp
  - mcp-in-action-track-enterprise
  - mcp-in-action-track-research
  - mcp-in-action-track-consumer

Link to my social media post and video submission: https://www.linkedin.com/posts/activity-7400263165877604352-I8vp

πŸ€– MCP Generator

Turn Any API into an MCP Server in Seconds!

Built for the MCP 1st Birthday Hackathon - Track 2: MCP in Action πŸŽ‰

🎯 What is This?

A meta-MCP that generates MCP servers from any API! This is:

  • βœ… An MCP server itself (uses MCP Fetch Server)
  • βœ… A code generator (powered by LangGraph agents)
  • βœ… A one-click deployment tool (instant MCP hosting)
  • βœ… Non-technical friendly (no terminal commands needed!)

✨ Features

  • πŸ” Automatic API Analysis - Just provide a URL, we analyze the API structure
  • πŸ€– AI-Powered Code Generation - Claude generates complete, working MCP servers
  • πŸ“¦ Complete Package - Get server code, README, and config files
  • πŸš€ Instant Hosting - Your MCP runs immediately in a deployed space using your HF Token
  • πŸ“₯ Download Option - Self-host later if you want
  • 🎨 Beautiful UI - Built with Gradio for ease of use

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚    Gradio Frontend          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
           β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  LangGraph Agent Factory    β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚ API Analyzer Agent     β”‚ β”‚  ← Uses Fetch MCP
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚ Code Generator Agent   β”‚ β”‚  ← Uses Claude API
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
           β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Generated MCP Server      β”‚
β”‚   β€’ stdio transport         β”‚
β”‚   β€’ Complete documentation  β”‚
β”‚   β€’ Ready to deploy         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸš€ Quick Start

Try it on HuggingFace Spaces

πŸ‘‰ Launch MCP Generator πŸ‘ˆ

Run Locally

# Clone the repo
git clone https://github.com/visprogithub/MCP_Generator_Agent.git
cd MCP_Generator_Agent

# Install dependencies
npm install -g npx  # For MCP Fetch Server
pip install -r requirements.txt

# Set up API key
echo "ANTHROPIC_API_KEY=your_key_here" > .env

# Run the app
python app.py

Then open http://localhost:7860 in your browser!

πŸ“– How to Use

  1. Enter an API URL (e.g., https://api.github.com)
  2. Click "Generate & Host MCP Server"
  3. Download the ZIP or copy the connection config
  4. Use in Claude Desktop!

That's it! ✨

πŸŽ“ Example APIs to Try

  • https://api.github.com - GitHub API
  • https://api.stripe.com - Stripe Payment API
  • https://api.openweathermap.org - Weather Data
  • https://jsonplaceholder.typicode.com - Fake REST API (for testing)

πŸ› οΈ Technology Stack

🎯 MCP 1st Birthday Hackathon

This project demonstrates:

βœ… Using MCP - Integrates Fetch MCP for API analysis βœ… Providing MCP - Generates working MCP servers βœ… Real-world Impact - Makes MCP development accessible to everyone βœ… Creativity - Meta-MCP that builds MCPs using MCPs! βœ… Polish - Beautiful UI, complete docs, one-click experience

Track 2: MCP in Action

Category: Productivity

This tool makes developers and non-technical users 10x more productive by eliminating the manual work of creating MCP servers.

πŸ“ Project Structure

MCP_Generator_Agent/
β”œβ”€β”€ app.py                  # Main Gradio application
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ agents/            # LangGraph agents
β”‚   β”‚   β”œβ”€β”€ factory.py     # Agent orchestration
β”‚   β”‚   β”œβ”€β”€ api_analyzer.py
β”‚   β”‚   └── code_generator.py
β”‚   β”œβ”€β”€ mcp_clients/       # MCP client wrappers
β”‚   β”‚   └── fetch_client.py
β”‚   β”œβ”€β”€ templates/         # Code templates
β”‚   β”‚   β”œβ”€β”€ mcp_server_template.py.jinja
β”‚   β”‚   └── readme_template.md.jinja
β”‚   β”œβ”€β”€ hosted_mcps/       # Generated MCPs
β”‚   β”œβ”€β”€ mcp_host.py        # MCP hosting manager
β”‚   └── config.py          # Configuration
β”œβ”€β”€ requirements.txt
└── README.md

🀝 Contributing

This is a hackathon project, but contributions are welcome! Feel free to:

  • Report bugs
  • Suggest features
  • Submit pull requests
  • Share your generated MCPs!

πŸ“œ License

Copyright Β© 2025. All Rights Reserved.

This software is proprietary and confidential. Unauthorized copying, distribution, modification, or use of this software, via any medium, is strictly prohibited without express written permission from the copyright holder.

πŸ™ Acknowledgments

  • Anthropic for Claude and MCP
  • Gradio for the amazing UI framework
  • LangGraph for agent orchestration
  • The entire MCP community! πŸŽ‚

Made with ❀️ for the MCP 1st Birthday Hackathon

πŸ”— HuggingFace Space | πŸ”— GitHub