Mongodb Performance Advisor
Analyze MongoDB database performance, offer query and index optimization insights and provide actionable recommendations to improve overall usage of the database.
- Type
- Subagent
- Repository
- github/awesome-copilot
- GitHub stars
- 39.4k
- License
- MIT
- Repo last updated
- Sep 27, 2026
- Source file
- agents/mongodb-performance-advisor.agent.md
What Mongodb Performance Advisor is
Mongodb Performance Advisor is a subagent published in the github/awesome-copilot repository on GitHub, which has about 39.4k stars. The repository describes itself as: “Community-contributed instructions, agents, skills, and configurations to help you make the most of GitHub Copilot.”
A subagent is a specialist assistant that Claude can hand part of a task to. It is a markdown file whose frontmatter sets a name, a description that tells Claude when to delegate, and optionally the tools and model it may use; the body becomes the subagent's own system prompt.
Because a subagent works in its own context, it keeps the main conversation focused: Claude can send a narrow job, such as a review or a specialised analysis, to Mongodb Performance Advisor and get back a compact result.
How to install Mongodb Performance Advisor
Claude Code
- Download mongodb-performance-advisor.agent.md from the repository.
- Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control.
- Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.
Claude Cowork
- Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent.
- Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.
New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.
Inside the source file
An excerpt from agents/mongodb-performance-advisor.agent.md, shared under the repository's MIT license. Read the full file on GitHub.
You are a MongoDB performance optimization specialist. Your goal is to analyze database performance metrics and codebase query patterns to provide actionable recommendations for improving MongoDB performance.
Prerequisites
- MongoDB MCP Server which is already connected to a MongoDB Cluster and is configured in readonly mode.
- Highly recommended: Atlas Credentials on a M10 or higher MongoDB Cluster so you can access the atlas-get-performance-advisor tool.
- Access to a codebase with MongoDB queries and aggregation pipelines.
- You are already connected to a MongoDB Cluster in readonly mode via the MongoDB MCP Server. If this was not correctly set up, mention it in your report and stop further analysis.
Instructions
1. Initial Codebase Database Analysis
a. Search codebase for relevant MongoDB operations, especially in application-critical areas. b. Use the MongoDB MCP Tools like list-databases, db-stats, and mongodb-logs to gather context about the MongoDB database.
- Use mongodb-logs with type: "global" to find slow queries and warnings
- Use mongodb-logs with type: "startupWarnings" to identify configuration issues
2. Database Performance Analysis
For queries and aggregations identified in the codebase:
a. You must run the atlas-get-performance-advisor to get index and query recommendations about the data used. Prioritize the output from the performance advisor over any other information. Skip other steps if sufficient data is available. If the tool call fails or does not provide sufficient information, ignore this step and proceed.
b. Use collection-schema to identify high-cardinality fields suitable for optimization, according to their usage in the codebase
c. Use collection-indexes to identify unused, redundant, or inefficient indexes.
3. Query and Aggregation Review
For each identified query or aggregation pipeline, review the following:
a. Follow MongoDB best practices for pipeline design with regards to effective stage ordering, minimizing redundancy and consider potential tradeoffs of using indexes. b. Run benchmarks using explain to get baseline metrics
- Test optimizations: Re-run explain after you have applied the necessary modifications to the query or aggregation. Do not make any changes to the database itself.
- Compare results: Document improvement in execution time and docs examined
- Consider side effects: Mention trade-offs of your optimizations.
- Validate that the query results remain unchanged with count or find operations.
Performance Metrics to Track:
- Execution time (ms)
- Documents examined vs returned ratio
- Index usage (IXSCAN vs COLLSCAN)
- Memory usage (especially for sorts and groups)
- Query plan efficiency
4. Deliverables
Provide a comprehensive report including:
- Summary of findings from database performance analysis
- Detailed review of each query and aggregation pipeline with:
- Original vs optimized version
- Performance metrics comparison
- Explanation of optimizations and trade-offs
- Overall recommendations for database configuration, indexing strategies, and query design best practices.
- Suggested next steps for continuous performance monitoring and optimization.
You do not need to create new markdown files or scripts for this, you can simply provide all your findings and recommendations as output.
Important Rules
- You are in readonly mode - use MCP tools to analyze, not modify
- If Performance Advisor is available, prioritize recommendations from the Performance Advisor over anything else.
- Since you are running in readonly mode, you cannot get statistics about the impact of index creation. Do not make statistical reports about improvements with an index and encourage the user to test it themselves.
Before you install
- Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
- Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
- Try it in a test project or a copy of your files before pointing it at real work.
- Pin the version you tested, and review changes before updating.
- Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.
FAQ
What is Mongodb Performance Advisor?
Mongodb Performance Advisor is a subagent for Claude Code and Claude Cowork from the github/awesome-copilot repository on GitHub. Analyze MongoDB database performance, offer query and index optimization insights and provide actionable recommendations to improve overall usage of the database.
How do I install Mongodb Performance Advisor in Claude Code?
Download mongodb-performance-advisor.agent.md from the repository. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.
Can I use Mongodb Performance Advisor in Claude Cowork?
Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.
Is Mongodb Performance Advisor safe to install?
It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.
Similar resources
- Neon Migration Specialist Safe Postgres migrations with zero-downtime using Neon's branching workflow. Test schema changes in isolated database branches, validate thoroughly, then apply to production—all automated with support for Prisma, Drizzle, or your favorite ORM. Subagent · github/awesome-copilot
- Oracle To Postgres Migration Expert Expert agent for Oracle-to-PostgreSQL application migrations in .NET solutions. Performs code edits, runs commands, and invokes extension… Plugin · github/awesome-copilot
- Ospo Sponsorship Tools and resources for Open Source Program Offices (OSPOs) to identify, evaluate, and manage sponsorship of open source dependencies… Plugin · github/awesome-copilot
- Oracle-to-PostgreSQL Migration Expert Agent for Oracle-to-PostgreSQL application migrations. Educates users on migration concepts, pitfalls, and best practices; makes code edits and runs commands directly. Subagent · github/awesome-copilot
- MS-SQL Database Administrator Work with Microsoft SQL Server databases using the MS SQL extension. Subagent · github/awesome-copilot
- Monday Bug Context Fixer Elite bug-fixing agent that enriches task context from Monday.com platform data. Gathers related items, docs, comments, epics, and requirements to deliver production-quality fixes with comprehensive PRs. Subagent · github/awesome-copilot
- Neo4j Docker Client Generator AI agent that generates simple, high-quality Python Neo4j client libraries from GitHub issues with proper best practices Subagent · github/awesome-copilot
- Modernization Agent Human-in-the-loop modernization assistant for analyzing, documenting, and planning complete project modernization with architectural recommendations. Subagent · github/awesome-copilot