McpServerManager is an Avalonia UI desktop application designed to visualize and analyze session logs and request data from AI coding assistants like GitHub Copilot and Cursor. It provides a unified view of interactions, enabling developers to review prompt history, context usage, and automated actions taken by these tools.
Repository: sharpninja/McpServerManager
- Unified Dashboard: Aggregates logs from different AI providers (Copilot, Cursor) into a single, searchable interface.
- Tree Navigation: filesystem watcher monitors a target directory for log files, automatically indexing them into a navigation tree.
- Detailed Request Analysis:
- Interpretation & Metadata: Displays extracted metadata, user intent interpretation, and key decisions.
- Context Inspection: View the exact context (code snippets, files) sent to the LLM.
- Action Tracking: visualizes automated actions (file creation, edits, command execution) in a structured grid.
- JSON Inspector: Built-in JSON viewer to inspect the raw underlying data for deep debugging.
- Markdown Rendering: Integrated
markdig-based markdown viewer for rendering log content and associated documentation. - Responsive UI: Modern, light-theme interface with collapsible sections and persistent window state.
The application monitors a specified directory (e.g., docs/requests) for JSON and Markdown log files. It supports custom schema formats used to track AI interactions:
- Copilot Logs: JSON-based session logs containing request/response cycles, token usage metrics, and workspace context.
- Cursor Logs: JSON/Markdown hybrid logs capturing "Tab" requests, diffs, and chat history.
- Configure Directory: Point the application to the root folder containing your request logs.
- Browse Sessions: Use the tree view on the left to navigate through sessions organized by date or folder structure.
- Inspect Requests: Click on a specific request to view its details in the main panel.
- Expand the Actions grid to see what file changes were performed.
- Check Interpretation to understand how the AI understood the task.
- Use the Original JSON expander to see the raw data fields.
Edit src/McpServerManager/appsettings.config (copied next to the executable) to set Mcp.BaseUrl, Paths.SessionsRootPath, Paths.HtmlCacheDirectory, and Paths.CssFallbackPath. Session logs are loaded from Mcp.BaseUrl (/mcpserver/sessionlog), while Paths.* is still used for documents/source context and markdown CSS fallback. Paths.HtmlCacheDirectory supports environment variables such as %TEMP%.
- Framework: Avalonia UI (Cross-platform .NET XAML framework)
- Language: C# / .NET 8
- Parsing:
System.Text.Jsonwith custom robust parsing for flexible schemas. - Markdown:
Markdig.Avaloniafor rendering formatted text.
# From repo root
cd src/McpServerManager
dotnet runUse NUKE from the repo root as the authoritative build/deploy entry point.
.\build.ps1
.\build.ps1 --target DeployAll
.\build.ps1 --target DeployAll --deploy-selection Director,WebUi,DesktopMsix
.\build.ps1 --target DeployAll --what-if
.\build.ps1 --target DeployAll --configuration Debug --deploy-selection Director,WebUi
.\build.ps1 BuildAndInstallVsix --what-ifCurrent target names:
DirectorWebUiAndroidPhoneAndroidEmulatorDesktopMsixDesktopDeb
Behavior notes:
build.ps1andbuild.share the primary entry points; they invokebuild\Build.csprojwith the repo root wired up for NUKE.- When invoked with no arguments, the root wrappers forward
--helpso you see NUKE help instead of accidentally running a default target. - For convenience, the wrappers treat the first bare argument as
--target, so commands like.\build.ps1 BuildAndInstallVsix --what-ifwork without spelling out--target. - The build is best-effort for deploy-all: unavailable targets are skipped and reported in the final summary.
--what-ifis the standard dry-run mechanism for NUKE-backed targets.DesktopMsixdeployment auto-elevates only the certificate trust/install step throughgsudo, avoiding elevated NUKE re-entry log-file conflicts; otherwise the build fails with guidance to installgsudoor rerun from an elevated PowerShell session.DesktopDebinstallation on Windows launches an interactive WSLsudoprompt so the user can enter their password when package installation is requested.- Legacy files under
scripts\now act as compatibility wrappers so existing commands continue to work while NUKE owns the orchestration logic. - For independent target execution, import
scripts\DeployAllTargets.psm1and call the exported compatibility functions directly, for exampleInvoke-DeployDirectorTool -Configuration Debug -WhatIf.
On WSL with WSLg enabled (Windows 11), the app window should appear on the Windows desktop. If it doesn’t:
- Check WSLg: Ensure you’re on Windows 11 with WSLg (no separate X server needed).
- Run from project:
cd src/McpServerManager && dotnet run -c Debug - Or use the script: From repo root,
chmod +x run-wslg.sh && ./run-wslg.sh - Taskbar: The window may show in the Windows taskbar; click it to bring it to front.