Weather MCP Server

Weather MCP Server

Demonstrates creating and connecting an MCP weather server using FastMCP, with support for integration with Claude Desktop, Cursor, and local LLMs to query weather alerts and information.

Category
Visit Server

README

MCP Server Creation and MCP client connection (Agent-Claude,cursor or, custom server calling and integration with local LLMs).

This project demonstrates how to create and connect an MCP (Model Context Protocol) weather server using FastMCP.

šŸ“– Want to learn more about MCP? Check out our Comprehensive MCP Guide for detailed explanations, concepts, and best practices.

Prerequisites

  • Python 3.13+
  • uv package manager installed

Setup Instructions

1. Initialize the Project

Initialize a new project using uv:

uv init

2. Create Virtual Environment

Create a virtual environment for the project:

uv venv

3. Activate Virtual Environment

Activate the virtual environment:

Windows:

.venv\Scripts\activate

Linux/Mac:

source .venv/bin/activate

4. Install MCP CLI

Add the MCP CLI package to enable fast MCP CLI commands:

uv add "mcp[cli]"

Running the MCP Server

Development Mode

To run the MCP server in development mode:

uv run mcp dev server/weather.py

Expected Output:

Starting MCP inspector...

āš™ļø Proxy server listening on localhost:6277

Connecting to Claude Desktop

Install Server to Claude

Add the weather server to Claude Desktop:

uv run mcp install server/weather.py

Expected Output:

Added server 'weather' to Claude config 

Successfully installed weather in Claude app

Once installed, you can ask Claude questions like:

  • "What are the weather alerts in CA?"
  • The MCP server will be called automatically and display the results.

Manual Configuration for Cursor or Other Clients

For Cursor or other clients, you'll need to manually configure the server using the Claude Desktop config file format.

Get the server configuration from: claude_desktop_config file

Example Configuration:

"weather": {
  "command": "C:\\Users\\gaura\\AppData\\Local\\Programs\\Python\\Python313\\Scripts\\uv.EXE",
  "args": [
    "run",
    "--with",
    "mcp[cli]",
    "mcp",
    "run",
    "C:\\Users\\gaura\\OneDrive\\Desktop\\AI projects\\mcp_project\\server\\weather.py"
  ]
}

Note: Update the paths in the configuration to match your system paths.

Usage in Cursor:

  • Go to MCP → mcp config.json
  • Add the configuration above

Using MCP with Local LLMs (mcp-use)

mcp-use allows you to connect to MCP servers directly without an AI agent for programmatic tool access. This is useful for custom server calling and integration with local LLMs.

Installation

Install the mcp-use package:

uv add mcp-use

Configuration

Create a file named weather.json and add the following configuration to connect local LLMs to the MCP server:

{
  "mcpServers": {
    "weather": {
      "command": "C:\\Users\\gaura\\AppData\\Local\\Programs\\Python\\Python313\\Scripts\\uv.EXE",
      "args": [
        "run",
        "--with",
        "mcp[cli]",
        "mcp",
        "run",
        "C:\\Users\\gaura\\OneDrive\\Desktop\\AI projects\\mcp_project\\server\\weather.py"
      ]
    }
  }
}

Note: Update the paths in the configuration to match your system paths.

References

  • FastMCP: https://github.com/jlowin/fastmcp

    • Create MCP servers and connect them to different clients like Claude, Cursor, etc.
  • mcp-use: https://github.com/mcp-use/mcp-use

    • Connect to MCP servers directly without an AI agent for programmatic tool access (custom server calling and use)

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
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
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
VeyraX MCP

VeyraX MCP

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

Official
Featured
Local
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
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
Qdrant Server

Qdrant Server

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

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
E2B

E2B

Using MCP to run code via e2b.

Official
Featured