trackmcp
Back to directory
NetworkNerd1337

rcs_quikmail

View on GitHub

RCS Quikmail is a Model Context Protocol (MCP) server for sending email using natural language. RCS Quikmail uses post-quantum encryption to secure the client-server message exchange.

0 stars PythonAI & Machine Learning Updated Apr 30, 2025

Documentation

MCP Email Service

A secure Model Context Protocol (MCP) server and client application for sending emails, featuring post-quantum cryptography (CRYSTALS-Kyber, Falcon, SPHINCS+), AES-256-GCM encryption, and spaCy-based natural language processing (NLP) for user requests. Designed for Ubuntu Linux, this service ensures quantum-resistant communication and robust email handling.

Table of Contents

Features

  • Post-Quantum Cryptography: Uses CRYSTALS-Kyber for key exchange, Falcon for digital signatures, and SPHINCS+ as a backup signature algorithm.
  • Secure Encryption: Employs AES-256-GCM for authenticated encryption of messages.
  • Natural Language Processing: Leverages spaCy (`en_core_web_sm`) for robust parsing of email requests.
  • Real Email Sending: Integrates with SMTP servers (e.g., Gmail) for actual email delivery.
  • Asynchronous Communication: Built with `asyncio` for efficient server-client interactions.
  • Ubuntu Linux Support: Optimized for Ubuntu 22.04+ with detailed setup instructions.

Prerequisites

  • Operating System: Ubuntu Linux 22.04 or later.
  • Python: Version 3.8 or higher.
  • Internet Connection: Required for email sending and dependency installation.
  • Git: For cloning the repository.
  • SMTP Account: A valid email account (e.g., Gmail with an App Password) for sending emails.

Environment Setup

1. Update System:

bash
sudo apt-get update
   sudo apt-get upgrade -y

2. Install System Dependencies:

bash
sudo apt-get install -y python3 python3-pip python3-dev build-essential libssl-dev libffi-dev python3-venv git cmake ninja-build

3. Clone the Repository:

bash
git clone https://github.com//mcp-email-service.git
   cd mcp-email-service

Dependency Installation

The application relies on Python libraries and, optionally, compiled C libraries for post-quantum cryptography. All dependencies are installed via the provided `setup.sh` script.

Python Dependencies

  • `pqcrypto==0.1.1`: Post-quantum cryptography (Kyber, Falcon, SPHINCS+).
  • `pyyaml==6.0.1`: YAML configuration parsing.
  • `spacy==3.7.2`: NLP for processing user requests.
  • `cryptography==42.0.5`: AES-256-GCM encryption.

Optional C Library

  • `liboqs`: Required if `pqcrypto` wheels are unavailable for your platform. The setup script compiles it automatically if needed.

Installation Steps

1. Run the Setup Script:

bash
chmod +x setup.sh
   ./setup.sh

