loading…
Search for a command to run...
loading…
Enables ChatGPT agents to store and retrieve reports in MongoDB Atlas, acting as a bridge between ChatGPT scheduled agents and a persistent database.
Enables ChatGPT agents to store and retrieve reports in MongoDB Atlas, acting as a bridge between ChatGPT scheduled agents and a persistent database.
ChatGPT ke scheduled agents kaam karte hain aur reports apni chat mein store karte hain. Yeh server ek bridge hai jo:
⏰ ChatGPT Scheduled Agent
↓
🔧 Yeh MCP Server (/mcp endpoint)
↓
💾 MongoDB Atlas Database
↓
📊 Kabhi bhi data dekho (API ya Atlas Dashboard)
mongodb+srv://USERNAME:[email protected]/ai_agents
# Project folder mein jao
cd ai-agent-mcp
# Git initialize karo
git init
git add .
git commit -m "Initial commit"
# GitHub pe new repository banao: github.com/new
# Phir yeh commands chalao:
git remote add origin https://github.com/TERA_USERNAME/ai-agent-mcp.git
git push -u origin main
ai-agent-mcp repo select karoMONGO_URI = mongodb+srv://USERNAME:[email protected]/ai_agents
PORT = 3000
https://ai-agent-mcp-production.up.railway.app
{"status": "✅ AI Agent MCP Server is running!"} dikhegaYeh URL save kar lo — ChatGPT mein daalna hai!
https://ai-agent-mcp-production.up.railway.app/mcp
save_dataget_dataget_latestlog_activityAgent ke Instructions mein yeh add karo:
IMPORTANT: Har task complete karne ke baad HAMESHA yeh karo:
1. Apna kaam karo (SEO check / analysis / report)
2. save_data tool call karo:
- agentName: "[TERA AGENT KA NAAM]"
- taskType: "[kya kiya, e.g. seo_scan]"
- status: "success" ya "failed"
- payload: {
summary: "kya mila",
details: [...findings...],
recommendations: [...suggestions...]
}
- metadata: {
url: "[website jo check ki]",
model: "gpt-4",
duration: "[kitna time laga]"
}
3. Kabhi bhi sirf chat mein result mat rakho
4. Hamesha database mein save karo
ai_agents database → agentdatas collection# Sab agents dekho
GET https://tera-server.up.railway.app/api/agents
# Specific agent ki reports
GET https://tera-server.up.railway.app/api/reports/SEO%20Agent
# Latest report
GET https://tera-server.up.railway.app/api/latest/SEO%20Agent
# Filter karo
GET https://tera-server.up.railway.app/api/reports/SEO%20Agent?taskType=seo_scan&limit=5
{
"agentName": "SEO Agent",
"taskType": "seo_scan",
"status": "success",
"payload": {
"website": "example.com",
"score": 85,
"issues": ["Missing meta description", "Slow page speed"],
"recommendations": ["Add meta tags", "Optimize images"]
},
"metadata": {
"url": "https://example.com",
"checkedAt": "2024-01-15T09:00:00Z"
}
}
Query params: limit, page, taskType, status
# Dependencies install karo
npm install
# .env file banao
cp .env.example .env
# .env mein MONGO_URI daalo
# Server start karo
npm run dev
# Test karo
curl -X POST http://localhost:3000/api/save \
-H "Content-Type: application/json" \
-d '{"agentName":"Test Agent","taskType":"test","payload":{"message":"Hello!"}}'
ai-agent-mcp/
├── server.js ← Main entry point
├── package.json ← Dependencies
├── railway.toml ← Railway deploy config
├── .env.example ← Environment variables template
├── .gitignore
├── models/
│ └── AgentData.js ← MongoDB schema
├── routes/
│ └── api.js ← REST API endpoints
└── mcp/
└── tools.js ← MCP tools (save_data, get_data, etc.)
| Problem | Solution |
|---|---|
| MongoDB connect nahi | IP whitelist check karo (0.0.0.0/0 hona chahiye) |
| Railway deploy fail | Logs check karo → Variables mein MONGO_URI sahi daala? |
| ChatGPT MCP nahi dikha | Developer Mode ON hai? Business/Plus plan chahiye |
| Tools appear nahi | MCP URL mein /mcp path daala? |
Выполни в терминале:
claude mcp add ai-agent-mcp-server -- npx Безопасность
Низкий рискАвтоматическая эвристика по публичным данным — не гарантия безопасности.