Skip to main content

MCP Time Server

An MCP Server that provides a tool to get the current time with optional timezone support.

Features

  • Provides a get_current_time tool to retrieve the current time
  • Supports optional timezone parameter
  • Simple and lightweight implementation
  • Built using the Model Context Protocol (MCP)

Installation

pip install mcp-time-server

Usage

Running the Server

mcp-time-server

This will start the MCP Server using the STDIO transport, which is suitable for local process communication.

Using the get_current_time Tool

The server exposes a single tool called get_current_time that can be used by MCP clients.

Parameters

  • timezone (optional): A timezone string, e.g., "Asia/Shanghai", "America/New_York"
    • If not provided, the system's default timezone will be used

Return Value

A formatted string representing the current time in the format: YYYY-MM-DD HH:MM:SS.SSSSSS TIMEZONE

Examples

# Get current time in system default timezone
result = await mcp_client.call_tool("get_current_time")
# Example output: "2023-12-25 13:45:30.123456 EST"

# Get current time in a specific timezone
result = await mcp_client.call_tool("get_current_time", timezone="Asia/Shanghai")
# Example output: "2023-12-26 02:45:30.123456 CST"

Project Structure

mcp-time-server/
├── mcp_time_server/
│   ├── __init__.py      # Package initialization
│   └── main.py          # Main server implementation
├── pyproject.toml       # Project configuration
├── README.md            # This file
├── LICENSE              # License file
└── .gitignore           # Git ignore file

License

MIT License - see the LICENSE file for details.

About MCP

The Model Context Protocol (MCP) is an open-source standard for connecting AI applications to external systems. For more information, visit modelcontextprotocol.io.

Metadata

Release files for mcp-cuc-jyf 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcp-cuc-jyf 0.1.0
File Size Uploaded Provenance Actions
mcp_cuc_jyf-0.1.0.tar.gz 3.2 kB Without provenance Details for mcp_cuc_jyf-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mcp-cuc-jyf 0.1.0
File Interpreter ABI Platform Actions
mcp_cuc_jyf-0.1.0-py3-none-any.whl Python 3 none any Details for mcp_cuc_jyf-0.1.0-py3-none-any.whl

Total release size: 7.5 kB

Release files / mcp_cuc_jyf-0.1.0.tar.gz

Download URL mcp_cuc_jyf-0.1.0.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
45ffc83395e22cc4fd306f53dfcf40575e51dca5392c95c7b98b2d621f144a7c
BLAKE2b-256 checksum
How to use checksums
71954ea1070eabbce0f44491d21de48ce4c925a310830636e545097ff570e4f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.2 CPython/3.15.2 Windows/11

Release files / mcp_cuc_jyf-0.1.0-py3-none-any.whl

Download URL mcp_cuc_jyf-0.1.0-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
af879e857db8afc71f8c618a5b762a33fa36e896f335da444e4399cf3a17ad40
BLAKE2b-256 checksum
How to use checksums
fc5e8d1102e80eb0778a07c209becfe9ab459dc7bf02d437d95a5608d9a31270
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.2 CPython/3.15.2 Windows/11

Security for mcp-cuc-jyf 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page