Add MongoDB Atlas Service Discovery Plugin
Background
DocumentDB for VS Code includes an open Service Discovery architecture that allows plugins to authenticate with a vendor environment, navigate its resource hierarchy, discover database services, and surface connection strings back to the extension. Today, three Azure-based plugins are available:
- Azure Cosmos DB for MongoDB (RU)
- Azure DocumentDB (vCore)
- Azure VMs (DocumentDB)
This issue proposes a new MongoDB Atlas service discovery plugin so users who host clusters on Atlas can discover and connect to them without manually copying connection strings.
Prior Work
PR #267 (linked to #259 and #261) already implements the programmatic access layer for Atlas under src/plugins/service-mongo-atlas/. This includes:
- Authentication — Both OAuth 2.0 Client Credentials and HTTP Digest (Atlas API Keys), with token caching and automatic refresh.
- API client — Typed methods to list projects, list and get clusters (including connection strings), list database users, and manage IP access list entries. Pagination is supported.
- Tests — Unit tests with, if doable at low dev time cost, mocked HTTP responses for all of the above.
This issue covers everything above that layer: the Discovery View integration, user-facing wizards, and tree view experience.
Goal
Users should be able to:
- Enable the Atlas plugin from the Service Discovery panel, the same way they enable existing providers.
- Authenticate via the Manage Credentials entry point. The user provides either OAuth 2.0 credentials (Service Account client ID + secret) or HTTP Digest credentials (API public + private key), scoped to an Atlas Organization.
- Browse their Atlas estate in the Discovery tree view — Organizations, Projects, and Clusters — with cluster type, state, and region visible at a glance.
- Filter visible resources via the Filter entry point to narrow which organizations or projects appear, mirroring how Azure plugins filter by tenant and subscription.
- Select a cluster to have its connection string resolved and added to the Connections view.
UX Expectations
- Follow the same UX patterns established by existing plugins — use the existing service discovery plugin infrastructure, including the
DiscoveryProvider registration, the Manage Credentials entry point, and the Filter entry point.
- The Manage Credentials wizard should let users add, view, and remove Atlas credentials. Unlike Azure plugins (which use VS Code's Azure account login), Atlas requires user-entered API key pairs — the UX should guide users through this clearly.
- The Filter wizard should let users scope which parts of their Atlas estate are visible in the tree.
- Tree items should have the same affordances as existing plugins: refresh, retry on error, learn more link, etc.
- See Managing Azure Discovery for the credential and filter UX to emulate.
Exploration Needed
PR #267 answers many API questions but the following should still be investigated:
- Organization listing — The API client lists projects but not organizations. Is there an endpoint to list orgs, or should the user enter their Org ID during credential setup?
- Teams and groupings — Does Atlas have Teams or other structures that affect API key scoping or project visibility? Should these appear in the tree or filter?
- Connection string variants — Atlas clusters expose SRV, standard, private, and private-endpoint connection strings. Which should the plugin prefer? Should the user choose?
- IP Access List — The API layer already supports managing IP access list entries. Should the discovery flow offer to add the user's current IP if the cluster is unreachable? This is a common Atlas onboarding friction point.
- Minimum permissions — What Atlas role is required for read-only discovery? Document this for users.
Out of Scope
References
Add MongoDB Atlas Service Discovery Plugin
Background
DocumentDB for VS Code includes an open Service Discovery architecture that allows plugins to authenticate with a vendor environment, navigate its resource hierarchy, discover database services, and surface connection strings back to the extension. Today, three Azure-based plugins are available:
This issue proposes a new MongoDB Atlas service discovery plugin so users who host clusters on Atlas can discover and connect to them without manually copying connection strings.
Prior Work
PR #267 (linked to #259 and #261) already implements the programmatic access layer for Atlas under
src/plugins/service-mongo-atlas/. This includes:This issue covers everything above that layer: the Discovery View integration, user-facing wizards, and tree view experience.
Goal
Users should be able to:
UX Expectations
DiscoveryProviderregistration, the Manage Credentials entry point, and the Filter entry point.Exploration Needed
PR #267 answers many API questions but the following should still be investigated:
Out of Scope
References
src/plugins/service-azure-*for patterns to follow