Practice
Offers a Model Context Protocol server demonstrating a weather query tool.
This repository features a practical Model Context Protocol (MCP) server developed in TypeScript, designed to demonstrate core MCP functionalities. It includes a `fetch-weather` tool that leverages Open-Meteo to provide current weather information for any specified city. The server handles input validation using Zod and communicates via `stdio`, enabling seamless integration with MCP-compatible clients like Claude Desktop. It serves as an excellent starting point for developers looking to understand or build their own MCP tools.
主要功能
01Example MCP server implementation
02Integrates a 'fetch-weather' tool for current city weather
03Ensures input validation using Zod
04Communicates via stdio for MCP client compatibility
05Utilizes Open-Meteo API without requiring an API key
061 GitHub stars
使用案例
01Learning and practicing Model Context Protocol development
02Testing integration with Model Context Protocol clients
03Developing custom AI/LLM tools that require external data through MCP