mcp-weather-server
The MCP Weather Application is a client-server system using the Model Context Protocol to retrieve weather data from the National Weather Service API.
MCP Weather Application (Client-Server)
This project demonstrates a client-server application using the MCP (Model Context Protocol) framework to retrieve weather information.
weather/
: Contains the MCP server code, which fetches data from the National Weather Service (NWS) API.mcp-client/
: Contains the MCP client code, which interacts with the server and uses LangChain with Groq for natural language queries.
Description
The MCP Server (weather/
) provides specific tools (get_alerts
, get_forecast
) accessible via MCP. It connects to the NWS API to fulfill requests made through these tools.
The MCP Client (mcp-client/
) connects to the MCP server, discovers its tools, and allows users to interact via a chat interface. It uses LangChain and the Groq API (Llama 3 model) to process natural language queries, determine if a server tool is needed, call the tool via MCP if necessary, and formulate a final response.
Architecture
- The Client starts and initiates an MCP connection (via stdio) to the Server script.
- The Client discovers the tools available on the Server.
- The user provides a natural language query to the Client.
- The Client uses the Groq LLM (via LangChain) to interpret the query and potentially identify the need to use a server tool.
- If a tool is needed, the Client sends an MCP request to the Server to execute the specific tool (e.g.,
get_forecast
) with the required arguments. - The Server executes the tool logic, fetching data from the NWS API.
- The Server sends the result back to the Client via MCP.
- The Client incorporates the tool's result into the ongoing conversation with the LLM.
- The Client presents the final LLM-generated response to the user.
Setup
Detailed setup instructions, including dependency installation and environment configuration (like API keys), can be found in the README files within each component's directory:
- Server Setup: See
weather/README.md
- Client Setup: See
mcp-client/README.md
Running the Application
To run the client and have it automatically start and connect to the server, execute the following command from the mcp-client/ (the directory containing client.py
):
uv run client.py ../weather/weather.py
Related MCP Servers
View all cloud_platforms servers →Figma-Context-MCP
by GLips
Framelink Figma MCP Server allows AI-powered coding tools to access Figma design data, enhancing design implementation accuracy.
edgeone-pages-mcp
by TencentEdgeOne
An MCP service for deploying HTML content, folder, and zip file to EdgeOne Pages and obtaining a publicly accessible URL.
HubSpot
by PipedreamHQ
Pipedream MCP Server is a reference implementation that allows you to run your own MCP server for over 2,500 apps and APIs, powered by Pipedream Connect.
mcp-atlassian
by sooperset
Model Context Protocol (MCP) server for Atlassian products (Confluence and Jira). This integration supports both Confluence & Jira Cloud and Server/Data Center deployments.
Nx MCP Server
by nrwl
A Model Context Protocol server implementation for Nx, providing LLMs with deep access to monorepo structures.
mcp-grafana
by grafana
A Model Context Protocol (MCP) server for Grafana that provides access to your Grafana instance and its ecosystem.
firecrawl-mcp-server
by mendableai
Firecrawl MCP Server is a Model Context Protocol server implementation that integrates with Firecrawl for web scraping capabilities.