Skip to content

feat(mcp): implement MCP_LOG_LEVEL stderr logging (#558) - #564

Open
developmentwithparth1311 wants to merge 1 commit into
mind-vault-1:mainfrom
developmentwithparth1311:fix/558-mcp-log-level-stderr
Open

feat(mcp): implement MCP_LOG_LEVEL stderr logging (#558)#564
developmentwithparth1311 wants to merge 1 commit into
mind-vault-1:mainfrom
developmentwithparth1311:fix/558-mcp-log-level-stderr

Conversation

@developmentwithparth1311

Copy link
Copy Markdown

Resolves #558 by introducing an MCP_LOG_LEVEL controlled logger in the @mindvault/mcp package.

Summary of Changes

  • Logger Module (logger.ts): Implemented a dedicated logger supporting debug, info, warn, and error priorities with fallback to info.
  • Stdio Safety: Guaranteed all log outputs are written exclusively to process.stderr (using util.format) to avoid corrupting stdout MCP transport messages.
  • Refactoring (index.ts): Replaced ad-hoc console.error calls with appropriate logger.* levels. Resolved a pre-existing setupGracefulShutdown compilation blocker.
  • Unit Testing (logger.test.ts): Added comprehensive test coverage verifying priority filtering, default fallbacks, and stdout isolation.
  • Documentation: Added MCP_LOG_LEVEL details to README.md and mcp-client-configs.md.

Verification

  • Ran pnpm --filter @mindvault/mcp test — all logger unit tests pass cleanly.
  • Verified the package compiles and builds without any TypeScript errors.

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.

[MCP] Add MCP_LOG_LEVEL-controlled stderr logging

1 participant