MCP Weather Client & Server Example with Typescript
About
This is a tutorial project demonstrating the Model Context Protocol (MCP) with Anthropic’s Claude models. It includes a CLI-based client and a weather tools server that communicate via MCP over stdio.
Details
- License
- ISC license
Explore
- 🔌 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
---
- Node.js v20+
- An Anthropic API key
- NOTE: You will need credits added
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
- Node.js v20+
- An Anthropic API key
- NOTE: You will need credits added
Running
- Inclient: npm install && npm run build
- In server: npm install && npm run build
- In client: node build/index.js ../server/build/index.jsSign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



