
ezh0v/weather-mcp-server
Deployment & DevOps이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
ezh0v/weather-mcp-server는 [[T0]에서 가져온 MCP 서버 후보입니다.
개요
ezh0v/weather-mcp-server는 [[T0]에서 가져온 MCP 서버 후보입니다.
개요(AI 번역)
날씨 API MCP 서버
버그 보고 | 요청 기능
Claude와 같은 AI 어시스턴트가 실시간 기상 데이터를 검색하고 해석할 수 있도록 하는 경량 모델 컨텍스트 프로토콜(MCP) 서버입니다.
클로드 데스크톱에 설치 중
Claude Desktop에서 MCP 서버를 사용하려면 Claude 설정에 추가하세요:
1. 로컬 모드
개인 계정에서 WeatherAPI에서 API 키를 받을 수 있습니다.
2. 원격 모드
소스에서 빌드
go를 사용해 cmd/github-mcp-server 디렉터리에서 바이너리를 만들 수 있습니다.
Docker 컨테이너와 함께하는 MCP 사용
1. 도커 이미지 빌드:
2. 도커 컨테이너 실행:
your-api-key를 실제 WeatherAPI API 키로 교체하세요.
도구
-
current_weather - 도시의 현재 날씨를 파악합니다
-
city: 도시 이름 (문자열, 필수)
프로젝트 구조
이 프로젝트는 여러 주요 디렉터리로 구성되어 있습니다:
테스트
새로운 기능을 추가할 경우, 반드시 해당 기능을 위한 테스트도 포함해 주세요.
1. 모의 도구 설치:
설치 가이드를 참고하세요 go.uber.org/mock.
2. 다음 명령어를 사용하여 모의 파일을 생성합니다:
3. 단위 테스트를 실행하려면:
기여
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.
A lightweight Model Context Protocol (MCP) server that enables AI assistants like Claude to retrieve and interpret real-time weather data.
Installing on Claude Desktop
To use your MCP server with Claude Desktop, add it to your Claude configuration:
1. Local mode
{
"mcpServers": {
"weather-mcp-server": {
"command": "/path/to/weather-mcp-server",
"env": {
"WEATHER_API_KEY": "your-api-key"
}
}
}
}
You can get an API key from your personal account on WeatherAPI.
2. Remote mode
{
"mcpServers": {
"weather-mcp-server": {
"url": "http://host:port/sse"
}
}
}
Build from source
You can use go to build the binary in the cmd/github-mcp-server directory.
go build -o weather-mcp-server ./cmd/weather-mcp-server
Using MCP with Docker Containers
1. Build the Docker Image:
docker build -t weather-mcp-server .
2. Run the Docker Container:
docker run -e WEATHER_API_KEY=your-api-key -d --name weather-mcp-server -p 8000:8000 weather-mcp-server
Replace your-api-key with your actual WeatherAPI API key.
Tools
-
current_weather - Gets the current weather for a city
city: The name of the city (string, required)
Project Structure
The project is organized into several key directories:
├── cmd
│ └── weather-mcp-server
├── internal
│ └── server
│ ├── handlers # MCP handlers
│ ├── services # Business logic layer
│ │ ├── core # Core application logic
│ │ └── mock # Mock services for testing
│ ├── tools # MCP tools
│ └── view # Templates for displaying messages
└── pkg
Testing
설치
docker run -e WEATHER_API_KEY=your-api-key -d --name weather-mcp-server -p 8000:8000 weather-mcp-server설정
{
"mcpServers": {
"weather-mcp-server": {
"command": "/path/to/weather-mcp-server",
"env": {
"WEATHER_API_KEY": "your-api-key"
}
}
}
}