Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

homo_his_heart_mcp-0.1.1.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

homo_his_heart_mcp-0.1.1-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file homo_his_heart_mcp-0.1.1.tar.gz.

File metadata

  • Download URL: homo_his_heart_mcp-0.1.1.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.13.10 Windows/11

File hashes

Hashes for homo_his_heart_mcp-0.1.1.tar.gz
Algorithm Hash digest
SHA256 67ce1a148d97b6ae75e2efbc54daf68b8789b06bf665c020083b62718acfa534
MD5 d913c29ba9b95f4124b8f4b51f6b1517
BLAKE2b-256 95be2941a10c219f8f4161095db6355f207293d02afb7c662427ea3e11df5f76

See more details on using hashes here.

File details

Details for the file homo_his_heart_mcp-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for homo_his_heart_mcp-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3eea8c63447f45709acb669277bf9ff789d7b4d8f0fe7a263dd57ec39470ba6d
MD5 8c651e09c61fbc781edb880aee6208b0
BLAKE2b-256 45e9d77872881655405831cfd8c2e41e7b4bfd399ef038cb7f80969d3d4dba36

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page