Time MCP
Provides time-related tools for LLM applications, enabling retrieval of current UTC time in ISO 8601 format and Unix timestamps.
README
Time MCP
A Model Context Protocol (MCP) server that provides time-related tools for LLM applications.
Features
- Get current UTC time in ISO 8601 format
- Get Unix timestamp
- Support for timezone queries (optional extension)
Requirements
- Node.js 18+
- pnpm
Docker Deployment
🐳 Docker 部署: 查看 DOCKER.md 了解如何使用 Docker 和 Docker Compose 部署 Time MCP 服务器。
快速开始:
docker-compose up -d
Installation
pnpm install
Development
# Run in development mode (Stdio mode)
pnpm dev
# Run in HTTP mode (development)
pnpm dev:http
# Build for production
pnpm build
# Run production build (Stdio mode)
pnpm start
# Run production build (HTTP mode)
pnpm start:http
Transport Modes
This server supports two transport modes:
Stdio Mode (Default)
The server communicates via standard input/output streams. This is the default mode and is suitable for local process communication.
pnpm dev
# or
TRANSPORT=stdio pnpm start
HTTP Mode
The server runs as an HTTP server and can be accessed remotely. Suitable for remote deployment and network communication.
# Development
pnpm dev:http
# Production
TRANSPORT=http PORT=3000 HOST=0.0.0.0 pnpm start
Environment Variables for HTTP Mode:
TRANSPORT: Transport type (stdio|http), default:stdioPORT: HTTP port (HTTP mode), default:3000HOST: HTTP listen address (HTTP mode), default:0.0.0.0MCP_PATHorAPI_PATH: HTTP API path (HTTP mode), default:/mcpLOG_LEVEL: Log level (DEBUG|INFO|WARN|ERROR), default:INFO
Logging
The server includes comprehensive logging for troubleshooting. Logs are output to stderr (following MCP protocol conventions).
Log Levels:
DEBUG: Detailed debug information (most verbose)INFO: General informational messages (default)WARN: Warning messagesERROR: Error messages only (least verbose)
Setting Log Level:
# Set log level via environment variable
LOG_LEVEL=DEBUG pnpm dev
LOG_LEVEL=ERROR pnpm start:http
What Gets Logged:
- Server startup and shutdown
- Transport creation and connection
- HTTP request/response details (method, path, duration)
- Tool calls (name, arguments, results)
- Errors with stack traces
Usage
📖 详细使用文档: 查看 USAGE.md 了解如何在其他 LLM 应用中集成和使用 time-mcp,包括在 OpenAI JS SDK Response API 中的完整示例。
This MCP server provides the following tools:
getCurrentTime
Returns the current UTC time in ISO 8601 format along with Unix timestamp.
Parameters: None
Returns:
{
"timestamp": "2024-01-01T12:00:00.000Z",
"iso": "2024-01-01T12:00:00.000Z",
"unix": 1704110400000
}
License
ISC
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.