# Smithery configuration file: https://smithery.ai/docs/build/project-config
startCommand:
type: stdio
commandFunction:
# A JS function that produces the CLI command based on the given config to start the MCP on stdio.
|
(config) => {
try {
const args = ["dist/index.js"];
// Add configuration options as command-line arguments
if (config.defaultTimezone) {
args.push("--timezone", config.defaultTimezone);
}
if (config.defaultFormat) {
args.push("--format", config.defaultFormat);
}
if (config.defaultLocale) {
args.push("--locale", config.defaultLocale);
}
if (config.debug === true) {
args.push("--debug", "true");
}
// Return the command configuration
return {
"command": "node",
"args": args,
"env": {
"NODE_ENV": "production"
}
};
} catch (error) {
console.error("Error in command function:", error);
// Fallback to basic configuration
return {
"command": "node",
"args": ["dist/index.js"],
"env": {
"NODE_ENV": "production"
}
};
}
}
configSchema:
# JSON Schema defining the configuration options for the MCP.
type: object
properties:
defaultTimezone:
type: string
default: UTC
description: Default timezone (IANA timezone identifier, e.g., UTC,
America/New_York)
defaultFormat:
type: string
default: ISO
description: Default date format (ISO, UNIX, RFC2822, HTTP, SQL, or a custom
format string)
defaultLocale:
type: string
default: en-US
description: Default locale for formatting (e.g., en-US, fr-FR)
debug:
type: boolean
default: false
description: Enable debug logging