try to add debugging to mcp server

This commit is contained in:
ssalbdivad
2025-10-09 18:04:00 -04:00
parent 008021df1c
commit 6d9c6fd2b1
5 changed files with 62 additions and 3 deletions
+16
View File
@@ -0,0 +1,16 @@
#!/bin/bash
# Wrapper script to capture MCP server logs for debugging
LOG_FILE="/tmp/mcp-server.log"
echo "=== MCP Server Debug Wrapper Starting ===" >> "$LOG_FILE"
echo "Timestamp: $(date)" >> "$LOG_FILE"
echo "Working directory: $(pwd)" >> "$LOG_FILE"
echo "Environment variables:" >> "$LOG_FILE"
env | grep -E "(GITHUB_|MCP_|NODE_)" >> "$LOG_FILE"
echo "Node.js version: $(node --version)" >> "$LOG_FILE"
echo "Arguments: $@" >> "$LOG_FILE"
echo "=== Starting MCP Server ===" >> "$LOG_FILE"
# Execute the actual MCP server, capturing both stdout and stderr
exec node "$@" 2>&1 | tee -a "$LOG_FILE"