
weather server
TypeScript-based MCP server that implements a weather information system.
Repository Info
About This Server
TypeScript-based MCP server that implements a weather information system.
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
Weather Server MCP Server
Test weather server tool
This is a TypeScript-based MCP server that implements a weather information system. It demonstrates core MCP concepts by providing:
- Resources representing weather data with URIs and metadata
- Tools for fetching and updating weather information
- Prompts for generating weather summaries
Features
Resources
- List and access weather data via
weather://URIs - Each weather entry has a location, temperature, and metadata
- JSON mime type for structured data access
Tools
-
fetch_weather- Fetch current weather information- Takes location as a required parameter
- Retrieves weather data from an external API
-
update_weather- Update weather information- Takes location and new weather data as required parameters
- Updates the weather data in server state
Prompts
summarize_weather- Generate a summary of the current weather data- Includes all weather entries as embedded resources
- Returns structured prompt for LLM summarization
Development
Install dependencies:
npm install
Rename .envexample to .env:
mv .envexample .env
Update OPENWEATHER_API_KEY in the .env file:
OPENWEATHER_API_KEY=Your_Own_OpenWeather_API_KEY
Build the server:
npm run build
For development with auto-rebuild:
npm run watch
Installation
To use with Claude Desktop, add the server config:
On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"weatherserver": {
"command": "/path/to/weatherserver/build/index.js"
}
}
}
Debugging
Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector, which is available as a package script:
npm run inspector
The Inspector will provide a URL to access debugging tools in your browser.
Quick Start
Clone the repository
git clone https://github.com/chaminda360/weather-serverInstall dependencies
cd weather-server
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.