Docs 菜单
Docs 主页
/ /

使用MongoDB MCP 服务器访问Performance Advisor

您可以使用MongoDB MCP服务器通过自然语言从您首选的AI工具中获取 Performance Advisor建议。这些建议包括检索慢速查询、执行索引管理以及提出模式改进建议。

MongoDB MCP 服务器是一个工具,允许您通过与 Claude、Cursor 和 GitHub Copilot 等AI客户端集成,以自然语言与MongoDB集群交互。

要学习;了解有关MongoDB MCP 服务器的更多信息,请参阅 什么是MongoDB MCP 服务器?

要为AI客户端快速配置MongoDB MCP Server,请完成MongoDB MCP Server 入门中的步骤。

要学习;了解有关性能优化顾问 MCP 工具的更多信息,请参阅Performance Advisor工具。

有关示例输出的详细示例,请参阅性能优化。

执行慢查询分析时,MCP 服务器会检索慢查询示例,上限为 50 个查询。该示例最多包含 50 个符合提示中任何指定条件的最新慢速查询,以确保最佳性能和响应时间。

此限制不适应用Atlas中的Performance Advisor用户界面。

配置MongoDB MCP Server 并将其连接到Atlas 集群后,您可以使用自然语言来检索Performance Advisor建议。下表说明了可以使用的示例提示:

用例(Use Case)
示例提示
Performance Advisor操作

分析慢速查询

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

索引建议

Are there any indexes I should create to improve performance?

What indexes do you recommend I drop?

模式建议

Show schema recommendations for my cluster

Help me optimize my database schema

后退

启用或禁用

在此页面上