Docs Menu
Docs Home
/
MongoDB Atlas
/ /

Connect via VS Code

On this page

  • Copy Your Deployment's Connection Information
  • Create a Connection to a Deployment

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.

To find and copy your deployment's connection information:

1
  1. If it is not already displayed, select the organization that contains your desired project from the Organizations menu in the navigation bar.

  2. If it is not already displayed, select your desired project from the Projects menu in the navigation bar.

  3. If the Clusters page is not already displayed, click Database in the sidebar.

2
  1. Locate the cluster to which to connect from the list of clusters.

  2. Click the Connect button to the right of your cluster's name.

A Connect dialog box appears with a list of available connection methods.

3

Follow the directions under Connecting with MongoDB for VS Code to create a connection to your cluster.

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.

Back

Command Line Tools

Next

Test Resilience