MCP Weather

MCP Weather

A TypeScript-based Model Context Protocol server that enables Claude Desktop to fetch real-time weather data via external weather APIs. It provides a simple integration for users to query current weather information through natural language interactions.

Category
Visit Server

README

MCP Weather - Claude Desktop Integration

This project is an example MCP (Model Context Protocol) server designed for use with the Claude Desktop application. It is built to work seamlessly with Claude Desktop.

Features

  • TypeScript-based MCP server
  • Weather query via OpenWeather API
  • Easy integration with Claude Desktop

Project Structure

.
├── package.json
├── tsconfig.json
├── src/
│   └── index.ts
├── claude_desktop_config.json

Installation

Requirements

  • Node.js (v16 or higher)
  • npm
  • Claude Desktop (https://desktop.anthropic.com/)

Setup

  1. Clone the repository:
    git clone <repository-url>
    cd mcp-weather
    
  2. Install dependencies:
    npm install
    
  3. Create a .env file and fill it as follows:
    WEATHER_API_URL=https://api.weatherapi.com/v1/current.json
    WEATHER_API_KEY=<your_API_KEY>
    

Claude Desktop Integration

  1. In Claude Desktop, go to File -> Settings -> Developer -> Edit Config.

  2. Add a block similar to the example below to the config file (edit the file paths to match your own system):

    {
      "mcpServers": {
        "weather": {
          "command": "npx",
          "args": ["tsx", "C:/your/path/mcp-weather/src/index.ts"],
          "cwd": "C:/your/path/mcp-weather"
        }
      }
    }
    

    Note: Replace C:/your/path/ with the actual path to your project on your computer.

  3. Save the settings and restart Claude Desktop.

.env File and Path Setting

In src/index.ts, the path to the .env file is set to the project root by default:

import dotenv from "dotenv";
dotenv.config({
  // Path to your .env file. Edit as needed, e.g.: path: "C:/your/path/.env"
  path: ".env", // By default, uses the .env file in the project root
});

If your .env file is in a different directory, update the path parameter accordingly.

Usage

To start the project:

npm start

Or to run the main file directly:

npx ts-node src/index.ts

Build

To compile the TypeScript code:

npm run build

Contributing

Contributions are welcome! Please open issues or submit pull requests for improvements or bug fixes.

License

MIT License

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured