MongoDB Connection Manager
The Connection Manager is your central hub for organizing and managing all MongoDB database connections. Create, edit, test, and organize connections into projects and environments for streamlined database access across your team.
Get connected to your MongoDB database in three simple steps:
VisualLeaf offers flexible connection management through three organizational levels:
Use the sidebar to filter your connection display:
Every project and environment can carry lightweight metadata that VisuaLeaf uses for search, filtering, and workspace grouping:
prod, eu-west-1, pci) that participate in the sidebar searchPresets are reusable connection templates that let you standardize how your team connects to common deployments. Use the "Save as preset" action on a fully configured connection to capture Server, SSL/TLS, SSH, and Options settings as a template; then apply the preset when creating a new connection to pre-fill everything except the per-user credentials.
The connection form provides comprehensive configuration across five tabs: Server, Authentication, SSL, SSH, and Options.
Paste a MongoDB connection string directly into the form to automatically populate all fields:
mongodb://username:password@host:port/databasemongodb+srv://username:password@cluster.mongodb.net/databaseAt the top of the connection form, you'll find the Database Type selector. This determines which database platform you're connecting to.
| Database Type | Status | Description |
|---|---|---|
MongoDB |
Available | Full support for MongoDB databases including Atlas, standalone, replica sets, and sharded clusters |
Amazon DocumentDB 8.0+ |
Coming Soon | Native connectivity to Amazon DocumentDB, including compatibility with MongoDB APIs, query execution, schema visualization, and data exploration - making it easy to manage DocumentDB clusters with the same VisuaLeaf experience you use for MongoDB. |
Azure Cosmos DB 4.2+ |
Coming Soon | Native support for Azure Cosmos DB (MongoDB API), enabling seamless connections, query execution, schema visualization, and data exploration within VisuaLeaf. |
Redis 7.0+ |
Coming Soon | Native connectivity to Redis databases, enabling key exploration, data type visualization, TTL management, and real-time monitoring within VisuaLeaf. |
Note: Currently only MongoDB is fully supported. Additional database platforms will be added in future releases. The interface will adapt based on the selected database type to show relevant configuration options.
Configure the database server connection details and deployment topology.
| Type | Description | When to Use |
|---|---|---|
Standalone |
Single MongoDB server instance | Development, testing, or small deployments without high availability requirements |
Replica Set |
Group of MongoDB servers maintaining the same data for redundancy | Production deployments requiring high availability, automatic failover, and read scaling |
Sharded Cluster |
Horizontally partitioned database across multiple shards | Large-scale deployments with massive datasets that exceed single-server capacity |
DNS Seedlist |
Dynamic server discovery using DNS SRV records (mongodb+srv://) | MongoDB Atlas or cloud deployments with dynamic IP addresses |
| Field | Description | Default |
|---|---|---|
Host |
Server hostname or IP address | localhost |
Port |
MongoDB server port number | 27017 |
Database Name |
Default database to connect to (optional) | None |
Read Preference |
How to route read operations (Primary, Secondary, Nearest) | Nearest |
| Field | Description | Required |
|---|---|---|
Replica Set Name |
Name of the replica set (must match server configuration) | Yes |
Replica Hosts |
List of host:port pairs for replica set members | Yes (at least one) |
Read From Hidden Nodes |
Allow reads from hidden replica set members | No |
Resolve Cluster Members |
Automatically discover all replica set members | No |
| Field | Description | Required |
|---|---|---|
Mongos Hosts |
List of host:port pairs for mongos routers | Yes (at least one) |
Read Preference |
Routing preference for read operations across shards | No |
| Field | Description | Default |
|---|---|---|
Connection URI |
DNS hostname for SRV record lookup (e.g., cluster.mongodb.net) | None |
SRV Service Name |
Custom SRV service name (optional) | mongodb |
Configure how VisualLeaf authenticates with your MongoDB server. Multiple authentication mechanisms are supported.
| Mechanism | Description | Use Case |
|---|---|---|
None |
No authentication required | Local development servers without security |
SCRAM-SHA-256 |
Salted Challenge Response Authentication (recommended) | Default for MongoDB 4.0+ deployments |
SCRAM-SHA-1 |
Legacy SCRAM authentication | MongoDB 3.x or servers configured for SHA-1 |
X.509 |
Certificate-based authentication | High-security environments requiring mutual TLS |
Kerberos (GSSAPI) |
Kerberos ticket-based authentication using the GSSAPI mechanism | Enterprise deployments with Active Directory or MIT Kerberos KDCs |
LDAP (PLAIN) |
LDAP directory authentication using the PLAIN SASL mechanism | MongoDB Enterprise deployments federated with an LDAP or Active Directory server |
AWS IAM (MONGODB-AWS) |
AWS Identity and Access Management with support for static keys, STS session tokens, and SSO-cached credentials | MongoDB Atlas on AWS — including mongodb+srv:// seedlist connections — when authenticating with IAM roles or AWS SSO profiles |
OIDC (MONGODB-OIDC) |
OpenID Connect token-based authentication | Modern SSO integrations with Okta, Auth0, Azure AD, or any OIDC identity provider |
| Field | Description | Required |
|---|---|---|
Username |
MongoDB username | Yes |
Password |
MongoDB password (click eye icon to show/hide) | Yes |
Auth Database |
Database containing user credentials. Defaults to 'admin' | No |
X.509 authentication uses client certificates instead of a username and password. No additional fields are required on the Authentication tab beyond enabling the mechanism — the credential is the certificate itself, configured on the SSL/TLS tab.
$externalEquivalent connection string:
mongodb://mongo.example.com:27017/?authMechanism=MONGODB-X509&authSource=$external&tls=true&tlsCertificateKeyFile=/path/to/client.pem
AWS IAM authentication uses the MONGODB-AWS SASL mechanism and always resolves against the $external authentication database. VisuaLeaf accepts three credential shapes:
sts:AssumeRole, AssumeRoleWithSAML, or AssumeRoleWithWebIdentitymongodb+srv:// Atlas connections.| Field | Description | Required |
|---|---|---|
Access Key ID |
AWS IAM access key (e.g., AKIAIOSFODNN7EXAMPLE). Leave blank to use SSO cache. | Only when using static keys |
Secret Access Key |
AWS IAM secret key (click eye icon to show/hide). Leave blank to use SSO cache. | Only when using static keys |
Session Token |
Temporary session token for STS AssumeRole credentials | Only for temporary credentials |
Equivalent connection strings for a standalone MongoDB Enterprise cluster:
mongodb://AKIAIOSFODNN7EXAMPLE:wJalrXUtnFEMI%2FK7MDENG%2FbPxRfiCYEXAMPLEKEY@mongo.example.com:27017/?authMechanism=MONGODB-AWS&authSource=$external
With a temporary STS session token (passed via the AWS_SESSION_TOKEN auth mechanism property):
mongodb://ASIA...:...@mongo.example.com:27017/?authMechanism=MONGODB-AWS&authSource=$external&authMechanismProperties=AWS_SESSION_TOKEN:IQoJb3JpZ2luX2VjE...
MongoDB Atlas SRV seedlist connection (credentials can be supplied inline, or omitted so VisuaLeaf resolves them from the AWS SSO cache):
mongodb+srv://cluster0.abcde.mongodb.net/?authMechanism=MONGODB-AWS&authSource=$external&retryWrites=true&w=majority
LDAP authentication uses the PLAIN SASL mechanism to proxy credentials to your directory server through MongoDB Enterprise. The auth source is always $external.
| Field | Description | Required |
|---|---|---|
LDAP Username |
LDAP directory username (e.g., user@domain.com or CN=user,DC=domain,DC=com) |
Yes |
Password |
LDAP password (transmitted over the TLS-secured channel) | Yes |
Note: Because PLAIN transmits the password in cleartext at the SASL layer, always enable TLS on the SSL/TLS tab before using LDAP authentication.
Equivalent connection string:
mongodb://alice%40corp.example.com:secret@mongo.example.com:27017/?authMechanism=PLAIN&authSource=$external&tls=true
Kerberos authentication uses the GSSAPI SASL mechanism and delegates ticket acquisition to the operating system's Kerberos stack (MIT Kerberos on Linux/macOS, SSPI on Windows). VisuaLeaf resolves credentials from your active ticket cache — run kinit before connecting if no ticket is present.
| Field | Description | Required |
|---|---|---|
Principal |
Fully qualified Kerberos principal (e.g., alice@EXAMPLE.COM) |
Yes |
Service Name |
Kerberos service name registered for MongoDB (default mongodb) |
No |
Service Realm |
Realm of the MongoDB service, if different from the principal's realm | No |
Equivalent connection string:
mongodb://alice%40EXAMPLE.COM@mongo.example.com:27017/?authMechanism=GSSAPI&authSource=$external&authMechanismProperties=SERVICE_NAME:mongodb
OIDC authentication uses the MONGODB-OIDC mechanism to exchange short-lived access tokens issued by an OpenID Connect identity provider (Okta, Auth0, Azure AD, Google, etc.). VisuaLeaf launches the OIDC device-authorization flow in your default browser during the first connection attempt, then caches and refreshes tokens automatically.
| Field | Description | Required |
|---|---|---|
Principal (Username) |
OIDC subject or username hint used to pre-fill the login screen | No |
Provider Name |
Named provider configured on the MongoDB server, when multiple IdPs are registered | No |
Equivalent connection string:
mongodb://mongo.example.com:27017/?authMechanism=MONGODB-OIDC&authSource=$external
Configure SSL/TLS encryption for secure communication with MongoDB. Essential for production deployments and cloud services like MongoDB Atlas.
Toggle SSL/TLS encryption on or off using the switch at the top of the tab.
| Option | Description | When to Use |
|---|---|---|
Use own Root CA file |
Validate server certificate against a specific CA certificate file | Self-signed certificates or internal CAs |
Accept OS-trusted certificates |
Trust certificates signed by system-trusted CAs | MongoDB Atlas or certificates from public CAs |
Accept any certificates |
Skip certificate validation (insecure) | Development/testing only - NOT for production |
| Field | Description | Format |
|---|---|---|
CA Certificate |
Path to Certificate Authority file (--sslCAFile). Click Browse to select file. | PEM format (.pem, .crt) |
Enable the "Use Client Certificate" toggle to configure client-side authentication for mutual TLS:
| Field | Description | Format |
|---|---|---|
Client Certificate |
Client certificate file path. Click Browse to select file. | PEM format (.pem, .crt) |
Private Key |
Private key file path (if separate from certificate). Click Browse to select file. | PEM format (.pem, .key) |
Has Passphrase |
Toggle if private key is encrypted with a passphrase | Checkbox |
Passphrase |
Passphrase to decrypt the private key (if encrypted) | Text (hidden) |
Configure SSH tunneling to connect to MongoDB servers behind firewalls or in private networks. The SSH tunnel creates a secure connection through an intermediate server.
Toggle SSH tunneling on or off using the switch at the top of the tab.
| Field | Description | Default |
|---|---|---|
SSH Host |
Hostname or IP address of the SSH server (bastion host) | None |
SSH Port |
SSH server port number | 22 |
SSH Username |
SSH login username | None |
| Mode | Required Fields | Description |
|---|---|---|
Password |
SSH Password (hidden input with show/hide toggle) | Simple password authentication for SSH connection |
Private Key |
Private Key File Path, Has Passphrase (checkbox), Passphrase (optional) | Public key authentication using SSH key pair. More secure than password. Enable "Has passphrase" if key is encrypted. |
Configure advanced connection behavior including timeouts, connection pooling, retry logic, and write concerns. These settings directly affect performance and reliability.
| Field | Description | Default |
|---|---|---|
Socket Timeout |
Maximum time to wait for data during read operations. Increase for long-running queries and aggregations. | 300 seconds |
Connect Timeout |
Maximum time to wait when establishing a new connection. Increase for slow networks. | 30 seconds |
Server Selection |
Maximum time to wait for selecting appropriate server (replica set/sharded cluster). | 30 seconds |
| Field | Description | Default |
|---|---|---|
Max Pool Size |
Maximum connections in the pool. Higher values allow more concurrent operations but use more memory. | 100 |
Min Pool Size |
Minimum connections to maintain. Keeps connections ready for faster response. Must be ≤ Max Pool Size. | 0 |
Max Idle Time |
Maximum time a connection can remain idle before being closed. Helps release unused connections. | 10 minutes |
| Field | Description | Default |
|---|---|---|
Retry Writes |
Automatically retry write operations that fail due to network errors or replica set elections. Recommended for production. | Enabled |
Retry Reads |
Automatically retry read operations that fail due to network errors. Improves reliability for read-heavy workloads. | Enabled |
Compress (zlib) |
Compress data between client and server using zlib. Reduces network bandwidth but adds CPU overhead. Useful for slow networks. | Enabled |
Load Balanced |
Enable load balanced mode for MongoDB Atlas or other load balancer deployments. Only enable if connecting through a load balancer. | Disabled |
App Name |
Identifier sent to MongoDB server. Appears in logs, db.currentOp(), and profiler output. Useful for debugging and monitoring. | VisuaLeaf |
Read-Only Mode |
Locks the connection to read-only operations at the client. When enabled, VisuaLeaf disables document editing, insert, update, delete, drop, and DDL actions for every workspace opened against this connection. Ideal for production or shared credentials. | Disabled |
Tip: Read-only mode is enforced by the UI even if the underlying MongoDB user has write privileges — combine it with a color-coded production environment label for an extra safety net. For server-enforced restrictions, pair it with a MongoDB user that only holds the read role (see the Access Control guide).
| Field | Description | Default |
|---|---|---|
W (Acknowledgment) |
majority: Wait for majority of replica set members (recommended) 1: Wait for primary only (faster, less safe) 0: No acknowledgment (fire-and-forget, not recommended) |
majority |
Timeout (ms) |
Maximum time to wait for write concern acknowledgment. If exceeded, write returns error even if it succeeded. | No timeout |
Journal |
Wait for write to be committed to on-disk journal before acknowledging. Provides durability guarantee but adds latency. | Server Default |
Click the "Reset to Defaults" button at the top of the Options tab to restore all settings to their recommended values.
The Test Connection feature validates your configuration before saving. It performs comprehensive checks across all connection aspects.
Each step shows a status indicator (pending, in progress, success, or error). If any step fails, detailed error messages help diagnose the issue.
Each connection card provides quick actions:
Organize connections intuitively with drag and drop:
Right-click on different elements to access context-specific actions:
Use the search bar in the header to quickly find connections:
The sidebar allows quick filtering of connections:
Click the chevron icon or the collapsed sidebar edge to toggle sidebar visibility. On mobile devices, the sidebar automatically collapses and appears as an overlay when opened.
Download and start managing your MongoDB databases with ease.
Download Free Trial