MCP Weather Server
Suggested as a replacement for the hardcoded geolocation functionality to get real coordinates for cities via the Google Maps API
Allows exposing the weather tools to LangChain agents for building workflows that can access location and weather data
Enables exposing the weather tools to OpenAI function-calling agents to incorporate weather data into conversations and decision-making
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Weather Serverget the weather forecast for New York City"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
π¦οΈ MCP Weather Server
A simple and modular MCP (Modular Command Protocol) server that exposes weather-related tools β perfect for integration with AI agents, LLMs, or any tool-using client.
This project demonstrates how to create and serve tools such as:
get_coordinates(city)get_forecast(latitude, longitude)
Designed to be lightweight, clean, and easy to extend.
π§ What Is MCP?
MCP (Modular Command Protocol) is a protocol for exposing tools (Python functions) in a machine-readable format so they can be:
Automatically discovered
Dynamically called by AI agents
Interoperable across systems
Itβs built for tool-using LLMs, agents, and next-gen integrations.
Related MCP server: mcp-weather
π Project Structure
mcp-server/
βββ main.py # Starts the FastMCP server
βββ tools
|------ get_forcast.py # MCP tools: get_coordinates and get_forecast
βββ pyproject.toml # Python dependencies
βββ README.md # You're here!π Getting Started
1. Clone the Repo
git clone https://github.com/jeannassereldine/mcp-server.git
cd mcp-server3. Run the Server
uv run weather.pyThis starts the MCP server over stdio. You can connect any MCP client that supports the protocol.
π§ Tools Overview
get_coordinates(city: str) -> Tuple[float, float]
Returns hardcoded latitude and longitude for a given city.
β Replace this with a real geolocation API like OpenCage or Google Maps.
get_forecast(latitude: float, longitude: float) -> str
Returns a formatted weather forecast string for the given coordinates.
β Replace with a live weather API like api.weather.gov.
format_forecast(forecasts: List[Dict]) -> str
Helper function that formats multiple forecast entries into a readable string.
π§© Want to Build an MCP Client?
Stay tuned! The next part of this project will include a lightweight client that can:
Auto-discover tools
Call them based on context
Build real-time agent workflows
π§ Use Cases
Build agent backends with clean, callable tools
Expose local or cloud-based APIs to LLMs
Prototype tools for LangChain or OpenAI function-calling agents
Teach MCP integration through a practical example
π License
This project is open-source under the MIT License.
π Contributing
Pull requests are welcome! Feel free to open issues or suggest features you'd like to see.
π Related
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
Related MCP Servers
- FlicenseBqualityDmaintenanceA Model Context Protocol compatible server that provides weather information for any city using Ollama's LLM capabilities through an exposed get-weather tool.Last updated1
- Flicense-qualityDmaintenanceA Model Context Protocol (MCP) server built with the mcp-framework to provide weather-related tools and data to AI clients. It enables integration of weather capabilities and custom tools into the MCP ecosystem for use with platforms like Claude Desktop.Last updated31
- FlicenseAqualityDmaintenanceLightweight MCP server that exposes tools for system information and weather lookup, designed for agent integration via stdio.Last updated1
- Flicense-qualityBmaintenanceA lightweight Model Context Protocol (MCP) server that gives AI assistants the ability to fetch real-time weather data for any city using the OpenWeatherMap API.Last updated1
Related MCP Connectors
MCP server exposing the Backtest360 engine API as tools for AI agents.
MCP server for Pentest-Tools.com: run scans, manage findings and reports via your preffered LLM.
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/jeannassereldine/mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server