
mschneider82/mcp-openweather
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
mcp server for openweather 무료 api
개요
무료 OpenWeatherMap API를 사용하여 현재 날씨와 5 일 예측을 제공하는 간단한 MCP 서비스. - 현재 기상 조건 - 5 일 일기 예보 - 구성 단위 (Celsius/Fahrenheit/Kelvin) - 다국어 지원 - 간단한 MCP 통합 1. OpenWeatherMap API 키 받기 https://openweathermap.org/api 2. 복부 저장소: Smithery를 통해 Claude Desktop용 MCP Weather Service를 자동으로 설치하십시오. API 키 누락: FATAL: OWM API KEY 환경 변수 설정 잘못된 도시 : 현재 날씨 오류 : 현재 날씨를 태치 못했습니다. 도시가 발견되지 않았습니다. 네트워크 문제: fetch 예측 실패: context 마감 초과 감사합니다! 다음 단계를 따르십시오:
개요(AI 번역)
무료 OpenWeatherMap API를 사용하여 현재 날씨와 5 일 예측을 제공하는 간단한 MCP 서비스.
특징
- 현재 기상 조건
- 5일 날씨 예보
- 구성 단위 (Celsius/Fahrenheit/Kelvin)
- 다국어 지원
- 간단한 MCP 통합
필수품
- 이동 1.20+
- OpenWeatherMap API 키
설치
-
OpenWeatherMap API 키 받기 https://openweathermap.org/api
-
복부 저장소:
-
구조:
Smithery를 통해 설치
Smithery를 통해 Claude Desktop용 MCP Weather Service를 자동으로 설치하십시오.
구성
필요한 환경 변수 설정:
사용법
MCP 모수
예제 응답
오류 처리
일반적인 오류 시나리오 :
API 키 누락: FATAL: OWM API KEY 환경 변수 설정
잘못된 도시 : 현재 날씨 오류 : 현재 날씨를 태치 못했습니다. 도시가 발견되지 않았습니다.
네트워크 문제: fetch 예측 실패: context 마감 초과
개발
감사합니다! 다음 단계를 따르십시오:
포크 저장소
본문 바로가기
변경 사항
지점에 푸시
Pull 요청 만들기
라이센스
MIT 라이센스 - 자세한 내용은 라이센스 참조
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.
MCP Weather Service
A simple MCP service that provides current weather and 5-day forecast using the free OpenWeatherMap API.
Features
- Current weather conditions
- 5-day weather forecast
- Configurable units (Celsius/Fahrenheit/Kelvin)
- Multi-language support
- Simple MCP integration
Prerequisites
- Go 1.20+
- OpenWeatherMap API key
Installation
-
Get OpenWeatherMap API key from https://openweathermap.org/api
-
Clone repository:
git clone https://github.com/mschneider82/mcp-openweather.git cd mcp-openweather -
Build:
go build -o mcp-weather
Installing via Smithery
To install MCP Weather Service for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @mschneider82/mcp-openweather --client claude
Configuration
Set required environment variable:
export OWM_API_KEY="your_api_key_here"
Usage
"mcpServers": {
"mcp-openweather": {
"command": "/home/YOURUSER/git/mcp-openweather/mcp-openweather",
"env": {
"OWM_API_KEY": "PUT_API_KEY_HERE"
}
}
}
MCP Parameters
{
"tool": "weather",
"params": {
"city": "Berlin", // Required
"units": "c", // Optional (c|f|k)
"lang": "en" // Optional (en|de|fr|...)
}
}
Example Response
Current weather for München:
Conditions: Klarer Himmel
Now: 17.78 metric
High: 18.66 metric
Low: 17.36 metric
Pressure: 1017
Humidity: 40
FeelsLike: 16.66
Wind Speed: 1.79
Wind Degree: 61
Sunrise: 1747107429 Unixtime
Sunset: 1747161784 Unixtime
Weather Forecast for München:
Date & Time: 2025-05-13 12:00:00 +0000 UTC
Conditions: Clear Klarer Himmel
Temp: 17.78
High: 18.93
Low: 17.78
Date & Time: 2025-05-13 15:00:00 +0000 UTC
Conditions: Clear Klarer Himmel
Temp: 18.33
High: 19.44
Low: 18.33
Date & Time: 2025-05-13 18:00:00 +0000 UTC
Conditions: Clear Klarer Himmel
Temp: 16.32
High: 16.32
Low: 15.59
Date & Time: 2025-05-13 21:00:00 +0000 UTC
Conditions: Clear Klarer Himmel
Temp: 9.18
High: 9.18
Low: 9.18
...
Error Handling
Common error scenarios:
Missing API key: FATAL: OWM_API_KEY environment variable not set
Invalid city: current weather error: failed to fetch current weather: city not found
Network issues: failed to fetch forecast: context deadline exceeded
Development
Contributions welcome! Please follow these steps:
설치
npx -y @smithery/cli install @mschneider82/mcp-openweather --client claude설정
"mcpServers": {
"mcp-openweather": {
"command": "/home/YOURUSER/git/mcp-openweather/mcp-openweather",
"env": {
"OWM_API_KEY": "PUT_API_KEY_HERE"
}
}
}