Skip to content

Disable Tracy debug bar in mcp-inspector.php#2

Open
eydun wants to merge 3 commits intonette:masterfrom
eydun:master
Open

Disable Tracy debug bar in mcp-inspector.php#2
eydun wants to merge 3 commits intonette:masterfrom
eydun:master

Conversation

@eydun
Copy link

@eydun eydun commented Feb 21, 2026

Tracy appends an HTML comment block to the output buffer. This pollutes JSON-RPC responses and causes clients to fail
with Unexpected non-whitespace character after JSON.
Added a guard to disable the bar before the request is processed.

dg and others added 3 commits January 9, 2026 13:00
Conditionally disable Tracy\Debugger::$showBar in www/mcp-inspector.php if the Tracy Debugger class exists.
Copilot AI review requested due to automatic review settings February 21, 2026 18:25
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a critical bug in the MCP inspector HTTP endpoint where Tracy's debug bar was corrupting JSON-RPC responses by appending HTML comments to the output buffer. The fix disables Tracy's debug bar before processing requests in the HTTP mode entry point.

Changes:

  • Added a guard to disable Tracy's debug bar in the HTTP mode entry point (www/mcp-inspector.php)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants