Skip to main content
Glama

MCP 서버

날씨 및 시간 도구가 포함된 확장 가능한 Model Context Protocol (MCP) 서버입니다. 학습용으로 제작되었으며, Claude Desktop에 연결하여 대화를 시작할 수 있습니다.

시작하기

1. 복제 및 설치

git clone <repo-url> && cd mcp-server
python3 -m venv .venv
source .venv/bin/activate   # macOS / Linux / WSL
pip install -e .

또는 uv를 사용하는 경우:

git clone <repo-url> && cd mcp-server
uv venv
source .venv/bin/activate
uv pip install -e .

2. Claude Desktop에 연결

설정 스크립트를 실행하여 Claude Desktop 구성 파일을 자동으로 작성합니다:

macOS:

python setup_claude_agent.py

이 스크립트는 프로젝트의 .venv/bin/python을 가리키는 ~/Library/Application Support/Claude/claude_desktop_config.json 파일을 작성합니다.

프로젝트가 표준 위치에 있지 않은 경우 명시적으로 경로를 전달하세요:

python setup_claude_agent.py --project-path /path/to/mcp-server

Windows (WSL 사용):

python3 setup_claude_agent.py --windows --win-user <YourWindowsUser> --wsl-user <YourWSLUser>

예시:

python3 setup_claude_agent.py --windows --win-user Cam --wsl-user cam

이 스크립트는 %APPDATA%\Claude\claude_desktop_config.json 파일을 작성하고 Claude Desktop이 WSL을 통해 서버를 실행하도록 구성합니다.

3. Claude Desktop 재시작

Claude Desktop을 닫았다가 다시 엽니다. 서버가 연결되었는지 확인하려면 **설정 → 개발자(Settings → Developer)**로 이동하세요. 녹색 실행 중(running) 배지가 표시된 mcp-server를 확인할 수 있습니다.

4. 사용해 보기

Claude에게 다음과 같이 질문해 보세요:

  • "지금 몇 시야?" — get_current_time 도구 사용

  • "캘리포니아의 기상 경보를 알려줘" — weather://alerts/CA 리소스 사용

  • "위도 40.7128, 경도 -74.0060의 날씨 예보는 어때?" — 예보 리소스 사용

서버를 수동으로 시작할 필요는 없습니다. Claude Desktop이 자동으로 실행합니다.


Related MCP server: mcp-weather

사용 가능한 도구 및 리소스

유형

이름

기능

도구

get_current_time

자동 시간대 감지 기능을 포함한 현재 시간 반환

리소스

weather://alerts/{state}

미국 주별 기상 경보 (예: CA, NY)

리소스

weather://forecast/{lat}/{lon}

좌표에 대한 5단계 예보

프롬프트

analyze_weather_prompt

Claude가 전체 날씨 분석을 수행하도록 안내

프롬프트

timezone_helper_prompt

시간대 확인, 변환, 비교 지원

나만의 도구 추가하기

src/mcp_server/server.py를 열고 @mcp.tool() 데코레이터와 함께 함수를 추가하세요:

@mcp.tool()
async def my_tool(param: str) -> str:
    """Description of what this tool does."""
    return f"Result for {param}"

변경 사항을 적용하려면 Claude Desktop을 재시작하세요.

리소스 및 프롬프트에 대한 자세한 내용은 CONTRIBUTING.md를 참조하세요.

테스트 실행

pip install -e ".[dev]"   # or: uv pip install -e ".[dev]"
pytest

프로젝트 구조

src/mcp_server/
├── server.py              # MCP server entry point — register tools here
└── tools/
    ├── weather/           # Weather alerts & forecasts (NWS API)
    ├── time/              # IP-based timezone & current time
    └── conversation/      # Conversation tools

라이선스

MIT

리소스

Available Tools

4 tools
clear_old_cacheA

Clear expired weather cache entries.

Args: max_age_minutes: Maximum age in minutes before considering expired

Returns: Status message with number of entries removed

Inputs: max_age_minutes. Returns: result

get_alertsA

Get active weather alerts for a US state.

Provides current weather alerts and warnings for the specified state. Checks cache first (30 min expiry), fetches fresh if needed.

Args: state: Two-letter US state code (e.g. CA, NY)

Inputs: state (required). Returns: result

get_current_timeA

Get the current time based on the user's IP address.

This tool determines the user's timezone from their IP address using geolocation and returns the current local time in that timezone.

Args: ip_address: Optional IP address to determine timezone. If not provided or empty string, attempts to detect automatically or defaults to UTC.

Returns: Formatted string with current time, timezone, day, and ISO timestamp

Inputs: ip_address. Returns: result

get_forecastA

Get weather forecast for geographic coordinates.

Provides a 5-day forecast for the specified location. Checks cache first (60 min expiry), fetches fresh if needed.

Args: latitude: Latitude of the location (-90 to 90) longitude: Longitude of the location (-180 to 180)

Inputs: latitude (required), longitude (required). Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 4 tools

    Disambiguation5/5

    Each tool targets a distinct function: cache management, alerts, current time, and forecast. No overlap or ambiguity.

    Naming Consistency5/5

    All names follow a consistent verb_noun snake_case pattern (clear_old_cache, get_alerts, get_current_time, get_forecast).

    Tool Count4/5

    With 4 tools, the set is slightly sparse but well-scoped for a combined weather/time server. Each tool serves a clear purpose.

    Completeness3/5

    Missing current weather conditions and location-based time input; only alerts and forecast for weather, time only via IP. Notable gaps exist.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      A Model Context Protocol (MCP) server built with the mcp-framework to provide weather-related tools and data to AI clients. It enables integration of weather capabilities and custom tools into the MCP ecosystem for use with platforms like Claude Desktop.
      -
    • A
      license
      A
      quality
      D
      maintenance
      An MCP server that provides weather and time tools, enabling users to get current time, weather alerts, and forecasts through natural language with Claude Desktop.
      4
      MIT