Add Debug Logs for thv run Server Location #2834
Merged
+3 −1
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
Summary
Add debug logs that differentiate which type of MCP server we're attempting to run.
Fixes #2761
Implementation Details
The linked issue gestures towards an ideal solution where we have one log per type of MCP server. The existing code branches in quite a few places (e.g. there are two different paths for differentiating between remote and registry MCP servers). Instead of adding logging to these cases exhaustively, I opted to make an incremental improvement in the debug logs.
I'd prefer to consolidate the existing code into fewer branches before adding more logs, but if someone feels strongly LMK and I can accommodate.
Testing
I verified the new logs appear locally by running


task buildand then a series ofbin/thv run --debugcommands. Output pictured below: