Skip to main content
Glama
coji
by coji
system.ts859 B
import { exec } from 'node:child_process'; import { promisify } from 'node:util'; import { platform } from 'node:os'; const execAsync = promisify(exec); /** * Detect npx command path */ export async function detectNpxPath(): Promise<string> { const isWindows = platform() === 'win32'; const command = isWindows ? 'where npx' : 'which npx'; try { const { stdout } = await execAsync(command); return stdout.trim().split('\n')[0]; } catch { return isWindows ? 'npx' : '/usr/local/bin/npx'; } } /** * Get Claude Desktop config path */ export function getClaudeConfigPath(): string { const isWindows = platform() === 'win32'; if (isWindows) { return `${process.env.APPDATA}\\Claude\\claude_desktop_config.json`; } else { return `${process.env.HOME}/Library/Application Support/Claude/claude_desktop_config.json`; } }

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/coji/journal-mcp'

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