Token导航 LogoToken导航TokenDH.com
Personal AI Assistant logo
AI代理stdio官方级别未说明来源级核验

Personal AI Assistant

MCP Server

一款基于模型上下文协议(MCP)的个人AI助手,具备邮件管理、PDF阅读、会议安排、网页搜索、披萨订购和交互问答等功能,同时保护用户隐私信息。

工具数

0

提示词数

0

GitHub Stars

0

资源数

0
本地处理PythonClaude任务自动化Claude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

simranjotkaur6

提供方

simranjotkaur6

最后核验

2026/5/17 20:20

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

pip install -r requirements.txt

详细介绍

Personal AI Assistant using MCP

A comprehensive personal AI assistant built with Model Context Protocol (MCP) that can handle email, PDF reading, meeting scheduling, web search, pizza ordering, and interactive questioning while protecting your private information.

Features

Core Capabilities (7 points total)

  1. 📧 Email Management (1pt)

- Write and send emails on your behalf - Support for both plain text and HTML emails - Privacy protection for email content

  1. 📄 PDF Reading & Q&A (1pt)

- Read multiple PDF files and extract text - Answer questions about PDF content - Automatic privacy detection and local processing

  1. 📅 Meeting Scheduling (1pt)

- Schedule meetings in your calendar - Create iCalendar (.ics) files - Conflict detection and management - Meeting reminders

  1. 🔍 Web Search (1pt)

- Real-time internet search - Multiple search providers (Google, DuckDuckGo) - News search capabilities - Fallback web scraping

  1. 🍕 Pizza Ordering (2pt)

