mcp -time
MCP Server for Timezone tools with SSE and Streamable
claude mcp add --transport stdio hspedro-mcp-server-time docker run -p 8080:8080 -p 9080:9080 ghcr.io/hspedro/mcp-server-time:latest \ --env MCP_SERVER_HOST="0.0.0.0" \ --env MCP_SERVER_PORT="8080" \ --env MCP_METRICS_PORT="9080" \ --env MCP_LOGGING_LEVEL="info" \ --env MCP_LOGGING_FORMAT="json" \ --env MCP_METRICS_ENABLED="true" \ --env MCP_TIME_DEFAULT_FORMAT="RFC3339" \ --env MCP_TIME_DEFAULT_TIMEZONE="America/New_York"
How to use
This MCP server provides time and timezone utilities built with Go and the MCP Go SDK. It exposes multiple transports to interact with time services: a streamable HTTP transport for stateless requests, and Server-Sent Events (SSE) for real-time streaming. You can query the current time in a specific timezone, format timestamps, parse time strings, and retrieve comprehensive timezone information including DST transitions. The server is designed with observability in mind, offering Prometheus metrics and structured logs, and it supports production-ready features like graceful shutdown and YAML configuration with environment variable overrides.
How to install
Prerequisites:
- Docker (recommended) or Go toolchain if building from source
- Make tool (optional, for Go build)
Installation options:
Option A: Run via Docker (recommended)
-
Pull and run the image with default config: docker run -p 8080:8080 -p 9080:9080 ghcr.io/hspedro/mcp-server-time:latest
-
Run with a custom configuration file (mount a config.yaml if supported by the image): docker run -p 8080:8080 -v $(pwd)/config.yaml:/app/config.yaml ghcr.io/hspedro/mcp-server-time:latest
Option B: Build and run from source (Go)
- Install Go (1.20+ or newer as of project) and Git
- Clone the repository: git clone https://github.com/hspedro/mcp-server-time.git cd mcp-server-time
- Build the binary (Makefile is provided): make build
- Run locally: ./mcp-server-time
Option C: Run via Go toolchain directly (if you prefer not to build): go run ./...
Additional notes
Tips and common issues:
- Ensure the correct time zone data is available in the container (America/New_York used in examples).
- If using Docker with a custom config, mount your config.yaml at the path expected by the image (check Dockerfile entrypoints).
- Enable metrics by setting MCP_METRICS_ENABLED=true to scrape /metrics on port 9080.
- For production, prefer the docker deployment with proper graceful shutdown and resource limits.
- The server supports both SSE and streamable transports; use GET /sse for streaming or POST /streamable /mcp for request/response.
- Environment variable overrides take precedence over YAML config where supported.
- When upgrading, review MCP protocol compatibility (v0.8.0) and any breaking changes in time formatting or parsing options.
Related MCP Servers
trpc-agent-go
trpc-agent-go is a powerful Go framework for building intelligent agent systems using large language models (LLMs) and tools.
station
Station is our open-source runtime that lets teams deploy agents on their own infrastructure with full control.
tiger-cli
Tiger CLI is the command-line interface for Tiger Cloud. It includes an MCP server for helping coding agents write production-level Postgres code.
gopls
MCP server for golang projects development: Expand AI Code Agent ability boundary to have a semantic understanding and determinisic information for golang projects.
kubernetes
A Model Context Protocol (MCP) server for the Kubernetes API.
gcp-cost
💰 An MCP server that enables AI assistants to estimate Google Cloud costs, powered by Cloud Billing Catalog API and built with Genkit for Go