A time server tool built with FastMCP
Project description
Time Server MCP
A time server tool built with FastMCP that provides current time information.
Features
- Get current time in any timezone
- Simple and easy-to-use API
- Built with FastMCP for efficient communication
Installation
pip install time-server-mcp
Usage
Running the Server
python -m time_server
Using the Tool
The server provides a get_current_time tool that can be called with an optional timezone parameter.
Example usage:
from mcp.client import MCPClient
# Connect to the server
client = MCPClient()
# Get current time in system default timezone
result = client.call("get_current_time")
print(result)
# Get current time in a specific timezone
result = client.call("get_current_time", timezone="Asia/Shanghai")
print(result)
API
get_current_time(timezone: Optional[str] = None) -> str
Gets the current time.
Parameters:
timezone: Optional timezone string, e.g., "Asia/Shanghai", "America/New_York". If not provided, system default timezone is used.
Returns:
- Formatted current time string in the format:
YYYY-MM-DD HH:MM:SS.SSSSSS TIMEZONE
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file homo_his_heart_mcp-0.1.0.tar.gz.
File metadata
- Download URL: homo_his_heart_mcp-0.1.0.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.13.10 Windows/11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ab5f7bd2ae09388cf4f3f27a672dad796866354af7e15747c98b97cd61b1211e
|
|
| MD5 |
972a8c49b4b876ed48ad9365ecc6be00
|
|
| BLAKE2b-256 |
56e40fbcc62f8f7008d0befd7aedfba0081d4c5fdc6f03871c609235d7c3696c
|
File details
Details for the file homo_his_heart_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: homo_his_heart_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.13.10 Windows/11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63f992ff24a54fdd75f448b1c85c8d8981a513cdd250d956292637c776c38864
|
|
| MD5 |
05fb769eea76fc924cd235156242ce16
|
|
| BLAKE2b-256 |
011d1bca77d18de35763598e3489b789e5666c5379cfbd75370476a1c649b818
|