Skip to main content
Glama
Recycle Bin Forensics MCP Server

Recycle Bin Forensics MCP Server

README.md
# ๐Ÿ—‘๏ธ Recycle Bin Forensics MCP Server

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)
[![MCP Compatible](https://img.shields.io/badge/MCP-Compatible-green.svg)](https://modelcontextprotocol.io/)

A professional **Model Context Protocol (MCP) server** for forensic analysis of Windows Recycle Bin contents. Perfect for digital forensics, system administration, and cybersecurity investigations.

## ๐Ÿ” Features

### Core Forensic Capabilities
- **๐Ÿ“‹ List Recycled Items** - Complete inventory with metadata
- **๐Ÿ” Advanced Search** - Filter by name, type, date range
- **๐Ÿ“Š Timeline Analysis** - Chronological deletion timeline
- **๐Ÿ’พ File Recovery** - Safe restoration with integrity
- **๐Ÿ“ˆ Forensic Reports** - Export in JSON/CSV formats
- **๐Ÿ”ฌ Metadata Extraction** - File sizes, timestamps, original paths

### Technical Features
- **Windows $I File Parsing** - Native Recycle Bin format support
- **Unicode Path Handling** - International filename support
- **Multi-User Analysis** - Cross-SID folder scanning
- **Permission Handling** - Graceful access control management
- **Real-time Analysis** - Live system data processing

## ๐Ÿš€ Quick Start

### 1. Clone the Repository
```bash
git clone https://github.com/SaravanaGuhan/recycle-bin-forensics-mcp.git
cd recycle-bin-forensics-mcp
```

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

### 3. Configure MCP Server

#### For Kiro IDE:
Add to your `.kiro/settings/mcp.json`:
```json
{
  "mcpServers": {
    "recycle-bin-forensics": {
      "command": "python",
      "args": ["path/to/recycle_bin_server.py"],
      "env": {
        "PYTHONPATH": "path/to/recycle-bin-forensics-mcp"
      },
      "disabled": false,
      "autoApprove": [
        "list_recycled_items",
        "get_item_details",
        "search_recycled_files",
        "analyze_timeline",
        "export_forensic_report"
      ]
    }
  }
}
```

#### For Claude Desktop:
Add to your `claude_desktop_config.json`:
```json
{
  "mcpServers": {
    "recycle-bin-forensics": {
      "command": "python",
      "args": ["path/to/recycle_bin_server.py"]
    }
  }
}
```

### 4. Test Installation
```bash
python test_server.py
python verify_setup.py
```

## ๐Ÿ› ๏ธ Available Tools

| Tool | Description | Parameters |
|------|-------------|------------|
| `list_recycled_items` | List all items in Recycle Bin | None |
| `get_item_details` | Get detailed info about specific item | `item_id` |
| `search_recycled_files` | Search with filters | `query`, `file_type`, `date_from`, `date_to` |
| `recover_item` | Restore file from Recycle Bin | `item_id`, `destination` (optional) |
| `analyze_timeline` | Generate deletion timeline | None |
| `export_forensic_report` | Create comprehensive report | `format` ("json" or "csv") |

## ๐Ÿ’ฌ Usage Examples

### With AI Assistants
```
"List all recycled items"
"Search for PDF files deleted in the last week"
"Generate a forensic timeline of deletions"
"Recover the file with ID HLCQJ6.docx"
"Export a forensic report in CSV format"
```

### Direct API Usage
```python
# List all recycled items
items = await call_tool("list_recycled_items", {})

# Search for specific files
results = await call_tool("search_recycled_files", {
    "query": "confidential",
    "file_type": ".pdf",
    "date_from": "2024-01-01"
})

# Generate timeline
timeline = await call_tool("analyze_timeline", {})
```

## ๐Ÿงช Testing

Run the comprehensive test suite:
```bash
# Basic functionality
python test_server.py

# MCP integration
python test_mcp_simple.py

# Forensic scenarios
python test_forensic_scenarios.py

# Setup verification
python verify_setup.py
```

## ๐Ÿ“‹ Requirements

- **OS**: Windows 10/11 (Recycle Bin specific)
- **Python**: 3.8 or higher
- **Dependencies**: See `requirements.txt`
- **Permissions**: Standard user (admin for some advanced features)

## ๐Ÿ”’ Security & Privacy

- **Read-Only Analysis** - No modification of original data
- **Permission Respect** - Graceful handling of access restrictions
- **Data Integrity** - Maintains forensic chain of custody
- **Local Processing** - All analysis performed locally

## ๐Ÿค Contributing

1. Fork the repository
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request

## ๐Ÿ“„ License

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

## ๐Ÿ™ Acknowledgments

- Built for the [Model Context Protocol](https://modelcontextprotocol.io/)
- Compatible with [Kiro IDE](https://kiro.ai/) and Claude Desktop
- Inspired by digital forensics best practices

## ๐Ÿ“ž Support

- **Issues**: [GitHub Issues](https://github.com/SaravanaGuhan/recycle-bin-forensics-mcp/issues)
- **Discussions**: [GitHub Discussions](https://github.com/SaravanaGuhan/recycle-bin-forensics-mcp/discussions)
- **Documentation**: See [PROJECT_SUMMARY.md](PROJECT_SUMMARY.md) for detailed technical information

---

**โญ Star this repository if you find it useful!**