Docs Menu
Docs Home
/
VS Code Extension

MongoDB MCP Server in MongoDB VS Code Extension

MongoDB for VS Code Extension includes the MongoDB MCP server, a model context protocol (MCP) server that lets you interact with your MongoDB data from AI assistants and tools.

To learn more about the MongoDB MCP server, see the MongoDB MCP Server documentation.

The MongoDB MCP Server lets you use natural language to interact with your MongoDB data from AI clients like Github Copilot, and any other MCP-compatible AI clients in VS Code.

The MongoDB MCP server in the VS Code Extension uses the same connection as your active MongoDB connection in VS Code. When you switch connections in VS Code, the MCP server automatically updates to proxy the new connection. The server runs locally on your machine and only provides access to the MongoDB deployment that you're currently connected to in VS Code.

Note

By default, the MCP server starts automatically when you use the VS Code Extension to connect to your MongoDB deployment. You can disable this behavior the first time this happens, or at any time by using the mdb.mcp.server setting.

To manage the MongoDB MCP server from the VS Code Extension, see the MCP Server settings.

The MongoDB VS Code Extension also includes the following commands:

Back

Load Local Files

On this page