Overview
what is MCP Server Sample?
MCP Server Sample is an educational project that demonstrates how to build a Model Context Protocol (MCP) server with integration to external APIs and data validation.
how to use MCP Server Sample?
To use the MCP Server Sample, clone the repository, install the dependencies, build the project, and run the server. You can then make requests to the server to get weather information.
key features of MCP Server Sample?
- get-alerts: Returns active weather alerts for a specified state (e.g.,
CA,NY). - get-forecast: Provides weather forecasts for geographical coordinates (latitude, longitude).
- Input validation using Zod.
- Integration with the National Weather Service API.
- Communication via stdio using the MCP protocol.
use cases of MCP Server Sample?
- Retrieving real-time weather alerts for specific regions.
- Obtaining weather forecasts based on user-provided coordinates.
- Educational purposes for learning about server implementation and API integration.
FAQ from MCP Server Sample?
- What programming language is used in this project?
The project is implemented in Node.js with TypeScript.
- How can I contribute to this project?
You can contribute by opening pull requests or issues on the GitHub repository.
- Where can I find more details about the implementation?
For more details, you can watch the video on the Código Fonte TV channel.