Skip to content

Use info level when starting up server #1279

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bruno-oliveira
Copy link

Description

Changed server startup logging from error level to info level to better reflect the non-error nature of the startup message.

Server Details

  • Server: brave-search
  • Changes to: logging level in server startup

Motivation and Context

The server startup message was incorrectly using error level logging, which could cause confusion during monitoring and potentially trigger false alarms in log analysis systems. Using info level is more appropriate for operational status messages that don't indicate problems.

How Has This Been Tested?

Verified server starts correctly with the new logging level and that the message appears properly in logs.

Breaking Changes

None. This is purely a server-side logging change with no impact on client functionality.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Protocol Documentation
  • My changes follows MCP security best practices
  • I have updated the server's README accordingly
  • I have tested this with an LLM client
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have documented all environment variables and configuration options

Additional context

This change aligns with standard logging practices where error level should be reserved for actual error conditions.

@@ -367,7 +367,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
async function runServer() {
const transport = new StdioServerTransport();
await server.connect(transport);
console.error("Brave Search MCP Server running on stdio");
Copy link
Contributor

Choose a reason for hiding this comment

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

I think that this needs to stay console.error since stdio is being used as the server transport. I made the same correction on servers before and Claude Desktop started throwing errors.

Copy link
Author

Choose a reason for hiding this comment

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

Maybe we can leave a comment here to indicate that reasoning then?

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.

2 participants