CursorMCPMonitor

This .NET console application monitors Cursor AI editor's Model Context Protocol (MCP) interactions by parsing and color-coding log files in real-time, providing developers with debugging and analysis capabilities.

11
1

Cursor MCP Monitor

A .NET console application designed to monitor Model Context Protocol (MCP) interactions within the Cursor AI editor, aiding developers in debugging and analyzing server-client communications through real-time log monitoring.

What is MCP?

MCP standardizes how applications provide context to LLMs, using a client-server architecture involving MCP Hosts (like Cursor), MCP Clients, MCP Servers, and secure access to Local Data Sources and Remote Services.

Features

Offers real-time monitoring of MCP client-server interactions, including client creation, server offerings, protocol errors, and client lifecycle events. It monitors Cursor logs, parses and color-codes messages, supports log rotation, and provides cross-platform support. Features include smart error handling, configurable polling, a command-line interface, and structured logging with Serilog, including console and file logging with contextual properties.

Interactive Dashboard

Includes a web-based dashboard at http://localhost:5050 for monitoring and analysis, featuring real-time event streaming via WebSocket, a terminal display with timestamps and color-coding, and advanced search functionality.

Installation

Installation instructions using the .NET CLI for both NuGet.org and GitHub Packages are provided, along with update and uninstall commands.

Configuration

Configuration is managed through appsettings.json, allowing customization of log paths, polling intervals, log patterns, verbosity, and Serilog settings. Environment variables can override these settings.

Command-Line Options

Command-line options allow overriding configuration settings, such as specifying custom log directories, polling intervals, log patterns, verbosity levels, and filters.

Building and Running

Instructions for building with the .NET SDK and running the application are provided.

Docker Support

Docker support is included, with instructions for building and running the application within a Docker container, including volume mapping for logs.

Logging and Observability

Implements structured logging using Serilog, providing contextual information, multiple output formats, log levels, structured data, and daily log file rotation.

Error Handling

Includes advanced error handling with exponential backoff, automatic recovery, detailed error reporting, and structured error logging.

Use Cases

Aids in debugging MCP server implementations, analyzing protocol messages, tracking client lifecycles, monitoring server capabilities, verifying protocol implementation, and tracking application performance.

License

Licensed under the MIT License.

Repository

WI
willibrandon

willibrandon/CursorMCPMonitor

Created

March 3, 2025

Updated

March 23, 2025

Language

C#

Category

Developer Tools