mcp-fast-time -go
Fast time server written in go
claude mcp add --transport stdio crivetimihai-mcp-fast-time-server-go docker run -i crivetimihai-mcp-fast-time-server-go
How to use
The mcp-fast-time Go server is a lightweight service that streams the current UTC time using three transport modes: stdio, HTTP/JSON-RPC, and Server-Sent Events (SSE). It can be interacted with directly via standard input/output, or remotely through HTTP endpoints. The HTTP interface exposes a JSON-RPC 2.0 method named Time.Now via POST /http, returning timestamps in RFC3339 UTC format. For real-time streaming, the SSE endpoint at GET /sse publishes a new timestamp every second, with optional Bearer token authentication on the connection header. You can also run the server in stdio mode to integrate it into other tooling or pipelines. The project ships with a Dockerfile for lightweight containerization, a makefile for builds, and cross‑compilation targets for multiple OS/architectures.
How to install
Prerequisites:
- Go 1.23+ (for building from source, if desired)
- Docker (for containerized usage)
- Git
Option A: Run via Docker (recommended for simplicity)
- Pull or build the Docker image:
- If you have the image published: docker pull crivetimihai-mcp-fast-time-server-go
- Or build locally from a Dockerfile in the repository: docker build -t crivetimihai-mcp-fast-time-server-go .
- Run in HTTP mode (default port 8080): docker run -i -p 8080:8080 crivetimihai-mcp-fast-time-server-go
Option B: Build and run the binary locally (Go 1.23+)
- Clone the repository: git clone https://github.com/yourorg/fast-time-server.git cd fast-time-server
- Build the binary: go install github.com/yourorg/fast-time-server@latest
- Run the binary (default HTTP on 8080): fast-time-server
Option C: Use Make targets (if provided in the repo)
- Build artifacts: make build
- Run HTTP server: make run-http
- Run SSE: make run-sse
Additional notes
Tips and common considerations:
- The HTTP endpoint uses JSON-RPC 2.0. Use POST /http with a body like {"jsonrpc":"2.0","method":"Time.Now","id":1} and expect a result timestamp in UTC.
- The SSE stream at GET /sse outputs data: <timestamp> lines every second. You can attach an Authorization header with a Bearer token for access control if the server is configured to require it.
- By default, the server binds to 0.0.0.0:8080; use -addr and -port equivalents if running from source to customize binding.
- If you’re building from source, you can leverage the cross compilation targets (make cross) to generate binaries for different OS/arch combinations.
- For production, consider using the Docker image with a proper port mapping and any required environment variables (e.g., tokens for SSE auth) configured via -e flags or a .env file.
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