Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Weather MCP Serverwhat's the weather like in Tokyo right now?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Weather MCP Server
A simple Model Context Protocol (MCP) server built with TypeScript that provides weather information using the Open-Meteo API.
Features
π€οΈ Get Weather: Fetch current weather data for any city worldwide
π Greet: Simple greeting tool for testing
π Uses free Open-Meteo API (no API key required)
π Built with MCP TypeScript SDK
π‘ HTTP transport support
Prerequisites
Node.js 18+
npm or yarn
Installation
Install dependencies:
npm installUsage
Development Mode
Run the server with auto-reload:
npm run devProduction Mode
Build the TypeScript code:
npm run buildStart the server:
npm startThe server will start on http://localhost:3000/mcp by default. You can change the port by setting the PORT environment variable:
PORT=8080 npm run devConnecting to the Server
Using MCP Inspector
The easiest way to test your server:
npx @modelcontextprotocol/inspectorThen connect to: http://localhost:3000/mcp
Using Claude Code
claude mcp add --transport http weather-server http://localhost:3000/mcpUsing VS Code
code --add-mcp "{\"name\":\"weather-server\",\"type\":\"http\",\"url\":\"http://localhost:3000/mcp\"}"Using Cursor
Click this deeplink
Available Tools
1. get-weather
Get current weather information for any city.
Input:
{
"city": "Sydney"
}Output:
{
"city": "Sydney, Australia",
"temperature": 22.5,
"weatherCode": 0,
"windSpeed": 15.2,
"humidity": 65,
"description": "Clear sky"
}Example queries:
"What's the weather in Tokyo?"
"Get me the current temperature in London"
"How's the weather in New York?"
2. greet
Simple greeting tool for testing the server.
Input:
{
"name": "Alice"
}Output:
{
"greeting": "Hello, Alice! Welcome to the Weather MCP Server!"
}API Information
This server uses the free Open-Meteo API which provides:
Current weather conditions
No API key required
Global coverage
Reliable geocoding
Project Structure
weather-mcp-server/
βββ src/
β βββ index.ts # Main server implementation
βββ dist/ # Compiled JavaScript (generated)
βββ package.json # Dependencies and scripts
βββ tsconfig.json # TypeScript configuration
βββ README.md # This fileDevelopment
The server is built using:
@modelcontextprotocol/sdk: MCP TypeScript SDK
Express: HTTP server
Zod: Schema validation
TypeScript: Type safety
Health Check
The server includes a health check endpoint:
curl http://localhost:3000/healthResponse:
{
"status": "ok",
"server": "weather-mcp-server",
"version": "1.0.0"
}Troubleshooting
Port already in use
If port 3000 is already in use, specify a different port:
PORT=8080 npm run devCity not found
Make sure you're using the correct city name. The API uses geocoding to find cities, so try:
Full city names: "New York" instead of "NYC"
Including country if ambiguous: "London, UK" or "London, Ontario"
License
MIT