mcpField
M
MCP Weather Client & Server Example with Typescript

MCP Weather Client & Server Example with Typescript

Local
github.com/ijshd7Media & Design1Updated 73w ago

About MCP Weather Client & Server Example with Typescript

This TypeScript tutorial project demonstrates MCP with a CLI client and a weather tools server. The client uses Anthropic Claude to call weather alert and forecast tools over stdio.

Key features

  1. 01TypeScript CLI client and server
  2. 02Weather alert and forecast tools
  3. 03MCP communication over stdio
  4. 04Anthropic Claude tool calls
  5. 05API key configuration through .env

Use cases

  1. 01Learn MCP client-server communication
  2. 02Try weather alerts through an AI client
  3. 03Request weather forecasts with Claude

MCP support

Includes an MCP server that exposes weather alert and forecast tools, plus a CLI client that calls them over stdio.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

MCP Weather Client & Server Example with Typescript

This is a tutorial project demonstrating the use of the Model Context Protocol (MCP) with Anthropic's Claude models. The app includes a simple CLI-based client and a weather tools server, which communicates via MCP over stdio.

Features

  • 🔌 MCP-compliant server exposing tools like get-alerts and get-forecast
  • 🤖 CLI client using Anthropic Claude (via the @anthropic-ai/sdk) to call tools
  • 🛠️ Written in TypeScript for the client and server
  • 🌦️ Example tools provide weather alert and forecast info
  • 🔐 Supports .env configuration with ANTHROPIC_API_KEY

Getting Started

Prerequisites
Running
  • In client: npm install && npm run build
  • In server: npm install && npm run build
  • In client: node build/index.js ../server/build/index.js

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.