Introduction
Azure Cosmos DB for MongoDB provides robust support through its Request Units (RU) model and vCore-based architecture, enabling flexible and scalable options for various workloads. We are now on a mission to deliver the ultimate developer experience. To achieve this, we have integrated Azure Cosmos DB for MongoDB support into the Azure Databases VS Code Extension.
The free Azure Databases VS Code Extension, available on the VS Code Marketplace, provides a reliable and intuitive MongoDB GUI for developers, database administrators, and teams working with MongoDB – on Azure and beyond.
MongoDB Support Comes to Azure Databases VS Code Extension
We have worked hard to ensure that the Azure Databases VS Code Extension meets your needs. Our goal is to deliver a first-class MongoDB experience directly within VS Code. We focused on:
- Integration with Azure Cosmos DB for MongoDB: You can connect to and manage Azure Cosmos DB for MongoDB (RU and vCore) directly from VS Code. Perform operations like browsing, querying, and modifying data with ease.
- Universal MongoDB Connectivity: You can connect to any MongoDB instance, whether it’s hosted on Azure, another cloud provider, or an on-premises server, ensuring full compatibility.
- Flexible Collection Viewer: You can navigate and analyze collections using Table, Tree, and JSON views. Built-in pagination controls allow you to manage large datasets effortlessly.
- Document Management: You can view, edit, and delete individual documents directly within the extension, making database modifications quick and efficient without requiring external tools.
âś… Azure Databases VS Code Extension unifies MongoDB workflows by offering a user-friendly and feature-rich MongoDB GUI
Use It with Any MongoDB Cluster
The Azure Databases VS Code Extension works with any MongoDB deployment, whether your database is on Azure, in another cloud environment, or even on a local machine.
If you are an Azure user, browse your subscription in VS Code to select your Azure Cosmos DB for NoSQL instance – available with either the Request Units (RU) model or the vCore-based architecture – for a seamless connection.
For any other MongoDB environment, simply enter your complete connection string in the MongoDB Cluster Accounts
 workspace area.
Truly Open Source
We believe in open development and collaboration. Our entire development process is public on GitHub – including discussions, contributions, and improvements.
Follow Our Public Roadmap:
All Pull Requests (PRs) are reviewed publicly, so you can follow along as we develop, debug, and enhance the extension.
🎓 How To Get Started (Tutorial)
In this tutorial, we’ll guide you through installing the Azure Databases VS Code Extension, setting it up, and connecting to a MongoDB database. Once set up, we’ll import sample data and explore the extension’s data exploration features.
Getting started requires installing VS Code, adding the Azure Databases extension, and setting up a MongoDB-compatible database. Follow these steps to prepare your environment.
1. Install VS Code
- Download and install Visual Studio Code.
- Ensure you have the latest version for the best compatibility.
2. Install the Azure Databases VS Code Extension
- Open VS Code.
- Navigate to the Extensions view by selecting View > Extensions or using the shortcut
Ctrl + Shift + X
on Windows andCommand + Shift + X
on macOS. - Search for Azure Databases in the Marketplace and select it from the list.
- Click Install to add the extension.
3. Prepare Your MongoDB Database
Using Azure Services | Using Third-Party Services |
|
|
âś… You have now installed VS Code, set up the Azure Databases VS Code Extension, and prepared a MongoDB-compatible database for connection.
4. Connect to Your Database
With the setup complete, the next step is connecting to your MongoDB database using either Azure Cosmos DB or a third-party MongoDB deployment.
Using Azure Services | Using Third-Party Services |
|
|
âś… Your MongoDB database is now connected, and you can begin managing and exploring your data.
5. Create a New Database and a Collection
Once connected, create a new database and collection to start managing data.
- Right-click your MongoDB cluster and select Create Database… from the context menu.
- Enter
MyDatabase
when prompted for the database name. - Expand the newly created MyDatabase node.
- Select Create Collection.
- Enter
MyCollection
when prompted for the collection name.
âś… You have successfully created a new database and collection.
6. Import Sample Data
Populate your collection with sample data to explore the extension’s features. Here is a download link for a sample file containing a description of 500 restaurants and their reviews. Download the file and have it available for the next steps.
- Expand the newly created MyCollection node.
- Click Documents to open the Collection View.
- In the Collection View, click the Import button in the upper right corner.
- Select Import from JSON….
- Navigate to the downloaded file
restaurants.json
. - A confirmation message will indicate that 500 documents were imported.
- Click Refresh to see them in the Collection View.
âś… Your collection now contains sample data, ready for exploration.
7. Explore the Data Exploration Features
Use the JSON, Tree, and Table Views to analyze your data in different formats.
- JSON View
- The JSON View displays documents in raw format, making it useful for quick inspection of specific properties.
- It includes syntax highlighting to enhance readability and help distinguish key elements quickly.
- Get familiar with the structure of imported documents and locate the
additionalInfo
 property containing an embedded object.
