Skip to main content
Glama
list-orgs.ts691 B
import { Api, Organization } from '@neondatabase/api-client'; import { ToolHandlerExtraParams } from '../types.js'; import { filterOrganizations } from '../utils.js'; export async function handleListOrganizations( neonClient: Api<unknown>, account: ToolHandlerExtraParams['account'], search?: string, ): Promise<Organization[]> { if (account.isOrg) { const orgId = account.id; const { data } = await neonClient.getOrganization(orgId); return filterOrganizations([data], search); } const { data: response } = await neonClient.getCurrentUserOrganizations(); const organizations = response.organizations || []; return filterOrganizations(organizations, search); }

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/neondatabase-labs/mcp-server-neon'

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