PC-health-checking-MCP
by Parisa-Reza
README.md
# š„ļø PC Health Checker Assistant using MCP
An AI-powered PC Health Assistant built using the **Model Context Protocol (MCP)**, **LangChain**, and **Google Gemini**. Developed a MCP server from scratch using the official Python MCP SDK to enable AI-agent interaction with local system resources, demonstrating the complete MCP client-server architecture.
---
## Quick Preview
<img width="1632" height="722" alt="Screenshot from 2026-07-21 16-05-14" src="https://github.com/user-attachments/assets/f2f36ccc-2c2a-43d4-a8b9-77d53d301645" />
## Project Objective
The objective of this project is to demonstrate how an AI agent can communicate with a custom-built MCP Server to access operating system information through standardized tools.
This project serves as a beginner-friendly implementation of:
- Model Context Protocol (MCP)
- MCP Server
- MCP Client
- LangChain Agents
- Gemini Tool Calling
- AI + System Integration
---
## Technology Stack
| Category | Technology |
|----------|------------|
| Programming Language | Python 3.12 |
| AI Framework | LangChain |
| LLM | Google Gemini 3,1 Flash Lite |
| Protocol | Model Context Protocol (MCP) |
| MCP SDK | Official MCP Python SDK |
| System Monitoring | psutil |
| OS Information | platform |
| Environment Variables | python-dotenv |
---
## Features
- Check CPU Usage
- Check Memory Usage
- Check Disk Usage
- Retrieve Operating System Information
- Natural Language Interaction
- Custom MCP Server built from scratch
- LangChain Agent integrated with Gemini
- Modular architecture
---
## Project Architecture
```
User
ā
ā¼
Natural Language Query
ā
ā¼
main.py
ā
ā¼
LangChain Agent
ā
ā¼
Google Gemini
ā
Chooses Appropriate Tool
ā
ā¼
LangChain Tool Wrapper
ā
ā¼
MCP Client
ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
Model Context Protocol
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā
ā¼
MCP Server
ā
ā¼
System Tools
ā
ā¼
psutil / platform
ā
ā¼
Operating System
```
---
## Example Conversation
### User
```
Show me the operating system information.
```
### Assistant
```
Operating System : Linux
OS Version : 7.0.0-28-generic
Architecture : x86_64
CPU Cores : 2
Logical Processors : 4
Python Version : 3.12.3
```
---
## Learning Outcomes
By completing this project I have understand:
- What is Model Context Protocol (MCP)
- How MCP Server works
- How MCP Client communicates with an MCP Server
- How LangChain integrates with MCP
- How Gemini performs tool selection
- Building AI agents with external tools
- Designing modular AI architectures
---
## Installation
### Clone the Repository
```bash
git clone https://github.com/Parisa-Reza/PC-health-checking-MCP.git
cd PC-health-MCP
```
---
### Create Virtual Environment
Linux
```bash
python3 -m venv venv
source venv/bin/activate
```
---
### Install Dependencies
```bash
pip install -r requirements.txt
```
---
### Create Environment File
Create a file named
```
.env
```
Add your Gemini API key.
---
### Running the Project
Run the application.
```bash
python main.py
```
Example:
```
You:
How much CPU am I using?
```
---
## License
This project is intended for educational and learning purposes.
This server cannot be deployed
Maintenance
ActivitySlowing
ResponsivenessNo issues