Time Server MCP
A time server tool built with FastMCP that provides current time information.
Features
- Get current time with optional timezone support
- Simple command-line interface
- Easy to integrate as a library
- Built with FastMCP for efficient communication
Installation
You can install Time Server MCP using pip:
pip install time-server-mcp
Usage
Command Line Interface
After installation, you can run the time server directly from the command line:
time-server
This will start the FastMCP server, which will be ready to accept requests for current time information.
As a Library
You can also use the time server functionality in your own Python code:
from time_server import get_current_time
# Get current time in system default timezone
time_now = get_current_time()
print(f"Current time: {time_now}")
# Get current time in a specific timezone
time_shanghai = get_current_time(timezone="Asia/Shanghai")
print(f"Current time in Shanghai: {time_shanghai}")
time_new_york = get_current_time(timezone="America/New_York")
print(f"Current time in New York: {time_new_york}")
API Documentation
get_current_time(timezone: Optional[str] = None) -> str
Get the current time in a specified timezone.
Parameters:
timezone: Optional timezone string, e.g., "Asia/Shanghai", "America/New_York". If not provided, system default timezone will be used.
Returns:
- Formatted current time string in the format "YYYY-MM-DD HH:MM:SS.SSSSSS Timezone Name".
Example:
time = get_current_time("Europe/London")
# Output: 2023-12-25 15:30:45.123456 GMT
Dependencies
- Python >= 3.8
- pytz >= 2023.3
- mcp-server >= 0.1.0
License
MIT License
Project Links
Metadata
Release files for time-server-mcp-ww 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 | |
|---|---|---|---|---|
| time_server_mcp_ww-0.1.0.tar.gz | 4.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| time_server_mcp_ww-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.5 kB
Release files / time_server_mcp_ww-0.1.0.tar.gz
| Download URL | time_server_mcp_ww-0.1.0.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d43e3734d14082a9f28bf78deaf268dfbedee509a0cad3997c508422cbe6e506
|
|
BLAKE2b-256 checksum How to use checksums |
72b3e7e703e6fca6c9505de68e238ad90f452c2c61bab09173e08fa73d580afd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.0
|
Release files / time_server_mcp_ww-0.1.0-py3-none-any.whl
| Download URL | time_server_mcp_ww-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
964482ba99cd9430bc695548440813e3c67c17bd5215bc164bbae141660f156c
|
|
BLAKE2b-256 checksum How to use checksums |
b810e5bef6d365307f03473687156436fbf012b64c42dc77a54cde82c92cab07
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.0
|
Security for time-server-mcp-ww 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.