MCP Servers

A collection of Model Context Protocol servers, templates, tools and more.

L
Langchain MCP Weather Server

langchain-mcp-weather-server

Created 2/25/2026
Updated about 4 hours ago
Repository documentation and setup instructions

MCP Weather Server

A Model Context Protocol (MCP) server that provides weather information tools accessible via the streamable-http transport.

Overview

This MCP weather server provides a simple weather lookup tool that can be used by MCP clients to get weather information for any city.

The server runs on port 8081 using the streamable-http transport protocol.

Prerequisites

  • Python 3.13+

Installation

uv sync

Running

uv run main.py

The server will start on http://localhost:8081/mcp and wait for MCP client connections.

Architecture

  • FastMCP: Simplified MCP server framework
  • streamable-http: Transport protocol for server-client communication
  • Tool Definitions: Weather lookup tool exposed as an MCP tool

API Endpoints

The server provides a streamable-http endpoint at:

http://localhost:8081/mcp

Tools

get_weather(city: str) -> str

Returns weather information for a given city.

Parameters:

  • city (str): The name of the city to get weather for

Returns:

  • Weather information as a string

Example:

get_weather("New York")
# Returns: "The weather in New York is sunny."

Dependencies

  • mcp: Model Context Protocol library
  • fastmcp: Simplified MCP server framework
Quick Setup
Installation guide for this server

Install Package (if required)

uvx langchain-mcp-weather-server

Cursor configuration (mcp.json)

{ "mcpServers": { "upxill-langchain-mcp-weather-server": { "command": "uvx", "args": [ "langchain-mcp-weather-server" ] } } }