This is a highly unstable repository made for demo purposes, do not use without understanding the contents of the repository.
I have built two mcp servers in this public repo I want you to create a local static website which uses these and shows of the best time and local accomodation which are available with the local weather etc. Just show me the local website, start the page and don't take it down yet. The website should be in moderns colors (darkmode graphite with neon pink as accent) https://github.com/notawar/mcp-demo
A collection of Model Context Protocol (MCP) servers that provide access to weather data and Airbnb location information through REST API integrations. This repository demonstrates how to build functional MCP servers with comprehensive filtering, error handling, and documentation.
This repository contains two fully functional MCP servers:
- Current Weather: Real-time weather data for any location worldwide
- Weather Forecasts: 1-5 day weather predictions with detailed information
- Location Search: Find and validate locations with coordinates
- Multiple Units: Support for Celsius, Fahrenheit, and Kelvin
- OpenWeatherMap Integration: Uses official weather API
- Listing Search: Find accommodations with advanced filtering
- Property Details: Comprehensive listing information
- Neighborhood Discovery: Explore popular areas with pricing insights
- Advanced Filters: Price range, property type, guests, dates, instant booking
- Mock Data Service: Demonstrates functionality with realistic data
- Node.js 18+ - Download here
- OpenWeatherMap API Key - Get free key
- OpenCage API Key (optional) - Get free key for better location accuracy in Airbnb server
- Clone the repository:
git clone https://github.com/NotAwar/mcp-demo.git
cd mcp-demo- Install dependencies:
npm run install-all- Set up environment variables:
# Required for Weather Server
export OPENWEATHER_API_KEY=your_openweather_api_key
# Optional for Airbnb Server (improves location accuracy)
export OPENCAGE_API_KEY=your_opencage_api_key- Build both servers:
npm run build- Start the servers:
# Run both servers in development mode
npm run dev
# Or run them individually
cd weather-server && npm run dev
cd airbnb-server && npm run devmcp-demo/
├── README.md # This file - main documentation
├── package.json # Workspace configuration
├── .gitignore # Git ignore rules
├── weather-server/ # Weather MCP Server
│ ├── package.json # Weather server dependencies
│ ├── tsconfig.json # TypeScript configuration
│ ├── README.md # Weather server documentation
│ ├── src/
│ │ └── index.ts # Weather server implementation
│ └── build/ # Compiled JavaScript (generated)
└── airbnb-server/ # Airbnb MCP Server
├── package.json # Airbnb server dependencies
├── tsconfig.json # TypeScript configuration
├── README.md # Airbnb server documentation
├── src/
│ └── index.ts # Airbnb server implementation
└── build/ # Compiled JavaScript (generated)
npm run build # Build all servers
npm run dev # Run all servers in development mode
npm run start # Run all servers in production mode
npm run clean # Clean all build directories
npm run install-all # Install all dependenciescd weather-server # or airbnb-server
npm run build # Build this server
npm run dev # Run in development mode
npm run start # Run in production mode
npm run clean # Clean build directory
npm run watch # Watch for changes and rebuildThe Weather Server provides three main tools:
{
"name": "get_current_weather",
"arguments": {
"location": "Paris,FR",
"units": "metric"
}
}{
"name": "get_weather_forecast",
"arguments": {
"location": "Tokyo,JP",
"days": 5,
"units": "metric"
}
}{
"name": "search_locations",
"arguments": {
"query": "Springfield",
"limit": 5
}
}→ See detailed Weather Server documentation
The Airbnb Server provides three main tools:
{
"name": "search_airbnb_listings",
"arguments": {
"location": "Barcelona",
"checkin": "2024-06-15",
"checkout": "2024-06-22",
"guests": 4,
"priceMin": 80,
"priceMax": 200,
"propertyType": "apartment",
"instantBook": true
}
}{
"name": "get_listing_details",
"arguments": {
"listingId": "listing_1_1634567890"
}
}{
"name": "search_neighborhoods",
"arguments": {
"location": "Amsterdam",
"limit": 5
}
}→ See detailed Airbnb Server documentation
| Variable | Required | Description | Where to get |
|---|---|---|---|
OPENWEATHER_API_KEY |
Yes (Weather) | OpenWeatherMap API key | openweathermap.org |
OPENCAGE_API_KEY |
No (Airbnb) | Geocoding API for location accuracy | opencagedata.com |
Linux/macOS:
export OPENWEATHER_API_KEY=your_key_here
export OPENCAGE_API_KEY=your_key_hereWindows (PowerShell):
$env:OPENWEATHER_API_KEY="your_key_here"
$env:OPENCAGE_API_KEY="your_key_here"Windows (Command Prompt):
set OPENWEATHER_API_KEY=your_key_here
set OPENCAGE_API_KEY=your_key_here- Build and start a server:
cd weather-server
npm run build
npm run start-
Test with MCP client or send JSON-RPC requests to stdin
-
Example JSON-RPC request:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_current_weather",
"arguments": {
"location": "London,UK",
"units": "metric"
}
}
}Both servers can be integrated into MCP-compatible applications like:
- Claude Desktop
- Custom MCP clients
- IDE extensions
- Chatbot frameworks
- Modify the TypeScript source in
src/index.ts - Update the schema and tool definitions
- Build and test your changes
- Update documentation as needed
Both servers follow the same pattern:
- Server Setup: MCP server initialization with capabilities
- Tool Registration: Define available tools and schemas
- Request Handling: Process tool calls and return formatted responses
- Error Handling: Comprehensive error management
- Data Processing: Transform API responses into user-friendly formats
Key dependencies used across both servers:
- @modelcontextprotocol/sdk: Core MCP functionality
- node-fetch: HTTP requests to external APIs
- zod: Runtime type validation and schema definition
- TypeScript: Type safety and modern JavaScript features
"API key not configured"
- Solution: Set the required environment variable for the API key
"Location not found"
- Solution: Check spelling, try different format (e.g., "City,Country")
"Build errors"
- Solution: Run
npm installand ensure Node.js 18+ is installed
"Permission denied"
- Solution: Check file permissions and ensure proper npm installation
- Check the individual server README files
- Verify all environment variables are set correctly
- Ensure dependencies are installed with
npm run install-all - Check that you're using Node.js 18 or higher
MIT License - feel free to use this code for your own MCP server projects!
Contributions are welcome! Please feel free to:
- Add new MCP servers
- Improve existing functionality
- Enhance documentation
- Fix bugs or add tests