Skip to main content
Glama
DEPLOYMENT.mdβ€’2.98 kB
# πŸš€ Quick Deployment Guide ## πŸ“‹ What You Have Your complete Gemini MCP Server repository with: ``` gemini-mcp-server/ β”œβ”€β”€ app.py # Main FastAPI application β”œβ”€β”€ requirements.txt # Python dependencies β”œβ”€β”€ database.py # Database configuration β”œβ”€β”€ models.py # Database models β”œβ”€β”€ mcp_config.py # Server settings β”œβ”€β”€ middleware.py # Rate limiting & validation β”œβ”€β”€ init_db.py # Database setup script β”œβ”€β”€ test_api.py # API testing script β”œβ”€β”€ Dockerfile # Docker configuration β”œβ”€β”€ .gitignore # Git ignore rules β”œβ”€β”€ env.example # Environment template β”œβ”€β”€ LICENSE # MIT license └── README.md # Documentation ``` ## ⚑ Quick Start (5 minutes) ### 1. Get FREE Gemini API Key πŸ”‘ **Get yours here**: https://aistudio.google.com/app/apikey ### 2. Setup Environment ```bash # Navigate to the repository cd gemini-mcp-server # Copy environment template cp env.example .env # Edit .env and add your API key: GEMINI_API_KEY=AIza...your_key_here ``` ### 3. Install & Run ```bash # Install dependencies pip install -r requirements.txt # Initialize database python init_db.py # Start the server python app.py ``` **Server runs at**: http://localhost:8000 ### 4. Test It Works ```bash # In another terminal, test the API python test_api.py ``` ## 🌐 Deploy to Production (FREE) ### Option 1: Railway (Recommended) 1. **Push to GitHub**: ```bash git init git add . git commit -m "Initial commit" git remote add origin https://github.com/yourusername/gemini-mcp-server.git git push -u origin main ``` 2. **Deploy to Railway**: - Visit https://railway.app - Connect your GitHub repo - Add environment variable: `GEMINI_API_KEY=your_key` - Deploy automatically! ### Option 2: Render 1. Connect GitHub repo to https://render.com 2. Create new Web Service 3. Add environment variable: `GEMINI_API_KEY=your_key` 4. Deploy! ### Option 3: Docker ```bash docker build -t gemini-mcp-server . docker run -p 8000:8000 -e GEMINI_API_KEY="your_key" gemini-mcp-server ``` ## πŸ”— Connect to Your Frontend Update your React app to use the deployed URL: ```typescript // Replace this URL with your deployed server const API_URL = "https://your-deployed-server.railway.app"; const response = await fetch(`${API_URL}/mcp/process`, { method: 'POST', headers: { 'Content-Type': 'application/json', 'x-mcp-auth': 'your-auth-token' }, body: JSON.stringify({ query: userMessage, user_id: currentUser.id, priority: 'normal' }) }); ``` ## πŸŽ‰ You're Ready! - βœ… **Backend**: Fully functional MCP server - βœ… **AI**: Free Google Gemini integration - βœ… **Database**: SQLite (easy) or PostgreSQL (production) - βœ… **Deployment**: Free hosting options - βœ… **Frontend**: Works with your existing React app **Your SaaS is now 90% complete!** πŸš€

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ChiragPatankar/MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server