Skip to main content
Glama
README.md
<p align="center">
  <img src="https://img.shields.io/badge/MCP_AI_Agent-Groq_%26_FastAPI-f97316?style=for-the-badge&logo=python&logoColor=white" alt="MCP AI Agent" />
</p>

# ⚡ Minimal MCP AI Agent with Embedded Testing UI

A clean, single-file implementation of a Model Context Protocol (MCP) AI Agent powered by **Groq (`openai/gpt-oss-120b`)**, **LangChain**, and **FastAPI**, featuring an embedded dark-mode testing UI[cite: 13].

---

## ✨ Features

- **Built-in MCP Tools:**
  - `analyze_text`: Analyzes text word/character count and sentiment indicators[cite: 13].
  - `get_system_info`: Tracks real-time system metrics (CPU usage, memory consumption, and uptime using `psutil`)[cite: 13].
- **LangChain Tool Calling:** The agent autonomously decides when and how to execute tools based on user queries[cite: 13].
- **Embedded Web UI:** A modern sidebar interface to test queries, view tool execution logs, and monitor live status[cite: 13].

---

## 🛠️ Tech Stack

- **Backend:** FastAPI, Uvicorn, Python[cite: 13]
- **AI / LLM:** LangChain, Groq API (`openai/gpt-oss-120b`)[cite: 13]
- **System Monitoring:** `psutil`[cite: 13]
- **Frontend:** Embedded HTML/CSS (Dark theme UI)[cite: 13]

---

## 🚀 Quick Start

1. **Clone the repository:**
   ```bash
   git clone [https://github.com/rawanosama14/mcp-groq-ai-agent.git](https://github.com/rawanosama14/mcp-groq-ai-agent.git)
   cd mcp-groq-ai-agent

```

2. **Install dependencies:**
```bash
pip install fastapi uvicorn langchain-groq langchain-core psutil pydantic

```


3. **Run the server:**
```bash
python server.py

```


4. **Open the UI:**
Navigate to **http://127.0.0.1:8000** in your browser to interact with the agent.



---

*Powered by Groq & FastAPI* 🚀