Weather Server MCP Server

Weather Server MCP Server

By chaminda360 GitHub

TypeScript-based MCP server that implements a weather information system.

weather-server MCP-server
Overview

what is Weather Server?

Weather Server is a TypeScript-based MCP server that implements a weather information system, providing resources for accessing and updating weather data.

how to use Weather Server?

To use Weather Server, install the dependencies, configure the environment variables, and build the server. You can then integrate it with applications like Claude Desktop by adding the server configuration.

key features of Weather Server?

  • Access weather data via weather:// URIs with metadata.
  • Fetch current weather information using the fetch_weather tool.
  • Update weather information with the update_weather tool.
  • Generate summaries of weather data using the summarize_weather prompt.

use cases of Weather Server?

  1. Fetching real-time weather data for applications.
  2. Updating weather information based on user input.
  3. Generating weather summaries for reports or dashboards.

FAQ from Weather Server?

  • What programming language is Weather Server built with?

Weather Server is built using TypeScript.

  • How can I fetch weather data?

Use the fetch_weather tool with the required location parameter.

  • Is there a way to debug the server?

Yes, you can use the MCP Inspector for debugging.

Content

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.

No tools information available.

Mirror of

image-generation mcp-server
View Details

Secure MCP server for analyzing Excel files with oletools

oletools mcp-server
View Details

Mirror of

bigquery mcp-server
View Details

MCPHubs is a website that showcases projects related to Anthropic's Model Context Protocol (MCP)

mcp mcp-server
View Details
Dealx
Dealx by DealExpress

-

dealx mcp-server
View Details

Google Analytics MCP server for accessing analytics data through tools and resources

google-analytics mcp-server
View Details

A Python-based MCP server that lets Claude run boto3 code to query and manage AWS resources. Execute powerful AWS operations directly through Claude with proper sandboxing and containerization. No need for complex setups - just pass your AWS credentials and start interacting with all AWS services.

aws mcp-server
View Details