- Order from multiple pizza providers (Domino's, Pizza Hut, Local) - Menu browsing and price calculation - Order tracking and confirmation - Address and phone validation

  1. ❓ Interactive Questioning (2pt)

- Ask questions for clarification - Handle private information requests - Context-aware questioning - Privacy-aware responses

Key Requirements (2pt)

  1. 🔒 Privacy Protection

- Local LLM processing for private data - Automatic private information detection - Data masking and sanitization - No private data leakage to public APIs

Architecture

┌─────────────────┐    ┌─────────────────┐    ┌─────────────────┐
│   MCP Client    │◄──►│   MCP Server    │◄──►│  External APIs  │
│                 │    │                 │    │                 │
│ - User Interface│    │ - Tool Registry │    │ - OpenAI/Claude │
│ - Input Handling│    │ - Privacy Mgmt  │    │ - Email SMTP    │
│ - Response Display│   │ - Local LLM     │    │ - Web Search    │
└─────────────────┘    └─────────────────┘    └─────────────────┘
                                │
                                ▼
                       ┌─────────────────┐
                       │  Local Storage  │
                       │                 │
                       │ - PDFs          │
                       │ - Meetings      │
                       │ - Orders        │
                       └─────────────────┘

Installation

Prerequisites

  • Python 3.8 or higher
  • pip package manager
  • Chrome browser (for web scraping)
  • Local LLM setup (optional, for private data processing)

Setup

  1. Clone or download the project
   cd /Users/simranjotkaur/Desktop/Programming LLMs/HW3
  1. Install dependencies
   pip install -r requirements.txt
  1. Set up environment variables

Create a .env file in the project root:

   # API Keys
   OPENAI_API_KEY=your_openai_api_key_here
   ANTHROPIC_API_KEY=your_anthropic_api_key_here

   # Email Configuration
   EMAIL_ADDRESS=your_email@gmail.com
   EMAIL_PASSWORD=your_app_password_here
   SMTP_SERVER=smtp.gmail.com
   SMTP_PORT=587

   # Local LLM Configuration (for private data processing)
   LOCAL_LLM_URL=http://localhost:11434/v1
   LOCAL_LLM_MODEL=llama2

   # Calendar Configuration
   CALENDAR_EMAIL=your_calendar_email@gmail.com

   # Pizza Ordering APIs (example - replace with actual APIs)
   DOMINOS_API_KEY=your_dominos_api_key
   PIZZA_HUT_API_KEY=your_pizza_hut_api_key

   # Web Search
   GOOGLE_SEARCH_API_KEY=your_google_search_api_key
   GOOGLE_SEARCH_ENGINE_ID=your_search_engine_id
  1. Set up local LLM (optional but recommended)
   # Install Ollama
   curl -fsSL https://ollama.ai/install.sh | sh
   
   # Pull a model
   ollama pull llama2
   
   # Start Ollama server
   ollama serve

Usage

Running the MCP Server

python run_server.py

Running the MCP Client

python run_client.py

Interactive Commands

The client provides an interactive menu with the following options:

  1. Send Email

- Enter recipient, subject, and body - Choose HTML or plain text format - Automatic privacy checking

  1. Read PDF

- Provide PDF file path - Ask questions about the content - Automatic private data detection

  1. Schedule Meeting

- Enter meeting details - Set start/end times - Add attendees and description - Automatic conflict checking

  1. Web Search

- Enter search query - Specify number of results - Real-time information retrieval

  1. Order Pizza

- Choose provider (Domino's, Pizza Hut, Local) - Select pizza type and size - Add toppings and delivery details - Price calculation and confirmation

  1. Ask Question

- Ask for clarification or private information - Context-aware questioning - Privacy-aware responses

Privacy Protection

Automatic Detection

The system automatically detects private information using:

  • Pattern Matching: SSN, credit cards, phone numbers, emails
  • Keyword Detection: Personal, private, confidential, etc.
  • Context Analysis: Addresses, bank accounts, etc.

Local Processing

When private data is detected:

  1. Local LLM Processing: Uses Ollama or similar local LLM
  2. Data Masking: Automatically masks sensitive information
  3. No External APIs: Private data never leaves your machine
  4. Secure Storage: Local file storage with proper permissions

Privacy Keywords

The system monitors for these privacy-related terms:

  • password, ssn, social security
  • credit card, bank account
  • personal, private, confidential
  • address, phone number

File Structure

HW3/
├── README.md                 # This file
├── requirements.txt          # Python dependencies
├── config.py                # Configuration management
├── mcp_server.py            # Main MCP server
├── mcp_client.py            # MCP client interface
├── privacy_manager.py       # Privacy protection
├── local_llm_client.py      # Local LLM integration
├── web_scraper.py           # Web search and scraping
├── pizza_ordering.py        # Pizza ordering system
├── calendar_manager.py      # Meeting scheduling
├── run_server.py            # Server startup script
└── run_client.py            # Client startup script

API Integration

Email (SMTP)

  • Gmail SMTP support
  • App password authentication
  • HTML and plain text support

Web Search

  • Google Custom Search API
  • DuckDuckGo fallback
  • Selenium-based scraping

Pizza Ordering

  • Multiple provider support
  • Menu and pricing integration
  • Order tracking simulation

Calendar

  • iCalendar (.ics) file generation
  • Meeting conflict detection
  • Reminder system

Security Features

  1. Environment Variables: Sensitive data stored in .env
  2. Input Validation: All inputs validated and sanitized
  3. Error Handling: Comprehensive error handling
  4. Logging: Detailed logging for debugging
  5. Rate Limiting: Built-in rate limiting for APIs

Troubleshooting

Common Issues

  1. Email not sending

- Check SMTP credentials - Enable app passwords for Gmail - Verify firewall settings

  1. PDF reading fails

- Ensure PDF is not password protected - Check file permissions - Try different PDF libraries

  1. Web search not working

- Check API keys - Verify internet connection - Try fallback scraping

  1. Local LLM not responding

- Ensure Ollama is running - Check model availability - Verify URL configuration

Debug Mode

Enable debug logging by setting:

logging.basicConfig(level=logging.DEBUG)

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

License

This project is for educational purposes. Please ensure you comply with all API terms of service and local regulations.

Support

For issues and questions:

  1. Check the troubleshooting section
  2. Review the logs for error messages
  3. Ensure all dependencies are installed
  4. Verify environment variables are set correctly

Note: This is a demonstration project. In production, additional security measures, error handling, and testing would be required.

目录标签

目录标签

本地处理PythonClaude任务自动化AI助手本地部署隐私保护多任务处理

支持客户端

Claude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP