Skip to content

Conversation

@zmofei
Copy link
Member

@zmofei zmofei commented Nov 21, 2025

Description

This pull request focuses on improving the initialization and logging process for tracing in the src/index.ts server startup sequence. The changes ensure that tracing initialization errors are captured and logged after the server connection is established, and add support for logging as a server capability.

Key improvements include:

Tracing initialization and error handling:

  • Errors during tracing initialization are now stored and logged only after the server has connected, ensuring logging messages are delivered reliably. [1] [2]
  • The tracing error is now consistently captured as an Error object for better message formatting. [1] [2]

Server capabilities and startup sequence:

  • Added a logging capability to the server's advertised capabilities, making it clear that logging is supported.
  • The order of server connection and message logging has been adjusted so that all logging (including tracing errors and status) occurs after the server is ready to send messages. [1] [2]
image
  • Closes #[issue-number] (if applicable)

Testing


Checklist

  • Code has been tested locally
  • Unit tests have been added or updated
  • Documentation has been updated if needed

Additional Notes

@zmofei zmofei requested a review from a team as a code owner November 21, 2025 11:25
@zmofei zmofei changed the title Add logging [WIP] Add logging Nov 21, 2025
@mattpodwysocki
Copy link
Contributor

@zmofei Why did we bump or were we bumping manifest versions since 7.0 had not been released yet?

@zmofei zmofei changed the title [WIP] Add logging Add logging Dec 9, 2025
@zmofei zmofei requested a review from Copilot December 9, 2025 09:33
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 bumps the version to 0.7.1 and fixes logging reliability during server startup by ensuring the transport connection is established before sending any log messages.

Key changes:

  • Enabled the logging capability in the MCP server configuration
  • Deferred tracing initialization error logging until after server connection is established
  • Moved server connection earlier in the startup sequence to ensure all logging messages are sent through a ready transport

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