A local MCP server that provides local time and timezone conversion tools.
Project description
gettime-mcp
A local FastMCP server (stdio) with two tools:
get_local_timeconvert_time_between_timezones
Requirements
- Python 3.13+
uv
Setup
uv sync --all-groups
Run
uv run gettime-mcp
Tools
get_local_time
Input:
- none
Output JSON:
local_iso: ISO 8601 local datetime with offsetweekday: weekday name in current local timezone (MondaytoSunday)timezone_name: local timezone nameutc_offset:+HH:MM/-HH:MMunix_timestamp: seconds timestamp
convert_time_between_timezones
Input:
datetime_iso(required): ISO 8601 datetime string (supportsZ)to_timezone(required): IANA timezone name (for exampleUTC,Asia/Shanghai)from_timezone(optional): used only whendatetime_isohas no offset
Output JSON:
input_datetime_isosource_timezonetarget_timezoneconverted_isoconverted_unix_timestamp
Error behavior:
- invalid timezone:
Invalid timezone: <name> - invalid datetime format:
Invalid datetime_iso format - if
datetime_isoalready has an offset,from_timezoneis ignored
Cursor / Cline (local MCP)
Add to your MCP config (path depends on your editor installation):
{
"mcpServers": {
"gettime-local": {
"command": "uv",
"args": ["run", "gettime-mcp"],
"cwd": "<ABSOLUTE_PROJECT_PATH>"
}
}
}
Example cwd on Windows: D:\\path\\to\\gettime
Tests
uv run pytest
Publish To PyPI (safe)
Build and validate:
uv build
uvx twine check dist/*
Publish with environment variable (do not paste token in files):
$env:PYPI_TOKEN = "pypi-***"
uvx twine upload dist/* -u __token__ -p $env:PYPI_TOKEN
Security Notes
- Never commit tokens, cookies, or API keys.
- Do not hardcode local absolute paths in public docs.
- If a token was exposed, revoke and rotate it immediately.
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 gettime_mcp-0.1.0.tar.gz.
File metadata
- Download URL: gettime_mcp-0.1.0.tar.gz
- Upload date:
- Size: 53.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a461616307f178d78ead1cf8ededd4d5d54469e4dcaeefea051fdfb95628188a
|
|
| MD5 |
fd49700d5333c7f924ae63023a118231
|
|
| BLAKE2b-256 |
cae1c7adc98cbfb7b2f9e187151df19e96a4f0969d8208f0933b2b37dd81854b
|
File details
Details for the file gettime_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: gettime_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3eda7b49ec21b99f13b09f7084c4ef8f5a87667cd72767ac85421a8997387b79
|
|
| MD5 |
9625a8f9b4c222e22e32f0558f25447e
|
|
| BLAKE2b-256 |
1535687c24bb724aba5b8c5699906e0e07b42844f207869f82f817b032ffb521
|