Ship Your MCP Agent 🚀📦🤖
Learn how to deploy your MCP agent and make it accessible to users, marking the final milestone in giving your AI agent superpowers. This lesson concludes the 7-day course by focusing on the deployment process.
Day 7 — Ship Your MCP Agent
MCP & AI Agents — Agent Bootcamp Part 2 — RohithBuilds
Final day. Your agent has 5 tools, 2 resources, and 2 prompts, and it runs in a real chat UI. Today you'll make one small fix to get it deployment-ready, write a README explaining how it all fits together, push it to GitHub, and deploy it on Render — just like Part 1, Day 7, but for a project with real architecture behind it.
Step 1 — Recap & Today's Plan
Here's the week so far:
- Day 1-3: Built an MCP server with tools, a database, resources, and prompts
- Day 4: Built an MCP client that bridges your server to Groq
- Day 5: Wrapped it in a Flask chat UI
- Day 6: Added a live weather tool from a real API
Today: one small code fix, a README, GitHub, Render, and a public URL.
Step 2 — One Small Fix Before Deploying
Open agent.py. Your server_params currently launches your MCP server using the command "python". On your computer that works because your virtual environment is active — but on Render, you want to guarantee it's the exact same Python interpreter running both app.py and server.py.
Add import sys to your imports, then update server_params:
server_params = StdioServerParameters(
command=sys.executable,
args=["server.py"],
)
sys.executable is the full path to whatever Python is currently running your app — on your machine or on Render's servers. This is a small change, but it's the difference between "works on my machine" and "works everywhere."
Step 3 — Write Your README
A good README explains your architecture to anyone who lands on your repo — including future-you. Create README.md in your project root:
# Rohi — MCP-Powered AI Agent
A personal AI assistant built with the Model Context Protocol (MCP), Groq, and Flask.
## What This Is
This project is the result of **AI Agent Bootcamp Part 2** on Rohith Builds.
Instead of manually wiring an AI model to a list of tools, every capability
here is exposed through an **MCP server** — an open standard that lets any
AI client discover and use tools, resources, and prompts automatically.
## Architecture
```
Browser (chat UI)
|
v
Flask app (app.py)
|
v
agent.py ==MCP over stdio== server.py (MCP server)
| |
v v
Groq API SQLite (notes.db)
(decides which tool to use) + Open-Meteo API (weather)
```
1. The browser sends a chat message to Flask.
2. agent.py asks the MCP server what tools, resources, and prompts exist.
3. These are converted into Groq's function-calling format.
4. If Groq decides a tool is needed, agent.py calls it on the MCP server
via session.call_tool().
5. The result goes back to Groq, which writes the final answer.
## Tools
| Tool | What it does |
|---|---|
| exam_countdown | Days remaining until an exam |
| add_note / list_notes / delete_note | A persistent notes database (SQLite) |
| get_weather | Live weather for any city (Open-Meteo) |
## Resources & Prompts
- notes://all and notes://{note_id} — notes as readable MCP resources
- summarize_notes and exam_prep_plan — reusable MCP prompt templates
## Tech Stack
Python, MCP (FastMCP), Groq (llama-3.3-70b-versatile), Flask, SQLite, Open-Meteo, Render
## Running Locally
```
pip install -r requirements.txt
# add your GROQ_API_KEY to a .env file
python app.py
```
## Limitations
notes.db resets if the Render free-tier instance restarts. For permanent
storage, swap SQLite for a hosted database like PostgreSQL.
## Built As Part Of
Rohith Builds — AI Agent Bootcamp Part 2: Build AI Agents with MCP in 7 Days
Feel free to personalize the tone — this version is intentionally plain so it's easy to adapt.
Step 4 — Push Everything to GitHub
Create a new repository on GitHub named mcp-agent-bootcamp, then from your project folder:
git init
git add .
git commit -m "MCP Agent Bootcamp - complete project"
git branch -M main
git remote add origin https://github.com/yourusername/mcp-agent-bootcamp.git
git push -u origin main
Expected Output
⚠️ Double-Check Before Pushing
Make sure .gitignore includes .env, venv/, __pycache__/, and notes.db — your Groq key and personal notes should never end up on GitHub.
Step 5 — Create a Render Web Service
Go to render.com (sign in with GitHub if you set up an account in Part 1 — it carries over). Click New → Web Service, connect your mcp-agent-bootcamp repository, and configure:
- Name:
rohi-mcp-agent - Runtime: Python 3
- Build Command:
pip install -r requirements.txt - Start Command:
gunicorn app:app
Expected Output
Step 6 — Add Your Environment Variable
Scroll to Environment Variables and add:
- Key:
GROQ_API_KEY— Value: your Groq API key
Expected Output
Step 7 — Deploy & Go Live
Click Create Web Service. Render will install your dependencies and start your app with gunicorn. Watch the logs — deployment usually takes a few minutes.
Expected Output
Step 8 — Test Your Live Agent
Open your public URL (something like https://rohi-mcp-agent.onrender.com). Run through everything one more time:
How many days until GATE 2027 on 2027-02-08?Add a note: ship MCP project todayWhat's the weather in Chennai?
Expected Output
💡 Two Things to Know About the Free Tier
- First request may be slow. Render's free tier sleeps after inactivity — the first message after a quiet period can take 10-30 seconds while it wakes up and your agent launches its MCP server.
- notes.db resets on restart. This is expected on the free tier's ephemeral filesystem. Your README already documents this — it's a known limitation, not a bug.
🎉 Course Complete
Seven days ago, your agent could only do what you explicitly coded into an if/else router. Today, it runs on an open protocol that any AI client in the world can speak — Claude Desktop, Cursor, future tools that don't exist yet. You didn't just learn MCP. You built a working multi-tool MCP server, a client that bridges it to an LLM, a web interface, and shipped it to the internet.
This is the exact skill 2026 job postings are asking for. Most people are learning to use AI tools built on MCP. You built one.
Key Takeaways
- Made your code deployment-safe with sys.executable ✅
- Wrote a README explaining your MCP architecture ✅
- Pushed the complete project to GitHub ✅
- Deployed on Render with environment variables configured ✅
- Tested your live MCP-powered agent end to end ✅
🚀 What's Next?
Your server.py is a standard MCP server — which means it works with more than just agent.py. Some ideas:
- Connect it to Claude Desktop. In Claude Desktop's developer settings, add your server to
claude_desktop_config.json:Restart Claude Desktop, and you'll be chatting with Claude using your exam countdown, notes, and weather tools.{ "mcpServers": { "rohi-agent": { "command": "python", "args": ["/full/path/to/mcp-agent-bootcamp/server.py"] } } } - Add more tools: a flashcard quiz generator from your notes, a Pomodoro study timer, a currency converter
- Swap SQLite for PostgreSQL so your notes survive restarts permanently
- Optimize the connection: Day 5 opened a fresh MCP connection per message for simplicity — try keeping one connection alive across requests for faster replies
Pick one. Build it. Push it. That's how every real AI engineer keeps going.
Thank you for building with RohithBuilds. See you in the next course! 🤖
Continue Learning with Rohi
You've used your 3 free Rohi questions. Create a free account to continue learning.