# Weather Mcp A2a

> MCP-based agentic AI system enabling LLMs to fetch and reason over real-time global weather data using standardized tool invocation. Built with MCP Server/Client, Llama 3, and external APIs to deliver low-latency, hallucination-free weather intelligence through protocol-driven workflows.

- **Type:** MCP server
- **Install:** `agentstack add mcp-ratnesh-181998-weather-mcp-a2a`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [Ratnesh-181998](https://agentstack.voostack.com/s/ratnesh-181998)
- **Installs:** 0
- **Category:** [Cloud & Infrastructure](https://agentstack.voostack.com/c/cloud-infrastructure)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [Ratnesh-181998](https://github.com/Ratnesh-181998)
- **Source:** https://github.com/Ratnesh-181998/weather-mcp-a2a
- **Website:** https://weather-mcp-a2a-agent-to-agent3a95dbsjhgfhd3yussfz3e.streamlit.app/

## Install

```sh
agentstack add mcp-ratnesh-181998-weather-mcp-a2a
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# 🌤️ Weather MCP Agent: Global Intelligence System

[](https://appudtzei3tyyttd6xjhwur.streamlit.app/)
[](https://opensource.org/licenses/MIT)
[](https://www.python.org/downloads/)
[](https://groq.com/)
[](https://modelcontextprotocol.io/)

> **Next-Generation Agentic AI** powered by the **Model Context Protocol (MCP)** and **Llama 3 (Groq)**. A real-time, multi-modal weather intelligence system that bridges the gap between Large Language Models and deterministic data tools.

---

## 🚀 Overview

The **Weather MCP Agent** is a state-of-the-art implementation of the **Model Context Protocol (MCP)**, designed to demonstrate the future of AI interoperability. Unlike traditional chatbots that hallucinate data, this agent uses a standardized protocol to "connect" to live tools—fetching real-time weather forecasts, alerts, and atmospheric analytics for **any city on Earth**.

Built on **Streamlit** for a reactive UI and powered by **Groq's LPU** for near-instant inference, this system showcases how **Agentic AI** can orchestrate complex workflows (Geocoding -> Weather API -> Conversational Synthesis) in milliseconds.

---
## 🌐🎬 Live Demo
🚀 **Try it now:**
- **Streamlit Profile** - https://share.streamlit.io/user/ratnesh-181998
- **Project Demo** - https://weather-mcp-a2a-agent-to-agent3a95dbsjhgfhd3yussfz3e.streamlit.app/
---

### 🌟 Key Capabilities
*   **🌍 Global Coverage**: Instant weather intelligence for 100,000+ cities worldwide.
*   **⚡ Hyper-Fast Inference**: Uses Llama 3 70B on Groq LPUs for sub-second reasoning.
*   **🔌 Standardized Tooling**: Built 100% on the open-source MCP standard.
*   **🗣️ Multi-Modal Input**: Supports both Text and Voice (WebRTC) interaction.
*   **🧠 Smart Context**: Maintains conversation history and context-aware responses.

---

## 🎮 Interface & Features by Tab

The application is structured into 5 professional modules, each serving a specific purpose in the Agentic workflow:
#### Live Interface Preview

*Figure:High-Definition view of the Smart Weather Dashboard.*

### 1. 🚀 Project Demo (Interactive Core)
The command center of the application.
*   **AI Chat Interface**: Real-time conversation with the Agent.
*   **Quick Action Grid**: One-click execution for 16+ common scenarios.
*   **Smart City Extraction**: NLP-powered logic covers complex queries.
*   **Voice Input**: Speak naturally to the agent.

> **⚡ See it in Action:**
>
> 

### 2. ℹ️ About Project (Educational Hub)
A detailed breakdown of the paradigm shift in AI.
*   **Evolution Timeline**: Visualizing the shift from Static LLMs -> Tool-Use Agents -> MCP Ecosystems.
*   **Protocol Comparison**: Why MCP is superior to proprietary plugin architectures.
*   **Interactive Simulations**: step-by-step walkthroughs of the agent's decision-making process.
  

### 3. 🛠️ Tech Stack (Under the Hood)
Transparency in engineering.
*   **AI Core**: Llama 3.3 70B (Reasoning), LangChain (Orchestration).
*   **Frontend**: Streamlit Async Runtime, Custom CSS theming.
*   **Connectivity**: `mcp-use` Client, `requests` library, RESTful APIs (Open-Meteo, NWS).
  

### 4. 🏗️ Architecture (System Design)
Enterprise-grade visualization of the system.
*   **Data Flow**: `User -> Streamlit -> Agent -> MCP Client -> Tool -> Response`.
*   **Graphviz Charts**: Dynamically generated DAGs (Directed Acyclic Graphs) of the agent's logic.
*   **Network Topology**: Visualizing how the Host, Client, and Server interact.

### Detailed Graph Visualization

#### 📂 Detailed Architecture Diagrams
- Diagram 1: Basic MCP Architecture
  
- Diagram 2: LLM + MCP Tool Selection Flow
  
- Diagram 3: Multi-Tool MCP Server
  
- Diagram 4: A2A Multi-Agent Architecture
   
- Diagram 5: MCP vs A2A Combined System
  

### 5. 📋 System Logs (Observability)
Production-ready monitoring.
*   **Real-time Event Stream**: Live tracking of every thought, tool call, and API response.
*   **Status Codes**: Visual indicators for `SUCCESS`, `ERROR`, and `INFO`.
*   **Audit Trails**: Downloadable JSON/TXT logs for debugging and analytics.

---

## 🛠️ Technology Stack

| Component | Technology | Purpose |
| :--- | :--- | :--- |
| **Orchestration** | **LangChain** | Manages the ReAct (Reason+Act) loop and prompt engineering. |
| **Protocol** | **MCP (Model Context Protocol)** | The universal standard for connecting AI models to external tools. |
| **Inference Engine** | **Groq LPU** | Provides the speed necessary for real-time agentic workflows. |
| **LLM** | **Llama 3.3 70B** | The "Brain" capable of complex tool selection and JSON parsing. |
| **Frontend** | **Streamlit** | Delivers a responsive, Python-native web interface. |
| **Data Source** | **Open-Meteo API** | Provides high-precision weather data without API keys. |
| **Audio** | **SpeechRecognition / WebRTC** | Handles voice-to-text conversion. |

---

## ⚙️ Installation & Local Setup

Follow these steps to run the agent on your local machine.

### Prerequisites
*   Python 3.10+
*   A [Groq API Key](https://console.groq.com/) (Free)

### 1. Clone the Repository
```bash
git clone https://github.com/Ratnesh-181998/weather-mcp-a2a.git
cd weather-mcp-a2a
```

### 2. Set Up Virtual Environment
```bash
python -m venv venv
# Windows
venv\Scripts\activate
# Mac/Linux
source venv/bin/activate
```

### 3. Install Dependencies
```bash
pip install -r requirements.txt
```

### 4. Configure Secrets
Create a `.env` file in the root directory:
```env
GROQ_API_KEY=your_actual_api_key_here
```

### 5. Run the App
```bash
streamlit run Weather_streamlit_app.py
```

---

## 🐳 Large File Support (Git LFS)

This repository may contain large assets (images/diagrams). We use Git LFS to manage them efficiently.

```bash
# Install Git LFS
git lfs install

# Track large files
git lfs track "*.png"
git lfs track "*.jpg"

# Push to remote
git add .
git commit -m "Add large visual assets"
git push origin main
```

---

## 🤝 Contributing

Contributions are welcome! Please follow these steps:
1.  Fork the repository.
2.  Create a feature branch (`git checkout -b feature/AmazingFeature`).
3.  Commit your changes (`git commit -m 'Add some AmazingFeature'`).
4.  Push to the branch (`git push origin feature/AmazingFeature`).
5.  Open a Pull Request.

---

## 📜 License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

---

## 📞 Contact & Community

**Ratnesh Kumar Singh**  
*Data Scientist (AI/Ml Engineer 4+ Yrs Exp)*

*   💼 **LinkedIn**: [ratneshkumar1998](https://www.linkedin.com/in/ratneshkumar1998/)
*   🐙 **GitHub**: [Ratnesh-181998](https://github.com/Ratnesh-181998)
*   🌐 **Live Demo**: [Streamlit Cloud App](https://weather-mcp-a2a-agent-to-agent3a95dbsjhgfhd3yussfz3e.streamlit.app/)

### Project Links
*   📖 **Documentation**: [GitHub Wiki](https://github.com/Ratnesh-181998/weather-mcp-a2a/wiki)
*   🐛 **Issue Tracker**: [GitHub Issues](https://github.com/Ratnesh-181998/weather-mcp-a2a/issues)
*   💬 **Discussions**: [GitHub Discussions](https://github.com/Ratnesh-181998/weather-mcp-a2a/discussions)

---

---

## 📜 **License**

**Licensed under the MIT License** - Feel free to fork and build upon this innovation! 🚀

---

# 📞 **CONTACT & NETWORKING** 📞

## 💼 Professional Networks

[](https://www.linkedin.com/in/ratneshkumar1998/)
[](https://github.com/Ratnesh-181998)
[](https://x.com/RatneshS16497)
[](https://share.streamlit.io/user/ratnesh-181998)
[](mailto:rattudacsit2021gate@gmail.com)
[](https://medium.com/@rattudacsit2021gate)
[](https://stackoverflow.com/users/32068937/ratnesh-kumar)

## 🚀 AI/ML & Data Science  [AI/ML 1620+ Problem Solved](https://github.com/Ratnesh-181998/DSML)
[](https://share.streamlit.io/user/ratnesh-181998)
[](https://huggingface.co/RattuDa98)
[](https://www.kaggle.com/rattuda)

## 💻 Competitive Programming [Including all coding plateform's 5000+ Problems/Questions solved](https://github.com/Ratnesh-181998/Algorithms-and-Data-Structures)
[](https://leetcode.com/u/Ratnesh_1998/)
[](https://www.hackerrank.com/profile/rattudacsit20211)
[](https://www.codechef.com/users/ratnesh_181998)
[](https://codeforces.com/profile/Ratnesh_181998)
[](https://www.geeksforgeeks.org/profile/ratnesh1998)
[](https://www.hackerearth.com/@ratnesh138/)
[](https://www.interviewbit.com/profile/rattudacsit2021gate_d9a25bc44230/)

---

## 📊 **GitHub Stats & Metrics** 📊

---

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [Ratnesh-181998](https://github.com/Ratnesh-181998)
- **Source:** [Ratnesh-181998/weather-mcp-a2a](https://github.com/Ratnesh-181998/weather-mcp-a2a)
- **License:** MIT
- **Homepage:** https://weather-mcp-a2a-agent-to-agent3a95dbsjhgfhd3yussfz3e.streamlit.app/

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** yes
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-ratnesh-181998-weather-mcp-a2a
- Seller: https://agentstack.voostack.com/s/ratnesh-181998
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
