Skip to main content
Glama
tengzhijian

Weather MCP

by tengzhijian

Weather MCP

CI npm version License: MIT

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 build

CLI 사용

# 查询天气
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

기술 스택

프로젝트 구조

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.md

CI/CD

프로젝트는 GitHub Actions를 사용하여 자동화되어 있습니다:

  • CI: PR 및 Push 시마다 자동으로 테스트 실행 (Node.js 18/20/22)

  • Release: 수동 트리거를 통한 npm 배포

라이선스

MIT

감사의 말

A
license - permissive license
Not graded
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    An 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.
    1
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    A 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.
  • A
    license
    Not graded
    quality
    C
    maintenance
    A 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
  • F
    license
    Not graded
    quality
    B
    maintenance
    A minimal MCP server that provides current weather and forecasts for any city using the free Open-Meteo API, no API key required.
    11

View all related MCP servers

Related MCP Connectors

  • Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer

  • MCP server for AI dialogue using various LLM models via AceDataCloud

  • MCP server for GLM chat completions using Zhipu AI models via AceDataCloud

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/tengzhijian/weather-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server