Skip to main content
Glama

MCP Hello World

by MillCityAI
logger.ts•1.15 kB
import pino from 'pino'; import type { FastifyRequest } from 'fastify'; const isProduction = process.env.NODE_ENV === 'production'; const loggerOptions: pino.LoggerOptions = { level: process.env.LOG_LEVEL || (isProduction ? 'info' : 'debug'), formatters: { level(label: string) { return { level: label }; } }, serializers: { req: pino.stdSerializers.req, res: pino.stdSerializers.res, err: pino.stdSerializers.err }, redact: { paths: [ 'req.headers.authorization', 'req.headers.cookie', 'req.headers["x-api-key"]', 'req.headers["x-auth-token"]' ], remove: true } }; if (!isProduction) { loggerOptions.transport = { target: 'pino-pretty', options: { colorize: true, translateTime: 'HH:MM:ss Z', ignore: 'pid,hostname' } }; } const logger = pino(loggerOptions); export function createRequestLogger(req: FastifyRequest) { return logger.child({ requestId: req.id, region: process.env.REGION || 'unknown', buildSha: process.env.BUILD_SHA || 'dev', instanceId: process.env.INSTANCE_ID || 'local' }); } export { logger };

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/MillCityAI/mcp-hello-world'

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