Skip to main content
Glama
nrwl

Nx MCP Server

Official
by nrwl
output-channels.ts1.48 kB
import { commands, ExtensionContext, OutputChannel, window } from 'vscode'; import { Logger } from '@nx-console/shared-utils'; import { GlobalConfigurationStore } from '@nx-console/vscode-configuration'; let _channel: OutputChannel; function getOutputChannel(): OutputChannel { if (!_channel) { _channel = window.createOutputChannel('Nx Console'); } return _channel; } export function showOutputChannel() { getOutputChannel().show(); } export function initOutputChannels(context: ExtensionContext) { context.subscriptions.push( getOutputChannel(), getNxlsOutputChannel(), commands.registerCommand('nxConsole.showNxlsLogs', () => { getNxlsOutputChannel().show(); }), ); } let _nxlsOutputChannel: OutputChannel; export function getNxlsOutputChannel(): OutputChannel { if (!_nxlsOutputChannel) { _nxlsOutputChannel = window.createOutputChannel('Nx Language Server'); } return _nxlsOutputChannel; } export const vscodeLogger: Logger = { log: (message: string, ...args: any[]) => { getOutputChannel().appendLine( `[${new Date().toISOString()}] ${message} ${args.join(' ')}`, ); }, debug: (message: string, ...args: any[]) => { const enableDebugLogging = GlobalConfigurationStore.instance.get( 'enableDebugLogging', false, ); if (enableDebugLogging) { getOutputChannel().appendLine( `[${new Date().toISOString()}] ${message} ${args.join(' ')}`, ); } }, };

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