A simple Model Context Protocol (MCP) server that provides the current time.
- 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.
pip install .Run the server directly:
mcp-server-timeOr with uv:
uv run mcp-server-timeThis server supports the MCP HTTP Streamable Protocol. You can run it using uvicorn:
uvicorn server:app --port 8000The server will be available at http://localhost:8000.
Returns the current time in the specified timezone.
Arguments:
timezone(string, optional): The timezone to get the time for (default: "Asia/Shanghai").