Toast MCP Server

MCP Server with Windows 10 and macOS Notifications

Project Overview

This project aims to create a Model Context Protocol (MCP) server that can display desktop notifications using the win10toast library on Windows 10 and osascript on macOS. The server will receive requests from MCP clients (such as VSCode Cline) and display desktop notifications based on them.

Requirements

Functional requirements

  1. MCP Protocol Support
    • An implementation of the Model Context Protocol to establish communication with MCP clients.
    • Support for the latest MCP specification (provides full compatibility with VSCode Client)
    • Handling synchronous and asynchronous requests
  2. Notification System
    • Windows 10 uses the win10toast library to display desktop notifications
    • On macOS, use osascript to display notifications in Notification Center
    • Support for customizable notification parameters:
      • title
      • Message Content
      • Display Time
      • Icon (Windows only, optional)
      • Subtitle (macOS only, optional)
      • Notification sounds (macOS only, optional)
      • Notification type (information, warning, error, success)
  3. Client connections
    • Listening on configurable network interfaces (not just 127.0.0.1 for localhost, but also 0.0.0.0 for all interfaces)
    • Configurable port (default: 8000)
    • Handling multiple simultaneous client connections
    • Proper error handling for connection issues
  4. Command Processing
    • Handling notification commands from MCP clients
    • Supports simple API for triggering notifications
    • Validating commands and providing appropriate error responses

Technical requirements

  1. Server Implementation
    • Implementation requires Python 3.8 or higher
    • Implemented as an asynchronous server using asyncio or a similar library
    • Follow best practices for MCP server implementation
  2. Dependencies
    • win10toast for Windows 10 desktop notifications
    • osascript for macOS notifications (shipped with the system)
    • Libraries required for implementing the MCP protocol
    • Minimize external dependencies
  3. setting
    • Support for configuration via command line arguments
    • Support for environment variables
    • Providing sensible default values for all settings
  4. Logging and Error Handling
    • Implementing a comprehensive logging system
    • Logging of all client connections, commands and errors
    • Proper exception handling with meaningful error messages

Testing Requirements

  1. Test script
    • Includes test scripts to demonstrate the functionality of the server
    • Examples of different notification types
  2. Client Compatibility
    • Ensuring compatibility with VSCode Client
    • Documenting client-specific configuration requirements

Deliverables

  1. Python implementation of MCP server
  2. Test scripts to demonstrate functionality
  3. requirements.txt that lists all dependencies
  4. Usage and configuration documentation
  5. Troubleshooting guide for common issues

Implementation Notes

  • Make the server bind to all interfaces (0.0.0.0) instead of just localhost
  • Use appropriate threading or asynchronous patterns to handle concurrent requests
  • Include appropriate security measures (such as input validation)
  • Provides detailed logging options for debugging connection issues
  • Implement a graceful shutdown of the server

Usage Example

The completed server can be run as follows:

python mcp_server.py --port 8000 --host 0.0.0.0

And then you can trigger notifications via the MCP protocol from VSCode Cline or other MCP clients.

-
security - not tested
-
license - not tested
-
quality - not tested

An MCP server that displays desktop notifications on Windows 10 and macOS, compatible with VSCode Cline and supporting customizable notification parameters.

  1. プロジェクト概要
    1. 要件
      1. 機能要件
      2. 技術要件
      3. テスト要件
    2. 成果物
      1. 実装上の注意
        1. 使用例
          ID: jld7uwa9h9