Skip to main content
Use MongoDB Atlas through Corsair: one client, typed API calls. Connect with a service account (Organization > Access Manager > Applications > Service Accounts): store it as clientId:clientSecret (mdb_sa_id_...:mdb_sa_sk_...) or as the JSON { "clientId": "mdb_sa_id_...", "clientSecret": "mdb_sa_sk_..." }. The plugin trades it at /api/oauth/token for a bearer token (cached until a minute before it expires). A programmatic API key works too, as publicKey:privateKey; Atlas wants those with HTTP Digest authentication, which the plugin does. Add the IP addresses the calls come from to the credential’s API access list if your organization requires one, and give it the roles the calls need (Organization Owner or Project Owner covers most).
  • Ids. Atlas calls a project a group: groupId is the project id (projects.listGroups), orgId the organization’s (organizations.listOrgs). Clusters, users and indexes go by name.
  • Versions. Every Atlas route is versioned by media type; each operation is pinned to the newest version the spec offers and sends it as Accept: application/vnd.atlas.<date>+json.
  • Lists page with pageNum (1-based) and itemsPerPage (the plugin sends 100 when it is left out) and return { results, totalCount, links }.
  • Downloads (database logs, invoices as CSV) come back as files.
  • Risk. Reads are read. Deletes, anything that starts billed infrastructure (clusters, search nodes, stream workspaces and processors, data federation, private endpoints, peering, online archive, snapshots), restores, failover and outage tests, invitations, new keys and service accounts, and organization-level changes are destructive; other writes are write.
  • Not wrapped: the 53 operations the spec marks deprecated (each has a newer replacement in the plugin).
What you get:
  • 489 typed API operations

Setup

1

Install

2

Add the plugin

corsair.ts
With multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.
3

Choose authentication

4

Connect a tenant

Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see Connect / OAuth.

Example API calls

List the clusters in a project
Allow an IP range to reach a project
See the full list on the API page.

What’s next

API reference

Every mongodbatlas.api.* operation with input and output types.

Connect / OAuth

createLink, Hub delivery, and tenant connect flows.

Use with agents

Expose this plugin’s operations as MCP tools.