PersonalMCP

PersonalMCP

3.3

This project involves developing a Model Context Protocol (MCP) server and a REST API to handle email and OCR tasks.

The project aims to create a robust system that integrates both MCP and REST APIs to manage email-related tasks and OCR processing. The MCP API is designed to interface with clients like Claude and OpenAI, while the REST API is intended for reporting and automation tasks. The current capabilities include searching for unread emails in a mailbox and performing basic email searches. Future developments include gathering PDF attachments, adding OCR capabilities, and integrating these features to fetch emails with attachments and return structured OCR output.

Features

  • MCP Server: Can search for unread emails in a provided mailbox.
  • Email Server: Performs basic searches for a provided mailbox.
  • REST API: Updated to handle email headers and bodies differently using SwiftMail.
  • OCR Server: Uses Mistral API for OCR tasks and has a new endpoint for performing OCR on emails.
  • Integration: Plans to integrate email fetching with OCR processing for structured output.

Usage with Different Platforms

mcp

python
# Example script to use MCP API for searching unread emails
import mcp

client = mcp.Client('api_key')
response = client.search_unread_emails(mailbox='inbox')
print(response)

rest

python
# Example script to use REST API for searching unread emails
import requests

url = 'https://api.example.com/emails/unread'
headers = {'Authorization': 'Bearer api_key'}
response = requests.get(url, headers=headers)
print(response.json())