Join us Sept 17 at .local NYC! Use code WEB50 to save 50% on tickets. Learn more >
MongoDB Jokes
Docs Menu
Docs Home
/ / / /

Access Performance Advisor with the MongoDB MCP Server

You can use the MongoDB MCP server to get Performance Advisor recommendations from your preferred AI tools by using natural language. These recommendations include retrieving slow queries, performing index management, and suggesting schema improvements.

The MongoDB MCP Server is a tool that allows you to interact with your MongoDB clusters in natural language by integrating with AI clients like Claude, Cursor, and GitHub Copilot.

To learn more about the MongoDB MCP Server, see What is the MongoDB MCP Server?.

To quickly configure the MongoDB MCP Server for your AI client, complete the steps in Get Started with the MongoDB MCP Server.

To learn more about the performance advisor MCP tool, see Performance Advisor Tool.

For detailed examples with sample outputs, see Performance Optimization.

When performing slow query analysis, the MCP Server retrieves a sample of slow queries, capped at 50 queries. The sample includes up to 50 most recent slow queries that match any specified conditions in your prompt to ensure optimal performance and response times.

This limitation does not apply to the Performance Advisor UI in Atlas.

After you've configured the MongoDB MCP Server and connected it to your Atlas cluster, you can use natural language to retrieve Performance Advisor recommendations. The following table illustrates example prompts that you can use:

Use Case
Example Prompts
Performance Advisor Operation

Analyze Slow Queries

Show me my slow queries

What is slowing down my cluster?

Show me queries that are longer than 5 seconds

Show me slow writes in the website.users namespace

Index Suggestions

Are there any indexes I should create to improve performance?

What indexes do you recommend I drop?

Schema Advice

Show schema recommendations for my cluster

Help me optimize my database schema

Back

Enable or Disable

On this page