Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"license": "MIT",
"dependencies": {
"@modelcontextprotocol/sdk": "^1.26.0",
Copy link

Choose a reason for hiding this comment

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

Bug: The dotenv v17 upgrade logs to stdout by default during module import, before console.log is redirected. This will corrupt the StdioServerTransport protocol stream.
Severity: CRITICAL

Suggested Fix

To prevent dotenv from logging to stdout, add the { quiet: true } option to the dotenv.config() call in src/services/config.ts.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: package.json#L26

Potential issue: The upgrade of the `dotenv` package to v17 introduces a breaking change
where logging to `stdout` is enabled by default. The `dotenv.config()` function is
called during the initial module loading in `src/services/config.ts`, which occurs
before `src/index.ts` redirects `console.log` output to `stderr`. Consequently, `dotenv`
writes an informational message to `stdout`. This interferes with the
`StdioServerTransport` used by the MCP server, which requires a clean `stdout` stream
for its protocol communication, leading to potential communication failure.

Did we get this right? 👍 / 👎 to inform future reviews.

"dotenv": "^16.4.5"
"dotenv": "^17.3.1"
},
"devDependencies": {
"@types/node": "^22.10.5",
Expand Down
Loading