
mongodb/agent-skills
8 skills20.9k installs1.3k starsGitHub
Install
npx skills add https://github.com/mongodb/agent-skillsSkills in this repo
1Mongodb Schema Designmongodb-schema-design is a MongoDB-maintained skill that guides data modeling patterns and anti-patterns when schema mistakes drive performance and cost problems queries cannot fix. It organizes guidance into anti-patterns such as unnecessary collections, excessive lookups, and unnecessary indexes, plus fundamentals on embed versus reference, the document model, schema validation, and the 16MB document limit. Eleven design patterns cover approximation, archive, attribute, bucket, computed, document versioning, extended reference, outlier, polymorphic, schema versioning, and time series collections. The core principle states data accessed together should be stored together, with a decision framework for one-to-one, one-to-few, one-to-many, and many-to-many relationships. Reference files include incorrect versus correct examples, when-not-to-use exceptions, and verification diagnostics. Optional MongoDB MCP integration can infer schema, measure document sizes, and check index usage in read-only mode with explicit approval before writes. Developers reach for mongodb-schema-design when designing new schemas, migrating from SQL, reviewing models, or troubleshooting slow queries and gro.3.7kinstalls2Mongodb Query Optimizermongodb-query-optimizer is an official MongoDB agent skill for query and index performance help only when users ask why queries are slow or how to optimize them. For cluster-wide issues it calls atlas-get-performance-advisor to pull slowQueryLogs, suggestedIndexes, dropIndexSuggestions, and schemaSuggestions, prioritizing highest-impact frequent queries. For a specific query it uses collection-indexes to read classicIndexes, explain with queryPlanner and executionStats to detect COLLSCAN or in-memory sorts, find for a sample document, and optionally Atlas slow query logs for the namespace. Recommendations follow core indexing principles and ESR ordering, prefer fully covering compound indexes, keep answers concise with reasoning, and avoid claiming guaranteed performance gains. The skill loads references/core-indexing-principles.md and references/antipattern-examples.md always, plus aggregation or update references when those shapes appear. It suggests removing indexes only when Atlas Performance Advisor recommends drops, warns when collections already have many indexes, and does not create indexes via MCP without explicit user approval. Without MCP it still offers shape-based ind.3.6kinstalls3Mongodb ConnectionMongoDB Connection Optimizer helps agents configure MongoDB drivers across Node.js, Python, Java, Go, C#, Ruby, and PHP without applying arbitrary pool sizes. It insists on context before configuration: deployment type, concurrency, workload shape, cluster topology, and driver version, asking one targeted question at a time. Guidance explains pool lifecycle, monitoring connections per replica member, and formulas for total server connections across app instances. Scenario tables cover serverless Lambda style pools with clients initialized outside handlers, long-running OLTP servers with higher minPoolSize, OLAP workloads with longer socket timeouts, and bursty traffic with waitQueueTimeoutMS. Troubleshooting distinguishes infrastructure issues like DNS or VPC blocks from client issues such as pool exhaustion, connection churn, and inappropriate timeouts, with monitoring references for iteration. Code snippets must include inline rationale per parameter. Use it when instantiating MongoClient connect calls, debugging ECONNREFUSED or WaitQueueTimeoutError, or sizing pools for high-traffic APIs and serverless functions.3.2kinstalls4Mongodb Natural Language QueryingThe mongodb-natural-language-querying skill generates read-only MongoDB find filters or aggregation pipelines from natural language with schema validation via MongoDB MCP tools. It requires mcp__mongodb__ list-databases, list-collections, collection-indexes, collection-schema sampleSize 50, and find limit 4 sample documents before writing queries. Field names must match schema because MongoDB returns empty results on unknown fields without errors. Prefer find for simple filters, sorts, limits, and projections; use aggregation when grouping, lookups, unwinds, or multi-stage transforms are needed. Responses format as JSON with filter, projection, sort, and limit strings or a pipeline array using MongoDB shell style unquoted keys when no driver is specified. Best practices forbid $where, caution $text without indexes, minimize $expr, avoid redundant $exists on equality filters, project only needed fields with _id 0 when omitted, and place $match early in pipelines. Excludes Atlas Search, vector search, query optimization, and write pipelines. Geo queries must use longitude-first GeoJSON coordinates.2.9kinstalls5Mongodb Search And AiMongoDB Search and AI guides implementation of Atlas Search lexical queries, Vector Search semantic similarity, and Hybrid Search combinations using the MongoDB MCP server. Discovery inspects databases, collections, schemas, existing indexes, and cluster version before recommending an approach. Atlas Search fits keyword fuzzy autocomplete and faceted filtering, Vector Search fits embeddings and RAG similarity, and Hybrid Search merges pipelines with rankFusion or scoreFusion when version requirements are met. The skill never recommends dollar-regex or dollar-text for search workloads and explains why Atlas Search is preferable. Index creation requires plain-language explanation, JSON preview, explicit user approval, and read-only mode provides Atlas UI JSON when create tools are unavailable. Hybrid rankFusion needs MongoDB 8.0 plus and scoreFusion needs 8.2 plus. Reference files cover lexical indexing and querying, vector search, and hybrid search patterns.2.8kinstalls6Mongodb Mcp SetupThis skill guides users through configuring the MongoDB MCP server for use with an agentic client The MongoDB MCP server requires authentication Users have three options 1 Connection String Option A Direct connection to a specific cluster Quick setup for single cluster Requires MDB_MCP_CONNECTION_STRING environment variable 2 Service Account Credentials Option B MongoDB Atlas Admin API access Recommended for Atlas users simplifies authentication and data access Access to Atlas Admin API and dynamic cluster connection via atlas connect cluster No manual DB user credential management Requires MDB_MCP_API_CLIENT_ID and MDB_MCP_API_CLIENT_SECRET environment variables 3 Atlas Local Option C Local development with Docker Best for local testing zero configuration required Runs Atlas locally in Docker requires Docker installed No credentials or cloud cluster access The mongodb mcp setup agent skill provides documented workflows prerequisites triggers and safety guidance from its SKILL md source Agents load it when user requests match the description and follow step by step instructions without inventing capabilities It integrates with standard agent tooling for the tasks inputs outputs and2.7kinstalls7Mongodb Atlas Stream Processingmongodb-atlas-stream-processing is an agent skill from mongodb/agent-skills that manages mongodb atlas stream processing (asp) workflows. handles workspace provisioning, data source/sink connections, processor lifecycle operations, debugging diagnostics, and tier sizing. supports . # MongoDB Atlas Streams Build, operate, and debug Atlas Stream Processing (ASP) pipelines using four MCP tools from the MongoDB MCP Server. ## Prerequisites This skill requires the **MongoDB MCP Server** connected with: - Atlas API credentials (`apiClientId` and `apiClientSecret`) The 4 tools: `atlas-streams-discover`, `atlas-streams-build`, `a Developers invoke mongodb-atlas-stream-processing during operate/infra work for cloud & infrastructure tasks. The skill documents triggers, prerequisites, and step-by-step workflows grounded in SKILL.md. Compatible with Claude Code, Cursor, and Codex agent runtimes that load marketplace skills. Review the Security Audits panel on this listing before installing in production environments.2kinstalls8Review Skillreview-skill skill documents >-. name: review-skill description: >- Covers installation, configuration, and when-to-use guidance from the upstream SKILL.md workflow.7installs