teamday-ai/agents/mongodb

Claude Code and agent skill by teamday-ai/agents

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Query and manage MongoDB databases via Atlas Data API (curl) or mongosh. Connect to MongoDB Atlas collections without installing heavy CLI tools.

Install

npx vskill@latest install teamday-ai/agents/mongodb

SKILL.md

MongoDB Skill

Query MongoDB databases using the Atlas Data API (curl) or mongosh fallback.

Quick Start

bash
# Find documents via Atlas Data API
curl -s -X POST "$MONGODB_DATA_API_URL/action/find" \
-H "api-key: $MONGODB_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"dataSource": "'"$MONGODB_CLUSTER"'",
"database": "'"$MONGODB_DATABASE"'",
"collection": "users",
"filter": {},
"limit": 10
}'

Prerequisites

Option A: Atlas Data API (Recommended — no CLI install needed)
VariableDescriptionExample
MONGODB_DATA_API_URLAtlas Data API endpointhttps://data.mongodb-api.com/app/data-xxxxx/endpoint/data/v1
MONGODB_API_KEYAtlas Data API keyabc123...
MONGODB_CLUSTERCluster nameCluster0
MONGODB_DATABASEDefault database namemyapp
Option B: Connection String (for mongosh fallback)
VariableDescriptionExample
MONGODB_URLFull connection stringmongodb+srv://user:pass@cluster.mongodb.net/mydb
Enable Atlas Data API
  1. Go to MongoDB Atlas — App Services — Create Application
  2. Enable Data API — Choose your cluster
  3. Create an API key
  4. Copy the endpoint URL
Verify Setup
bash
curl -s -X POST "$MONGODB_DATA_API_URL/action/find" \
-H "api-key: $MONGODB_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"dataSource": "'"$MONGODB_CLUSTER"'",
"database": "'"$MONGODB_DATABASE"'",
"collection": "users",
"limit": 1
}' | jq .

Data API Recipes

Find Documents
bash
curl -s -X POST "$MONGODB_DATA_API_URL/action/find" \
-H "api-key: $MONGODB_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"dataSource": "'"$MONGODB_CLUSTER"'",
"database": "'"$MONGODB_DATABASE"'",
"collection": "users",
"filter": {"status": "active"},
"sort": {"created_at": -1},
"limit": 20
}' | jq '.documents'
Find One Document
bash
curl -s -X POST "$MONGODB_DATA_API_URL/action/findOne" \
-H "api-key: $MONGODB_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"dataSource": "'"$MONGODB_CLUSTER"'",
"database": "'"$MONGODB_DATABASE"'",
"collection": "users",
"filter": {"email": "john@example.com"}
}' | jq '.document'
Insert One Document
bash
curl -s -X POST "$MONGODB_DATA_API_URL/action/insertOne" \
-H "api-key: $MONGODB_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"dataSource": "'"$MONGODB_CLUSTER"'",
"database": "'"$MONGODB_DATABASE"'",
"collection": "users",
"document": {
"name": "John",
"email": "john@example.com",
"created_at": {"$date": "'"$(date -u +%Y-%m-%dT%H:%M:%SZ)"'"}
}
}' | jq .
Update One Document
bash
curl -s -X POST "$MONGODB_DATA_API_URL/action/updateOne" \
-H "api-key: $MONGODB_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"dataSource": "'"$MONGODB_CLUSTER"'",
"database": "'"$MONGODB_DATABASE"'",
"collection": "users",
"filter": {"email": "john@example.com"},
"update": {"$set": {"status": "active"}}
}' | jq .
Delete One Document
bash
curl -s -X POST "$MONGODB_DATA_API_URL/action/deleteOne" \
-H "api-key: $MONGODB_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"dataSource": "'"$MONGODB_CLUSTER"'",
"database": "'"$MONGODB_DATABASE"'",
"collection": "users",
"filter": {"email": "john@example.com"}
}' | jq .
Aggregate Pipeline
bash
curl -s -X POST "$MONGODB_DATA_API_URL/action/aggregate" \
-H "api-key: $MONGODB_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"dataSource": "'"$MONGODB_CLUSTER"'",
"database": "'"$MONGODB_DATABASE"'",
"collection": "orders",
"pipeline": [
{"$match": {"status": "completed"}},
{"$group": {"_id": "$customer_id", "total": {"$sum": "$amount"}, "count": {"$sum": 1}}},
{"$sort": {"total": -1}},
{"$limit": 10}
]
}' | jq '.documents'

mongosh Fallback

If you need interactive shell access or the Data API isn't available:

bash
# Install mongosh on the fly (not pre-installed to save ~100MB)
npx mongosh "$MONGODB_URL" --eval "db.users.find().limit(10).toArray()"
Common mongosh Commands
bash
# List databases
npx mongosh "$MONGODB_URL" --eval "show dbs"
# List collections
npx mongosh "$MONGODB_URL" --eval "show collections"
# Count documents
npx mongosh "$MONGODB_URL" --eval "db.users.countDocuments()"
# Find with filter
npx mongosh "$MONGODB_URL" --eval "db.users.find({status: 'active'}).limit(10).toArray()"

Error Handling

ErrorCauseSolution
401 UnauthorizedInvalid API keyCheck MONGODB_API_KEY
no app foundWrong Data API URLVerify MONGODB_DATA_API_URL in Atlas
no rule existsCollection not allowedEnable collection in Atlas Data API settings
cannot find dataSourceWrong cluster nameCheck MONGODB_CLUSTER matches Atlas
connection refused (mongosh)Wrong URLVerify MONGODB_URL connection string

Tips

  • Use Data API for simple CRUD — no install needed, just curl
  • Use mongosh for complex work — aggregations, admin tasks, interactive exploration
  • Always use `jq` to format JSON responses from the Data API
  • Use `$date` wrapper for date fields in Data API requests
  • Projection — add "projection": {"_id": 0, "name": 1, "email": 1} to limit returned fields
  • Atlas Data API has rate limits — 10,000 requests/minute per project

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/teamday-ai/agents/mongodb/badge)](https://verified-skill.com/skills/teamday-ai/agents/mongodb)

Something wrong with this skill or its page? Tell us.