Skip to main content
Glama
mongodb-js

MongoDB MCP Server

Official
by mongodb-js

atlas-list-orgs

Retrieve and display all MongoDB Atlas organizations you have access to for managing cloud database resources.

Instructions

List MongoDB Atlas organizations

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The execute method implements the tool logic: calls the Atlas API to list organizations, handles empty results, maps to name/id, and formats output using formatUntrustedData.
    protected async execute(): Promise<CallToolResult> { const data = await this.session.apiClient.listOrgs(); if (!data?.results?.length) { return { content: [{ type: "text", text: "No organizations found in your MongoDB Atlas account." }], }; } const orgs = data.results.map((org) => ({ name: org.name, id: org.id, })); return { content: formatUntrustedData( `Found ${data.results.length} organizations in your MongoDB Atlas account.`, JSON.stringify(orgs) ), }; } }
  • The tool class definition and name property registration for 'atlas-list-orgs'. Extends AtlasToolBase which likely handles MCP tool protocol.
    export class ListOrganizationsTool extends AtlasToolBase { public name = "atlas-list-orgs";
  • Empty input schema indicating no arguments required for this tool.
    protected argsShape = {};
  • Barrel export re-exposing the tool for easy import in registration contexts.
    export { ListOrganizationsTool } from "./read/listOrgs.js";

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mongodb-js/mongodb-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server