Skip to main content
Glama

Ultimate MCP Coding Platform

process.js711 B
import { spawn } from 'node:child_process'; export function runCommand(command, args = [], options = {}) { return new Promise((resolve, reject) => { const child = spawn(command, args, { stdio: options.stdio ?? 'inherit', cwd: options.cwd ?? process.cwd(), env: { ...process.env, ...(options.env ?? {}) }, shell: options.shell ?? false, }); child.on('error', (error) => { reject(error); }); child.on('exit', (code) => { if (code === 0) { resolve(); } else { const err = new Error( `${command} ${args.join(' ')} exited with code ${code}`, ); err.code = code; reject(err); } }); }); }

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/Senpai-Sama7/Ultimate_MCP'

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