- Tree View
- The Tree View organizes documents hierarchically. Expand and collapse properties to focus on relevant details and better understand individual document structures.
- Expand the
additionalInfo
 property to explore embedded objects. Observe three columns: property name, value, and data type.
- Table View
- The Table View presents multiple documents at once, grouping values from different documents into columns. This helps detect patterns, spot inconsistencies, and identify missing values.
- Column names are inferred automatically from document properties and used to group values. Each cell displays the actual data type of its value for clarity.
- Double-click
additionalInfo
 in the first document to inspect all embedded objects.
Navigate through the paging controls to explore beyond the first 10 documents.
âś… You have explored different ways to view and analyze your data.
8. Run Queries and Manage Your Database
Run queries to filter and retrieve data efficiently.
- Navigate to the query area.
- Run a query to find all vegetarian restaurants:
{ "cuisine": "Vegetarian" }
- Use auto-completion for complex queries:
- Explore more complex queries:
-
- Start typing in
{ "rating":
to see auto-complete suggestions. - To find restaurants rated above 4 stars, choose the suggestion with the
$gt
operator:{ "rating": { "$gt": 4 } }
- Start typing in
âś… You have successfully run queries to explore your data.
9. There Is More
The tutorial above introduced the core functionalities of the Azure Databases VS Code Extension, covering setup, data exploration, and queries. However, there’s much more to discover. The extension includes additional tools that enhance productivity and improve database management.
Collection View Enhancements
- Adjust page size to control how many documents are displayed at once.
- Navigate embedded objects more effectively in Table View.
- Use the Export feature to save data for external use.
- Add or edit documents directly within the extension.
Advanced Tree View Features
- Use the context menu to add or remove databases and collections.
- Start MongoDB Shell to run advanced queries.
- Open a local scrapbook to experiment with commands and keep track of useful queries.
These features provide more control and flexibility, making database management even more efficient. Explore these tools to refine your workflow and maximize your use of the extension.
✅ Congratulations! You’ve completed your first steps with the Azure Databases VS Code Extension and are now ready to manage MongoDB databases efficiently. Explore more features and best practices to enhance your experience!
đź’¬ Join the Discussion!
Join our GitHub discussion boards to share feedback, ask questions, and help shape the future of this extension with your ideas:
- Announcements – Updates on releases, new features, and upcoming plans.
- Ideas – Suggest new features or improvements.
- General – Ask questions and discuss anything about the extension.
Your feedback drives development! Vote on features, report issues, or suggest improvements in our Feedback Wanted section.
More Than Just MongoDB!
The Azure Databases VS Code Extension isn’t just about MongoDB! It supports Azure Cosmos DB for NoSQLÂ as well, giving developers a single tool to manage different database models with ease.
You can connect to Azure Cosmos DB for NoSQL, perform CRUD operations, and switch seamlessly between MongoDB and NoSQL environments. This extension simplifies workflows and provides a unified experience for managing cloud databases.
Conclusion
The Azure Databases VS Code Extension is more than just a database management tool – it provides a full-featured MongoDB GUI alongside support for Azure Cosmos DB for NoSQL. Whether you’re working with MongoDB or NoSQL databases, this extension brings database management together in one place, making it easier to connect, explore, and manage your data.
With built-in tools for querying, document management, and data exploration, you can work with your databases efficiently without switching between multiple applications. Browse collections, import data, and run queries directly from VS Code.
Try it today and see how this open-source MongoDB GUI helps simplify database development and improve productivity.
Leave a review
Tell us about your Azure Cosmos DB experience! Leave a review on PeerSpot and we’ll gift you $50. Get started here.
About Azure Cosmos DB
Azure Cosmos DB is a fully managed and serverless NoSQL and vector database for modern app development, including AI applications. With its SLA-backed speed and availability as well as instant dynamic scalability, it is ideal for real-time NoSQL and MongoDB applications that require high performance and distributed computing over massive volumes of NoSQL and vector data.
Try Azure Cosmos DB for free here. To stay in the loop on Azure Cosmos DB updates, follow us on X, YouTube, and LinkedIn.
Hi tomasz,
this is really great. Meanhwile I’m using Studio 3T as MongoDB tool.
However, I cannot see the Data Exploration Features when using MongoDB (RU) model
Hey Sven,
Thanks for reaching out and for giving the extension a try! I really appreciate you catching that - I just realized I’ve been using a pre-release version, and the Data Exploration Features for MongoDB (RU) will actually be available in the next upcoming release (0.24.3). I guess this gives the phrase "it works on my machine" a whole new meaning. 🤦‍♂️
The good news is that this feature is almost ready! I'll post an update here once 0.24.3 goes live, but in the meantime, you can check out the progress here: GitHub Issue #2514 (this link is "active" only when...