Skip to main content
Glama

Model Context Protocol Server

by hyen43
default.js1.41 kB
import figures from 'figures'; import { gray, bold, redBright, yellowBright, } from 'yoctocolors'; // Default when `verbose` is not a function export const defaultVerboseFunction = ({ type, message, timestamp, piped, commandId, result: {failed = false} = {}, options: {reject = true}, }) => { const timestampString = serializeTimestamp(timestamp); const icon = ICONS[type]({failed, reject, piped}); const color = COLORS[type]({reject}); return `${gray(`[${timestampString}]`)} ${gray(`[${commandId}]`)} ${color(icon)} ${color(message)}`; }; // Prepending the timestamp allows debugging the slow paths of a subprocess const serializeTimestamp = timestamp => `${padField(timestamp.getHours(), 2)}:${padField(timestamp.getMinutes(), 2)}:${padField(timestamp.getSeconds(), 2)}.${padField(timestamp.getMilliseconds(), 3)}`; const padField = (field, padding) => String(field).padStart(padding, '0'); const getFinalIcon = ({failed, reject}) => { if (!failed) { return figures.tick; } return reject ? figures.cross : figures.warning; }; const ICONS = { command: ({piped}) => piped ? '|' : '$', output: () => ' ', ipc: () => '*', error: getFinalIcon, duration: getFinalIcon, }; const identity = string => string; const COLORS = { command: () => bold, output: () => identity, ipc: () => identity, error: ({reject}) => reject ? redBright : yellowBright, duration: () => gray, };

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/hyen43/mcpServer'

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