mirror of
https://github.com/run-llama/mcp-server-llamacloud.git
synced 2026-06-30 20:47:54 -04:00
[PR #7] [MERGED] fix: send startup logs to stderr to keep stdout JSON-only #7
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/run-llama/mcp-server-llamacloud/pull/7
Author: @Odysseus-deep
Created: 5/6/2025
Status: ✅ Merged
Merged: 5/6/2025
Merged by: @marcusschiesser
Base:
main← Head:fix/stdout-logs📝 Commits (4)
6253cfffix: send startup logs to stderr to keep stdout JSON-only0943d92chore: fix prettier formatting in index.ts942a02cchore: ignore Morgan prompts from version control9239ee5chore: reformat with fresh Prettier cache📊 Changes
3 files changed (+11 additions, -5 deletions)
View changed files
➕
.DS_Store(+0 -0)📝
.gitignore(+3 -1)📝
src/index.ts(+8 -4)📄 Description
When starting the server, two log lines (
Created index…andStarting MCP server…) were printed to stdout before the first JSON-RPC message. This caused Claude Desktop and other strict MCP clients to throw:Unexpected token 'C' … is not valid JSONThis PR moves those logs to
stderr, sostdoutremains a valid JSON-RPC channel from the very beginning.Closes #5.
Tested locally with:
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.