Skip to main content
Glama

Timezone MCP Server

by sam-artuso
timezone.module.tsβ€’1.33 kB
import { Module, DynamicModule } from '@nestjs/common' import { TimezoneController } from './timezone.controller' import { TimezoneService } from './timezone.service' /** * TimezoneModule provides timezone services and optionally REST API endpoints * * The module uses a dynamic module pattern to conditionally register the REST controller: * - TimezoneService is ALWAYS provided (required by MCP tools) * - TimezoneController is ONLY registered when NODE_ENV=development * * This ensures that: * - In production: Only MCP endpoints are available (authenticated) * - In development: Both MCP and REST API are available (REST is unauthenticated for testing) */ @Module({}) export class TimezoneModule { /** * Creates the TimezoneModule with conditional controller registration * * Controllers are only registered in development mode (NODE_ENV=development) * The service is always provided for MCP tools to use */ static forRoot(): DynamicModule { // Default to development if NODE_ENV is not set const nodeEnv = process.env.NODE_ENV || 'development' const isDevelopment = nodeEnv === 'development' return { module: TimezoneModule, controllers: isDevelopment ? [TimezoneController] : [], providers: [TimezoneService], exports: [TimezoneService], } } }

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/sam-artuso/demo-mcp'

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