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.
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.
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.
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.
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 instructions using the .NET CLI for both NuGet.org and GitHub Packages are provided, along with update and uninstall commands.
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 allow overriding configuration settings, such as specifying custom log directories, polling intervals, log patterns, verbosity levels, and filters.
Instructions for building with the .NET SDK and running the application are provided.
Docker support is included, with instructions for building and running the application within a Docker container, including volume mapping for logs.
Implements structured logging using Serilog, providing contextual information, multiple output formats, log levels, structured data, and daily log file rotation.
Includes advanced error handling with exponential backoff, automatic recovery, detailed error reporting, and structured error logging.
Aids in debugging MCP server implementations, analyzing protocol messages, tracking client lifecycles, monitoring server capabilities, verifying protocol implementation, and tracking application performance.
Licensed under the MIT License.
willibrandon/CursorMCPMonitor
March 3, 2025
March 23, 2025
C#