The MCP Server is designed to display desktop notifications triggered by Model Context Protocol (MCP) clients like VSCode Cline. It supports both Windows 10 (using win10toast) and macOS (using osascript) notification systems, allowing customizable notification parameters and handling multiple client connections simultaneously.
Clone or download the MCP server code to your local machine
Install the required dependencies:
pip install -r requirements.txt
For Windows users, this will install the win10toast library needed for desktop notifications. Mac users don't need additional libraries as the server uses the built-in osascript functionality.
To start the MCP server with default settings (localhost on port 8000):
python mcp_server.py
To customize the host and port:
python mcp_server.py --port 8000 --host 0.0.0.0
The server supports the following command line arguments:
--port
: Set the port number (default: 8000)--host
: Set the host interface (default: 127.0.0.1)
127.0.0.1
for localhost only0.0.0.0
to listen on all network interfacesYou can also configure the server using environment variables:
MCP_SERVER_PORT
: Port numberMCP_SERVER_HOST
: Host interfaceOnce the server is running, MCP clients (such as VSCode Cline) can connect to it using the specified host and port. The server handles the MCP protocol communication automatically.
On Windows 10, the server uses the win10toast library to display desktop notifications with these customizable parameters:
On macOS, the server uses osascript to display notifications with these customizable parameters:
If you experience connection problems:
If notifications aren't displaying:
The server implements comprehensive logging for debugging purposes. Check the console output for connection status, received commands, and potential errors.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.