Awesome-omni-skill mongodb_usage
This skill should be used when user asks to "query MongoDB", "show database collections", "get collection schema", "list MongoDB databases", "search records in MongoDB", or "check database indexes".
install
source · Clone the upstream repo
git clone https://github.com/diegosouzapw/awesome-omni-skill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/diegosouzapw/awesome-omni-skill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/backend/mongodb_usage-majiayu000" ~/.claude/skills/diegosouzapw-awesome-omni-skill-mongodb-usage && rm -rf "$T"
manifest:
skills/backend/mongodb_usage-majiayu000/SKILL.mdsource content
MongoDB MCP Usage
Use the MongoDB MCP server to integrate database queries into workflows.
Read-Only Access
MongoDB MCP is configured in read-only mode. Only queries and data retrieval are supported. No write, update, or delete operations.
Database Queries
Use
mcp__mongodb__* tools for:
- Listing databases
- Viewing collection schemas
- Querying collection data
- Analyzing indexes
Integration Pattern
- List available databases with
mcp__mongodb__list_databases - Explore collections with
mcp__mongodb__list_collections - Get schema information with
mcp__mongodb__get_collection_schema - Query data as needed for analysis
- Format results for user consumption
Environment Variables
MongoDB MCP requires:
- Connection string (mongodb://...)MONGODB_URI
Configure in shell before using the plugin.
Cost Considerations
- Minimize database calls when possible
- Use schema queries before running analysis queries
- Cache results locally if multiple calls needed MongoDB Usage v1.1 - Enhanced
🔄 Workflow
Aşama 1: Discovery & Inspection
- Connection:
ile erişimi doğrula.mcp__mongodb__list_databases - Schema Analysis:
ile veri tiplerini ve yapıyı anla.mcp__mongodb__get_collection_schema - Index Check: Mevcut indeksleri listele (
veya benzeri sorgu ile).list_indexes
Aşama 2: Query Construction
- Filter: Sorguları indeksli alanlar (Prefix) üzerinden filtrele.
- Projection: Sadece gerekli alanları (
) seç (Network ve RAM tasarrufu).{ field: 1 } - Aggregation: Karmaşık analizler için
,$match
,$group
pipeline'ını kur.$project
Aşama 3: Performance Check (Explain Plan)
- Explain: Sorgunun
(Tam tarama) mıCOLLSCAN
(Index tarama) mı yaptığını kontrol et.IXSCAN - Optimization: Yavaş sorgular için bileşik indeks (Compound Index) öner.
Kontrol Noktaları
| Aşama | Doğrulama |
|---|---|
| 1 | Sorgu 100ms'in altında cevap veriyor mu? |
| 2 | "In-memory sort" limiti aşılıyor mu (disk kullanımı var mı)? |
| 3 | Regex sorguları indeksin başlangıcını (anchor ) kullanıyor mu? |