Connect via VS Code
To connect to a cluster with VS Code, copy your connection information from Atlas and use it to connect using VS Code. You can connect to a standalone, replica set, or sharded cluster host.
Copy Your Deployment's Connection Information
To find and copy your deployment's connection information:
In Atlas, go to the Clusters page for your project.
If it's not already displayed, select the organization that contains your desired project from the Organizations menu in the navigation bar.
If it's not already displayed, select your desired project from the Projects menu in the navigation bar.
If it's not already displayed, click Clusters in the sidebar.
The Clusters page displays.
Create a Connection to a Deployment
For instructions on creating a connection to your cluster using VS Code, see Connect to Your MongoDB Deployment in the MongoDB for VS Code documentation. If you copied your Atlas connection string in the previous procedure, follow the steps to use your Atlas connection string.
Tip
The Connect to Your MongoDB Deployment page also provides information on disconnecting from a deployment and information on activating, renaming and removing a connection.