--- 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](https://huggingface.co/spaces/MCP-1st-Birthday/mcp-generator)** 👈 ### Run Locally ```bash # 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 - **Frontend:** [Gradio 4](https://gradio.app) - Beautiful web UI - **Agents:** [LangGraph](https://github.com/langchain-ai/langgraph) - Agent orchestration - **LLM:** [Anthropic Claude](https://anthropic.com) - Code generation - **MCP Client:** [@modelcontextprotocol/server-fetch](https://github.com/modelcontextprotocol/servers) - Fetch API docs - **MCP Server:** [MCP Python SDK](https://github.com/modelcontextprotocol/python-sdk) - Generated servers ## 🎯 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](https://anthropic.com) for Claude and MCP - [Gradio](https://gradio.app) for the amazing UI framework - [LangGraph](https://github.com/langchain-ai/langgraph) for agent orchestration - The entire MCP community! 🎂 --- **Made with ❤️ for the MCP 1st Birthday Hackathon** 🔗 [HuggingFace Space](https://huggingface.co/spaces/MCP-1st-Birthday/mcp-generator) | 🔗 [GitHub](https://github.com/visprogithub/MCP_Generator_Agent)