MCP Weather Client \u0026 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-alertsandget-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
.envconfiguration withANTHROPIC_API_KEY\
\ ---\ \
Getting Started\
\
Prerequisites\
\
- Node.js v20+\
- An Anthropic API key\
- NOTE: You will need credits added\
\
Running\
- In
client:npm install \u0026\u0026 npm run build\ - In
server:npm install \u0026\u0026 npm run build\ - In
client:node build/index.js ../server/build/index.js
