File size: 6,376 Bytes
a95167c e871161 a95167c e0bc24e a95167c 04693f6 a95167c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 |
---
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) |