L
Langchain MCP Weather Server
作者 @upxill
langchain-mcp-weather-server
创建于 2/25/2026
更新于 about 6 hours ago
README
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 libraryfastmcp: Simplified MCP server framework
快速设置
此服务器的安装指南
安装包 (如果需要)
uvx langchain-mcp-weather-server
Cursor 配置 (mcp.json)
{
"mcpServers": {
"upxill-langchain-mcp-weather-server": {
"command": "uvx",
"args": [
"langchain-mcp-weather-server"
]
}
}
}
作者服务器
其他服务器由 upxill