Merge pull request #39 from modelcontextprotocol/justin/fix-console-log
Fix TypeScript first server logging to stdout
This commit is contained in:
commit
4cee64bb2d
1 changed files with 4 additions and 1 deletions
|
|
@ -192,7 +192,10 @@ This guide uses the OpenWeatherMap API. You'll need a free API key from [OpenWea
|
|||
async run(): Promise<void> {
|
||||
const transport = new StdioServerTransport();
|
||||
await this.server.connect(transport);
|
||||
console.log("Weather MCP server running on stdio");
|
||||
|
||||
// Although this is just an informative message, we must log to stderr,
|
||||
// to avoid interfering with MCP communication that happens on stdout
|
||||
console.error("Weather MCP server running on stdio");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue