Skip to main content
Glama
nrwl

Nx MCP Server

Official
by nrwl
lsp-log.ts801 B
import { Logger } from '@nx-console/shared-utils'; import { Connection } from 'vscode-languageserver'; let log: Console['log'] | undefined; let enableDebugLogging = false; export function setLspLogger(connection: Connection, debugLogging = false) { if (!log) { log = connection.console.log.bind(connection.console); enableDebugLogging = debugLogging; } else { throw `Can't set logger twice`; } } export const lspLogger: Logger = { log(message: string, ...args: any[]) { log?.( `[Nxls] - ${new Date(Date.now()).toISOString()} - ${message}\n`, ...args, ); }, debug(message: string, ...args: any[]) { if (enableDebugLogging) { log?.( `[Nxls] - ${new Date(Date.now()).toISOString()} - ${message}\n`, ...args, ); } }, };

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