Time Server MCP
A simple MCP (Model Control Protocol) server that provides current time functionality.
Overview
This package implements a lightweight MCP server that exposes a get_current_time tool which can return the current time in any specified timezone.
Installation
pip install time-server-mcp
Dependencies
pytz- For timezone handlingmcp- The Model Control Protocol framework
Usage
Starting the Server
You can start the server using the provided command-line script:
time-server
Using the Server
Once the server is running, you can interact with it using any MCP client.
Example: Getting Current Time
from mcp.client import Client
# Connect to the time server
client = Client(transport="streamable-http")
# Get current time in default timezone
result = client.get_current_time()
print(f"Current time: {result}")
# Get current time in a specific timezone
result = client.get_current_time(timezone="Asia/Shanghai")
print(f"Current time in Shanghai: {result}")
Available Tools
get_current_time(timezone=None)
Returns the current time in the specified timezone.
timezone(optional): A timezone string (e.g., "Asia/Shanghai", "America/New_York")- Returns: A formatted time string ("YYYY-MM-DD HH:MM:SS.SSSSSS TIMEZONE")
License
MIT License
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Metadata
Release files for time-server-mcp-yolan11 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| time_server_mcp_yolan11-0.1.0.tar.gz | 3.7 kB | Without provenance | Details for time_server_mcp_yolan11-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| time_server_mcp_yolan11-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for time_server_mcp_yolan11-0.1.0-py3-none-any.whl |
Total release size: 8.0 kB
Release files / time_server_mcp_yolan11-0.1.0.tar.gz
| Download URL | time_server_mcp_yolan11-0.1.0.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
82d4e9c17fc335f5b137c3bab09004cfca358c247c4b4692d7867e7831e6a3f5
|
|
BLAKE2b-256 checksum How to use checksums |
2ef53439426e23a85e3c5e1b15ea768704aea8f7b109b165d59c6171fd45edee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.13.0 Windows/10
|
Release files / time_server_mcp_yolan11-0.1.0-py3-none-any.whl
| Download URL | time_server_mcp_yolan11-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8aa8a4664d3fd1fa6073df9e695ba996e02b6caea1e0285700d610768ca5464b
|
|
BLAKE2b-256 checksum How to use checksums |
b93c267adb68cb7d4a66758eba4e733aa5780a81e8010a88c43b992f809fda35
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.13.0 Windows/10
|
Security for time-server-mcp-yolan11 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.