This script:

    2. Activate the Virtual Environment:

    bash
    source venv/bin/activate

    Configuration

    1. Server Configuration:

      yaml
      server:
             host: "0.0.0.0"
             port: 8765
           email:
             server: "smtp.gmail.com"
             port: 587
             user: "your-email@gmail.com"
             password: "your-app-password"

        2. Client Configuration:

          yaml
          server:
                 host: "localhost"
                 port: 8765

            3. Secure Configuration Files:

              Installation

              After setting up the environment and dependencies:

              1. Verify Virtual Environment:

              bash
              source venv/bin/activate
                 python -c "import pqcrypto, spacy, cryptography; print('All dependencies installed')"

              2. Test Configuration:

                Usage

                1. Start the Application:

                bash
                chmod +x run.sh
                   ./run.sh
                  bash
                  source venv/bin/activate
                       python server/mcp_server.py &
                       python client/mcp_client.py

                  2. Interact with the Client:

                    3. Server Logs:

                      Usage Examples

                      The client processes natural language requests using spaCy. Below are example inputs and their outcomes:

                      1. Basic Email:

                      code
                      Input: Send an email to john.doe@example.com saying Hello, how are you?
                         Output: Server response: {'status': 'success', 'message': 'Email sent'}

                        2. Email with Subject:

                        code
                        Input: Email jane@example.com with subject Meeting Tomorrow and message Let's meet at 10 AM.
                           Output: Server response: {'status': 'success', 'message': 'Email sent'}

                          3. Complex Request:

                          code
                          Input: Send a message to test@example.com with title Project Update and content Please review the latest report.
                             Output: Server response: {'status': 'success', 'message': 'Email sent'}

                            4. Invalid Email:

                            code
                            Input: Send an email to invalid saying Test
                               Output: Server response: {'status': 'success', 'message': 'Email sent'}

                              Security

                              • Post-Quantum Cryptography:
                                • CRYSTALS-Kyber (ML-KEM): Secures key exchange for quantum-resistant encryption.
                                • Falcon: Provides primary digital signatures for authentication.
                                • SPHINCS+: Backup signature algorithm for redundancy.
                              • Symmetric Encryption:
                                • AES-256-GCM: Ensures confidentiality, integrity, and authenticity of messages using a key derived from Kyber.
                              • Configuration Security:
                                • Protect `server/config.yaml` to safeguard email credentials.
                              • Network Security:
                                • Run the server on a trusted network or behind a firewall.
                                • Consider TLS for SMTP connections (already enabled for Gmail).

                              Troubleshooting

                              • Email Sending Fails:
                                • Verify `server/config.yaml` credentials and SMTP settings.
                                • Ensure the email provider allows App Passwords (for Gmail, enable 2-Step Verification).
                                • Check server logs for SMTP errors.
                              • pqcrypto Installation Fails:
                                • Run `setup.sh` again to compile `liboqs` and `liboqs-python`.
                                • Ensure `cmake` and `ninja-build` are installed.
                              • spaCy Issues:
                                • Verify the `en_core_web_sm` model: `python -m spacy download en_core_web_sm`.
                                • Check for sufficient memory (spaCy requires ~200MB).
                              • Connection Errors:
                                • Ensure `client/config.yaml` matches `server/config.yaml` for host and port.
                                • Check if the server is running (`ps aux | grep mcp_server.py`).
                              • General Debugging:
                                • Run server and client separately to isolate issues.
                                • Enable verbose logging by adding `print` statements in `mcp_server.py` or `mcp_client.py`.

                              Contributing

                              Contributions are welcome! Please follow these steps:

                              1. Fork the repository.

                              2. Create a feature branch (`git checkout -b feature/your-feature`).

                              3. Commit changes (`git commit -m 'Add your feature'`).

                              4. Push to the branch (`git push origin feature/your-feature`).

                              5. Open a Pull Request.

                              Please ensure code follows PEP 8 and includes tests where applicable.

                              License

                              This project is licensed under the MIT License. See the LICENSE file for details.

                              text
                              MIT License
                              
                              Copyright (c) 2025 
                              
                              Permission is hereby granted, free of charge, to any person obtaining a copy
                              of this software and associated documentation files (the "Software"), to deal
                              in the Software without restriction, including without limitation the rights
                              to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
                              copies of the Software, and to permit persons to whom the Software is
                              furnished to do so, subject to the following conditions:
                              
                              The above copyright notice and this permission notice shall be included in all
                              copies or substantial portions of the Software.
                              
                              THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
                              IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
                              FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
                              AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
                              LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
                              OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
                              SOFTWARE.

                              Frequently asked questions

                              What is rcs_quikmail?

                              rcs_quikmail is RCS Quikmail is a Model Context Protocol (MCP) server for sending email using natural language. RCS Quikmail uses post-quantum encryption to secure the client-server message exchange.

                              How do I install rcs_quikmail?

                              Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.

                              Is rcs_quikmail open source?

                              Yes — it is hosted on GitHub at https://github.com/NetworkNerd1337/rcs_quikmail.

                              Related MCP tools

                              Run your own MCP server? See who uses it and what to fix.

                              Measure it with TrackMCP