Weather MCP
Weather MCP
CLI 명령줄과 MCP 서버 두 가지 방식으로 사용할 수 있는 간단하고 사용하기 쉬운 날씨 조회 MCP 도구입니다.
기능 특징
🌤️ 실시간 날씨 조회 - 전 세계 모든 도시의 현재 날씨 확인
🔧 CLI 지원 - 명령줄에서 직접 날씨 조회
🤖 MCP 프로토콜 - Claude, Cursor 등 AI 클라이언트 지원
🌍 전 세계 커버리지 - 중국어, 영어 등 다양한 언어의 도시명 지원
⚡ 무료 API - Open-Meteo 무료 날씨 서비스 사용, API Key 불필요
📝 타입 안전성 - TypeScript + Zod를 통한 완벽한 타입 지원
Related MCP server: Weather MCP Server
설치
방식 1: npm 전역 설치 (권장)
npm install -g weather-mcp방식 2: npx 직접 사용
npx weather-mcp weather 北京방식 3: 소스 코드 설치
git clone https://github.com/tengzhijian/weather-mcp.git
cd weather-mcp
npm install
npm run buildCLI 사용
# 查询天气
weather-mcp weather 北京
weather-mcp weather Shanghai
# 查看帮助
weather-mcp --help
weather-mcp --version예시 출력
{
"ok": true,
"data": {
"city": "北京 (中国)",
"temperature": 22,
"humidity": 70,
"description": "多云",
"windSpeed": 9.3,
"updatedAt": "2024-01-15T08:30:00.000Z"
}
}MCP 서버 설정
Claude Desktop
%APPDATA%/Claude/settings.json(Windows) 또는 ~/Library/Application Support/Claude/settings.json(Mac)을 편집합니다:
{
"mcpServers": {
"weather": {
"command": "npx",
"args": ["-y", "weather-mcp", "--mcp"]
}
}
}Cursor
Cursor Settings → MCP에서 다음을 추가합니다:
{
"mcpServers": {
"weather": {
"command": "npx",
"args": ["-y", "weather-mcp", "--mcp"]
}
}
}로컬 개발 버전
소스 코드에서 실행하는 경우:
{
"mcpServers": {
"weather": {
"command": "node",
"args": ["/path/to/weather-mcp/dist/index.js", "--mcp"]
}
}
}사용 가능한 도구
getWeather
지정된 도시의 날씨 정보를 조회합니다.
매개변수:
city(string, 필수): 도시 이름, 예: 베이징, 상하이, 광저우, London, Tokyo
반환값:
city: 도시 이름 (국가 포함)temperature: 온도 (섭씨)humidity: 습도 (백분율)description: 날씨 설명 (맑음, 흐림 등)windSpeed: 풍속 (km/h)updatedAt: 데이터 업데이트 시간
listSupportedCities
조회 가능한 도시 목록 예시를 가져옵니다.
반환값:
cities: 주요 도시 목록 예시note: 설명 (실제로는 전 세계 모든 도시 지원)
AI 클라이언트 사용 예시
설정이 완료되면 Claude, Cursor 등의 클라이언트에서 직접 질문할 수 있습니다:
"오늘 베이징 날씨 어때?" "내일 상하이에 비가 올까?" "뉴욕 날씨 조회해줘"
AI가 자동으로 getWeather 도구를 호출하여 날씨 정보를 가져옵니다.
개발
# 安装依赖
npm install
# 开发模式
npm run dev weather 北京
# 运行测试
npm test
# 类型检查
npm run typecheck
# 构建
npm run build기술 스택
TypeScript - 타입 안전한 JavaScript
MCP SDK - Model Context Protocol
Commander.js - CLI 프레임워크
Zod - 스키마 검증
Vitest - 테스트 프레임워크
Open-Meteo - 무료 날씨 API
프로젝트 구조
weather-mcp/
├── src/
│ ├── index.ts # 入口文件
│ ├── cli.ts # CLI 命令
│ ├── mcp-server.ts # MCP Server
│ ├── weather-gateway.ts # 天气 API 封装
│ └── version.ts # 版本号
├── tests/ # 测试文件
├── .github/workflows/ # GitHub Actions
├── package.json
├── tsconfig.json
└── README.mdCI/CD
프로젝트는 GitHub Actions를 사용하여 자동화되어 있습니다:
CI: PR 및 Push 시마다 자동으로 테스트 실행 (Node.js 18/20/22)
Release: 수동 트리거를 통한 npm 배포
라이선스
감사의 말
날씨 데이터는 Open-Meteo에서 제공하는 무료 API를 사용합니다.
Model Context Protocol 사양을 준수합니다.
This server cannot be deployed
Maintenance
Related MCP Connectors
An MCP server for weather information by @kulybaba
An MCP server for weather information by @kulybaba
MCP server for weather with reasoning — umbrella advice, outdoor checks, city comparisons.
Hosted MCP server for Xweather weather data: conditions, forecasts, alerts, and more.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that provides real-time weather data, hourly forecasts, and daily summaries using the free Open-Meteo API with no API key required. It enables users to search for weather conditions by specific coordinates or city names across multiple measurement units.2MIT
- FlicenseNot gradedqualityDmaintenanceA production-ready MCP server that provides real-time weather information, forecasts, and alerts to LLM clients using the Open-Meteo API, with support for 26+ global cities, dual transport (STDIO/HTTP), and Docker deployment.-
- AlicenseNot gradedqualityCmaintenanceA no-API-key-required MCP server that wraps Open-Meteo APIs to provide geocoding and weather forecast data, enabling city lookups and multi-day forecasts through tools, resources, and prompts.MIT
- FlicenseNot gradedqualityDmaintenanceA minimal MCP server that provides current weather and forecasts for any city using the free Open-Meteo API, no API key required.7 npm-