Metadata-Version: 2.4
Name: time-server-mcp-yolan11
Version: 0.1.0
Summary: A simple MCP server that provides current time functionality
Author-email: Your Name <your.email@example.com>
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pytz
Requires-Dist: mcp
Dynamic: license-file

# 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

```bash
pip install time-server-mcp
```

## Dependencies

- `pytz` - For timezone handling
- `mcp` - The Model Control Protocol framework

## Usage

### Starting the Server

You can start the server using the provided command-line script:

```bash
time-server
```

### Using the Server

Once the server is running, you can interact with it using any MCP client.

#### Example: Getting Current Time

```python
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.
