MCP server for accurate current time with IP-based timezone detection
Project description
CurrentTime MCP Server
IP 기반 타임존 감지를 통해 정확한 현재 시간을 제공하는 MCP(Model Context Protocol) 서버입니다.
기능
- 자동 타임존 감지: 클라이언트의 IP 주소를 기반으로 자동으로 타임존을 감지합니다
- 정확한 시간 제공: pytz 라이브러리를 사용하여 정확한 현재 시간을 계산합니다
- 다양한 타임존 지원: 전 세계 597개의 타임존을 지원합니다
- 클라이언트 정보: IP 기반 위치 정보와 타임존 정보를 제공합니다
제공되는 Tools
1. get_current_time
클라이언트의 IP를 기반으로 타임존을 자동 감지하고 현재 시간을 반환합니다.
매개변수:
client_ip(선택사항): 특정 IP 주소를 지정할 수 있습니다.
반환값:
current_time: ISO 형식의 현재 시간timezone: 감지된 타임존 (예: "Asia/Seoul")formatted_time: 읽기 쉬운 형식의 시간 (예: "2025-08-27 21:55:40 KST")location: 도시, 지역, 국가 정보utc_offset: UTC 오프셋is_dst: 일광절약시간 적용 여부
2. get_time_for_timezone
특정 타임존의 현재 시간을 반환합니다.
매개변수:
timezone_name: 타임존 이름 (예: "America/New_York", "Europe/London")
3. get_client_info
클라이언트의 IP 기반 위치 정보와 타임존을 반환합니다.
매개변수:
client_ip(선택사항): 특정 IP 주소를 지정할 수 있습니다.
4. list_common_timezones
지역별로 정리된 일반적인 타임존 목록을 반환합니다.
빠른 설치
Claude Code 또는 다른 MCP 클라이언트에서 한 줄로 설치할 수 있습니다:
claude mcp add currenttime-mcp
수동 설치
1. PyPI에서 설치
# uvx로 즉시 실행 (설치 없이 권장)
uvx currenttime-mcp
# 또는 uv로 시스템 설치
uv tool install currenttime-mcp
# 또는 pip 사용
pip install currenttime-mcp
2. Claude Code 설정
Claude Code에서 config.toml 파일에 다음과 같이 추가하세요:
[mcp_servers.currenttime]
command = "uvx"
args = ["currenttime-mcp"]
# 또는 pip으로 설치한 경우
[mcp_servers.currenttime]
command = "currenttime-mcp"
3. 테스트
# 함수 테스트
source venv/bin/activate
python test_server.py
사용 예시
Claude Code에서 다음과 같이 사용할 수 있습니다:
- "현재 시간이 몇 시야?"
- "뉴욕의 현재 시간을 알려줘"
- "내 타임존 정보를 보여줘"
- "사용 가능한 타임존 목록을 보여줘"
API 정보
이 MCP 서버는 다음 외부 서비스를 사용합니다:
- ipapi.co: IP 기반 지리적 위치 및 타임존 감지 (월 30,000회 무료)
환경변수로 설정을 조정할 수 있습니다:
IPAPI_BASE: 기본 API 엔드포인트(기본값:https://ipapi.co)IPAPI_KEY: ipapi 유료/개인 키(있을 경우 쿼터 증가)
기술 스택
- Python 3.8+
- MCP (Model Context Protocol): AI 모델과의 표준화된 통신
- FastMCP: MCP 서버 구현을 위한 고수준 프레임워크
- requests: HTTP 클라이언트
- pytz: 타임존 처리
라이센스
이 프로젝트는 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 currenttime_mcp-1.0.1.tar.gz.
File metadata
- Download URL: currenttime_mcp-1.0.1.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4673adf494a04c3c898028aa648403c5c28ff205105bd52aab1d00c0ff6b1ac
|
|
| MD5 |
dcc1114da1b67bf7d48667ee19bce472
|
|
| BLAKE2b-256 |
d105314d910ec25802eb7eb8227b7fa9a6ccd221a03c06787af48b0c311dcf44
|
File details
Details for the file currenttime_mcp-1.0.1-py3-none-any.whl.
File metadata
- Download URL: currenttime_mcp-1.0.1-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
56e008ff34dc3db8a4895f7e3c383f30242b2a26af31c32a94bf4fe68f591c10
|
|
| MD5 |
dd3bddfdf3053ae0664aa10a3a286485
|
|
| BLAKE2b-256 |
8fb82452c87cb5e34777e97a37e6842892c4ffb19370e0b621deb42547b8d457
|