Skip to main content
Glama

MCP Content Analyzer

by DuncanDam
logger.ts670 B
import type { MiddlewareHandler } from 'hono'; import { logger } from '../utils/logger.js'; export const loggerMiddleware: MiddlewareHandler = async (c, next) => { const start = Date.now(); const method = c.req.method; const path = c.req.path; const userAgent = c.req.header('User-Agent') || 'Unknown'; logger.info('Request started', { method, path, userAgent, timestamp: new Date().toISOString() }); await next(); const status = c.res.status; const duration = Date.now() - start; logger.info('Request completed', { method, path, status, duration: `${duration}ms`, timestamp: new Date().toISOString() }); };

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/DuncanDam/my-mcp'

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