Skip to main content
Glama

Weather MCP Server

by suryanshp1

A simple demo of MCP python sdk.

MCP Crash Course

uv commands

start a new project

uv init <project-name>

create a virtual environment

uv venv

activate the virtual environment

uv venv --activate

install the dependencies

uv add <package> uv add -r requirements.txt uv sync

run application

uv run app.py

run the development server

uv run dev

build the project

uv run build

Run server using MCP Inspector :

  • Install MCP python sdk
uv add "mcp[cli]"
  • Run mcp inspector
uv run mcp dev server/weather.py

MCP Inspector is up and running at http://127.0.0.1:6274

Add server to claude desktop :

  • run command
uv run mcp install .\server\weather.py
  • query "what is weather alert in CA" in claude desktop

Add server to cursor :

  • goto preferences > settings > mcp and copy paste claude config
{ "mcpServers": { "weather": { "command": "uv", "args": [ "run", "--with", "mcp[cli]", "mcp", "run", "C:\\Users\\Suraj\\Desktop\\Python\\mcp-crash-course\\mcpcrashcourse\\server\\weather.py" ] } } }
  • Then do a query in cursor chat

Directly consume server in code - using mcp-use :

  • Install mcp-use
uv add mcp-use
  • Install langchain-groq
uv add langchain-groq
  • run client
uv run server/client.py
-
security - not tested
-
license - not tested
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

A simple demonstration server for the MCP Python SDK that provides weather alerts for locations, allowing users to query weather information through Claude Desktop or Cursor.

  1. uv commands

    Related MCP Servers

    • -
      security
      F
      license
      -
      quality
      This SSE-based MCP server allows users to connect and interact with National Weather Service APIs to retrieve weather alerts and forecasts.
      Last updated -
      90
      Python
    • -
      security
      F
      license
      -
      quality
      This is a Model Context Protocol (MCP) server that provides weather information using the National Weather Service (NWS) API. Features Get weather alerts for a US state Get weather forecast for a specific location (using latitude and longitude)
      Last updated -
      Python
      • Linux
      • Apple
    • A
      security
      A
      license
      A
      quality
      An MCP server that provides real-time weather information including temperature, humidity, wind speed, and sunrise/sunset times through the OpenWeatherMap API.
      Last updated -
      1
      Python
      MIT License
      • Linux
      • Apple
    • A
      security
      F
      license
      A
      quality
      A basic MCP server template that can be integrated with Cursor to enable AI tools like weather information retrieval using Claude-3.7-sonnet model.
      Last updated -
      2
      TypeScript

    View all related MCP servers

    MCP directory API

    We provide all the information about MCP servers via our MCP API.

    curl -X GET 'https://glama.ai/api/mcp/v1/servers/suryanshp1/mcpcrashcourse'

    If you have feedback or need assistance with the MCP directory API, please join our Discord server