Supports containerization with multi-stage Docker builds for production deployment with health checks and security features
Provides complete Kubernetes deployment manifests including deployment configurations, services, ingress controllers, and automated scaling with rolling updates
MCP Weather Server
A streamable HTTP MCP (Model Context Protocol) server for getting weather data via the Open-Meteo API.
π Features
Streamable HTTP Transport: Compatible with MCP 2025-03-26 specification
Session Management: Support for persistent sessions with unique IDs
Weather Tools: Three main tools for geolocation and weather data
REST API: Health endpoint for monitoring
Kubernetes Ready: Docker containerization and K8s deployment manifests
Local City Search: CSV-based local city database for offline search
π Project Structure
π¦ Requirement
You need to import on flowise a new agent "Agentflows"
π¦ Installation
π§ Configuration
The server uses the following environment variables:
PORT: Listening port (default: 3000)
Example:
π οΈ Available MCP Tools
1. search_location
Search for GPS coordinates of a city or location by name using the Open-Meteo geocoding API.
Parameters:
city_name(string): Name of the city or location to search forcountry(string, optional): Country name to narrow the searchlimit(number, optional): Maximum number of results to return (default: 5, max: 10)
Example response:
2. search_local_cities
Search for cities in the local CSV database for offline functionality and faster local search.
Parameters:
city_name(string): Name of the city to search for (case insensitive partial match)exact_match(boolean, optional): Whether to search for exact match or partial match (default: false)limit(number, optional): Maximum number of results to return (default: 10, max: 50)
Example response:
3. get_weather
Get current weather information for a location.
Parameters:
latitude(number): Latitude in decimal degrees (-90 to 90)longitude(number): Longitude in decimal degrees (-180 to 180)location_name(string, optional): Optional location name for display
Example response:
4. stream_weather
Start streaming weather data with periodic updates.
Parameters:
latitude(number): Latitude in decimal degrees (-90 to 90)longitude(number): Longitude in decimal degrees (-180 to 180)location_name(string, optional): Optional location name for displayinterval_seconds(number, default: 60): Update interval in seconds
π HTTP Endpoints
Server Health
Returns server status:
MCP Endpoint
Main endpoint for MCP communications. Supports:
POST: Initialization and request sendingGET: SSE stream establishment for responsesDELETE: Session termination
π Usage Example with MCP Client
1. Session Initialization
2. List Available Tools
3. Call Weather Tool
π§ͺ Testing
Quick Testing
Comprehensive Testing
The project includes various test scripts organized in the test/ directory:
For more testing options, see test/README.md.
π³ Container Build & Kubernetes Deployment
This section describes how to containerize the MCP Weather Sample application and deploy it to a Kubernetes cluster.
π¦ Containerization Overview
The application uses a multi-stage Docker build approach for optimal production deployment:
Build Stage: Compiles TypeScript source code
Production Stage: Creates minimal runtime image with only production dependencies
Security: Runs as non-root user with minimal privileges
Health Checks: Built-in container health monitoring
ποΈ Docker Build Process
Automated Build & Deployment
Manual Docker Operations
Docker Image Details
Base Image:
node:20-alpine(lightweight Linux distribution)Final Size: ~150MB (optimized with multi-stage build)
Port: 8080 (configurable via
PORTenvironment variable)Health Check: Built-in HTTP health endpoint monitoring
User: Non-root user (
nextjs:nodejs) for security
β Kubernetes Deployment Architecture
Deployment Components
The Kubernetes deployment includes:
Deployment: 3 replicas with rolling updates
Service: ClusterIP service exposing port 80β8080
ConfigMap: Environment configuration management
Ingress: External traffic routing with CORS support
Health Probes: Startup, liveness, and readiness checks
Resource Configuration
High Availability Features
3 Replicas: Ensures service availability during pod failures
Rolling Updates: Zero-downtime deployments
Health Checks: Automatic pod restart on failure
Resource Limits: Prevents resource exhaustion
CORS Configuration: Proper header handling for MCP sessions
π Deployment Options
Option 1: All-in-One Deployment
Option 2: Component-by-Component
Option 3: Automated Script
π§ Configuration Management
Environment Variables
Configure the application through the ConfigMap:
Ingress Configuration
π§ͺ Testing Deployment
Quick Validation
Comprehensive Testing
π Monitoring & Troubleshooting
Checking Deployment Status
Common Troubleshooting
π Scaling & Updates
Horizontal Scaling
Rolling Updates
For complete deployment instructions and advanced configurations, see KUBERNETES_DEPLOYMENT.md.
βοΈ Claude Desktop Integration
The project includes pre-configured Claude Desktop configurations in the claude-configuration/ directory:
Available configurations:
Basic:
claude_config.json- Minimal setupDetailed:
claude_config_detailed.json- Full optionsHTTP:
claude_config_http.json- HTTP transport specific
For detailed setup instructions, see claude-configuration/README.md.
π Using MCP Inspector
You can use the official MCP Inspector to visually explore and test your weather server tools in a user-friendly interface.
Installation and Setup
Install MCP Inspector (requires Node.js):
npx @modelcontextprotocol/inspectorStart your weather server:
PORT=8080 npm startConfigure MCP Inspector:
Server URL:
http://localhost:8080/mcpTransport:
HTTP (Streamable)Protocol Version:
2024-11-05
Visual Interface Features

The MCP Inspector provides:
π οΈ Tools Explorer: Browse all available tools (
search_location,get_weather,stream_weather)π Interactive Forms: Easy-to-use forms for entering tool parameters
π― Real-time Testing: Execute tools and see live responses
π Response Viewer: JSON-formatted results with syntax highlighting
π Session Management: Visual session state and connection status
π Request/Response History: Track all your API interactions
Example Workflow
Connect to your server using the Inspector
Explore the three available weather tools
Test location search:
Tool:
search_locationParameters:
city_name: "Paris"
Get weather data:
Tool:
get_weatherParameters: Use coordinates from previous search
Monitor streaming:
Tool:
stream_weatherWatch real-time weather updates
Benefits
No coding required: Test your MCP server without writing client code
Visual debugging: See exactly what data flows between client and server
Tool validation: Verify parameter schemas and response formats
Rapid prototyping: Quickly iterate on your MCP server implementation
The Inspector is particularly useful during development to ensure your weather server works correctly before integrating it into larger applications.
ποΈ Architecture
Express.js: HTTP server
MCP SDK: MCP protocol implementation with StreamableHTTPServerTransport
Open-Meteo API: Weather data source
TypeScript: Development language with compilation to JavaScript
Integrate MCP server on flowise (lowcode GenAI tool)
On flowise initialise an agentflow

Retrieve MCP configuration through MCP inspector
Copy/Paste form "Server Entry" on Inspector interfaceConfigure a "MCP Custom" tool and add exposed toolexposed by the MCP server on flowise add MCP configuration specifciation copied from Inspector

π Specifications
MCP Protocol: Version 2024-11-05 and 2025-03-26
Transport: Streamable HTTP with SSE support
Data Format: JSON-RPC 2.0
Weather API: Open-Meteo
π Useful Links
π License
This project is a demonstration example based on open-meteo-mcp.