n

naru-sensei

@naru-sensei/-toast-mcp-server
0 Stars 353 次浏览 naru-sensei 更新于 2026-08-23
该服务暂未提供标准配置,请参考 README 手动接入

服务介绍

MCP Server with Windows 10 and macOS Notification Features

Project Overview

This project aims to create a Model Context Protocol (MCP) server capable of displaying desktop notifications. On Windows 10, the win10toast library will be used, while on macOS, osascript will be utilized for showing notifications. This server will receive requests from MCP clients (such as VSCode Cline) and display desktop notifications based on those requests.

Requirements

Functional Requirements

  1. MCP Protocol Support

    • Implementation of the Model Context Protocol to establish communication with MCP clients
    • Support for the latest MCP specifications (providing full compatibility with VSCode Cline)
    • Handling of both synchronous and asynchronous requests
  2. Notification System

    • Use of the win10toast library to display desktop notifications on Windows 10
    • Use of osascript to display notifications in the notification center on macOS
    • Support for customizable notification parameters:
      • Title
      • Message content
      • Display duration
      • Icon (Windows only, optional)
      • Subtitle (macOS only, optional)
      • Notification sound (macOS only, optional)
      • Notification type (information, warning, error, success)
  3. Client Connection

    • Listening on a configurable network interface (not just localhost at 127.0.0.1, but also all interfaces at 0.0.0.0)
    • Configurable port (default: 8000)
    • Handling of multiple simultaneous client connections
    • Proper error handling for connection issues
  4. Command Processing

    • Processing of notification commands from MCP clients
    • Support for a simple API to trigger notifications
    • Command validation and provision of appropriate error responses

Technical Requirements

  1. Server Implementation

    • Use Python 3.8 or higher for implementation
    • Implement as an asynchronous server using asyncio or similar libraries
    • Follow best practices for MCP server implementation
  2. Dependencies

    • win10toast for Windows 10 desktop notifications
    • osascript (built-in) for macOS notifications
    • Libraries necessary for MCP protocol implementation
    • Minimize external dependencies
  3. Configuration

    • Support for configuration via command-line arguments
    • Support for configuration via environment variables
    • Provide reasonable default values for all settings
  4. Logging and Error Handling

    • Implementation of a comprehensive logging system
    • Logging of all client connections, commands, and errors
    • Proper exception handling with meaningful error messages

Testing Requirements

  1. Test Scripts

    • Include test scripts to demonstrate server functionality
    • Illustrate various notification types
  2. Client Compatibility

    • Ensure compatibility with VSCode Cline
    • Document client-specific configuration requirements

Deliverables

  1. Python implementation of the MCP server
  2. Test scripts demonstrating functionality
  3. requirements.txt listing all dependencies
  4. Documentation on usage and configuration
  5. A troubleshooting guide for common issues

Implementation Notes

  • Ensure the server binds to all interfaces (0.0.0.0) and not just localhost
  • Use appropriate threading or asynchronous patterns to handle concurrent requests
  • Include proper security measures (e.g., input validation)- Provide detailed log options for debugging connection issues
  • Implement proper server shutdown

Usage Example

The completed server should be executable as follows:

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

And, it should allow triggering notifications through the MCP protocol from VSCode Client or other MCP clients.

相关 MCP 服务