Skip to main content
Glama
nrwl

Nx MCP Server

Official
by nrwl
get-nx-cloud-status.ts783 B
import { existsSync } from 'fs'; import { join } from 'path'; import { defaultCloudUrl, getNxAccessToken, getNxCloudId, getNxCloudUrl, } from '@nx-console/shared-nx-cloud'; export async function getNxCloudStatus( workspaceRoot: string, ): Promise<{ isConnected: boolean; nxCloudUrl: string; nxCloudId?: string }> { const nxJsonPath = join(workspaceRoot, 'nx.json'); if (!existsSync(nxJsonPath)) { return { isConnected: false, nxCloudUrl: defaultCloudUrl }; } const nxCloudId = await getNxCloudId(workspaceRoot); if ((await getNxAccessToken(workspaceRoot)) || nxCloudId) { return { isConnected: true, nxCloudUrl: await getNxCloudUrl(workspaceRoot), nxCloudId, }; } return { isConnected: false, nxCloudUrl: defaultCloudUrl }; }

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/nrwl/nx-console'

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