Skip to main content
Glama

MCP Time Server

by WhenjaySun
README.md1 kB
# MCP Time Server A simple Model Context Protocol (MCP) server that provides the current time. ## Features - **Get Current Time**: Returns the current time in a specified timezone (default: Asia/Shanghai). - **Timezone Support**: Supports standard IANA timezone names (e.g., "UTC", "America/New_York"). - **Transports**: Supports both stdio (default) and HTTP Streamable Protocol. ## Installation ```bash pip install . ``` ## Usage ### 1. Stdio Transport (Default) Run the server directly: ```bash mcp-server-time ``` Or with `uv`: ```bash uv run mcp-server-time ``` ### 2. HTTP Streamable Transport This server supports the MCP HTTP Streamable Protocol. You can run it using `uvicorn`: ```bash uvicorn server:app --port 8000 ``` The server will be available at `http://localhost:8000`. ## Tools ### `get_current_time` Returns the current time in the specified timezone. **Arguments:** - `timezone` (string, optional): The timezone to get the time for (default: "Asia/Shanghai").

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/WhenjaySun/mcp-server-time'

If you have feedback or need assistance with the MCP directory API, please join our Discord server