Returns the current time with timezone support.
接入配置
选择客户端,复制配置,再按项目文档补齐环境变量。
claude mcp add time --env TZ='<TZ>' -- npx -y @guanxiong/mcp-server-time~/.codex/config.toml
[mcp_servers.time]
command = "npx"
args = ["-y", "@guanxiong/mcp-server-time"]
env = { TZ = "<TZ>" }
# codex mcp add time --env TZ='<TZ>' -- npx -y @guanxiong/mcp-server-time~/.cursor/mcp.json
{
"mcpServers": {
"time": {
"command": "npx",
"args": [
"-y",
"@guanxiong/mcp-server-time"
],
"env": {
"TZ": "<TZ>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"time": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@guanxiong/mcp-server-time"
],
"env": {
"TZ": "<TZ>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"time": {
"command": "npx",
"args": [
"-y",
"@guanxiong/mcp-server-time"
],
"env": {
"TZ": "<TZ>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"time": {
"command": "npx",
"args": [
"-y",
"@guanxiong/mcp-server-time"
],
"env": {
"TZ": "<TZ>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"time": {
"command": "npx",
"args": [
"-y",
"@guanxiong/mcp-server-time"
],
"env": {
"TZ": "<TZ>"
}
}
}
}需要的环境变量
TZ
把占位值换成你自己的密钥;不要把密钥提交到代码仓库。