Educational MCP weather server

Educational MCP weather server

mcp-server-sample•bygabrielfroes

A Node.js/TypeScript MCP server that provides weather alert and forecast tools backed by the US National Weather Service API.

License: Not specified•Runtime: Awaiting documentation review•Category: search web

WHAT IT DOES

  • •get-alerts returns active weather alerts for a US state given its two-letter code.
  • •get-forecast returns the weather forecast for geographic latitude and longitude coordinates.
  • •Input validation is performed with Zod, and external NWS calls are made via fetch.
  • •The server communicates over stdio using the MCP SDK.

BEST FOR

  • •Checking active weather alerts for a US state through an MCP client.
  • •Retrieving a location's weather forecast by latitude and longitude.
  • •Learning how to build an MCP server in Node.js/TypeScript with layered architecture.

ABOUT MCP-SERVER-SAMPLE

Educational MCP weather server is cataloged as an MCP server attributed to gabrielfroes. A Node.js/TypeScript MCP server that provides weather alert and forecast tools backed by the US National Weather Service API. It is categorized under search web. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Educational MCP weather server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

What transport does the server use?

The server communicates over stdio using the MCP SDK and is started on standard input/output.

Which weather data source does it use?

It uses the US National Weather Service API.

What are the two MCP tools offered?

get-alerts for active alerts by state and get-forecast for forecasts by latitude and longitude.

Upstream README

View this exact version on GitHub

README.md · 30f5b7e3a539 · Fetched 2026-11-13 09:07:14 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

Exemplo de Servidor MCP

Criado para fins educacionais no canal Código Fonte TV, este projeto demonstra como construir um servidor MCP com integração a APIs externas e validação de dados.

Este repositório contém um exemplo de implementação de um servidor MCP (Model Context Protocol) em Node.js/TypeScript, que fornece duas ferramentas para obter informações meteorológicas usando a API do National Weather Service (NWS) dos EUA.

Funcionalidades

  • get-alerts: Retorna alertas meteorológicos ativos para um estado (código de duas letras, ex: CA, NY).
  • get-forecast: Retorna a previsão do tempo para coordenadas geográficas (latitude, longitude).
  • Validação de entrada usando Zod.
  • Integração com a API do NWS usando fetch (camada de infraestrutura).
  • Comunicação via stdio usando o protocolo MCP (@modelcontextprotocol/sdk).

Arquitetura

O projeto segue uma arquitetura em camadas inspirada em padrões de Domain-Driven Design (DDD):

  • Domain (src/domain): Definição de interfaces e tipos que representam as estruturas de dados (ex: AlertFeature, ForecastPeriod, AlertsResponse).

  • Infrastructure (src/infrastructure): Implementação de serviços externos, como o NWSApiService, responsável por realizar as chamadas HTTP à API do NWS.

  • Application (src/application): Contém a lógica de negócio no WeatherService, que processa e formata os dados vindos da infraestrutura.

  • Interface (src/interface): Inclui controladores (WeatherToolsController) que registram as ferramentas no servidor MCP, definem schemas de validação e retornam os resultados.

  • Entry Point (src/main.ts): Inicializa o McpServer, configura o transporte (StdioServerTransport), instancia serviços e controladores, e inicia escuta em stdio.

A estrutura de pastas é a seguinte:

src/
├── domain/
│   └── models/           # Interfaces de domínio
├── infrastructure/
│   └── services/         # Implementações da API externa (NWS)
├── application/
│   └── services/         # Lógica de negócio e formatação de dados
├── interface/
│   └── controllers/      # Registro das ferramentas MCP e validação
└── main.ts               # Ponto de entrada do servidor
build/                     # Código JavaScript compilado

Instalação

git clone <REPOSITÓRIO_URL>
cd mcp-server-sample
npm install
npm run build

Uso

Após o build, você pode executar o servidor diretamente:

node build/main.js

Ou, se registrado como binário (weather):

npm link
weather

O servidor iniciará na saída padrão (stdio) e aguardará requisições MCP.

Contribuição

Pull requests são bem-vindos! Sinta-se à vontade para abrir issues e discutir melhorias.

Código Fonte TV

Para mais detalhes sobre a implementação, assista ao vídeo no canal Código Fonte TV.

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Educational MCP weather server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/mcp-server-sample)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

Related search web MCP Servers

Alternative and complementary servers in the same category

View all in search web →

An MCP server that merges Google Search Console history with a live first-party crawl of your site to produce a prioritised, evidence-backed technical SEO audit inside Claude, complete with paste-ready fixes.

Repository stats unavailable
Search & Web Research

An MCP server that offers intelligent web search using OpenAI reasoning models, with support for fast iterations and deep research.

94
Search & Web Research