From 2d6a5cda8f866b4931de6d639d5f521e12180aaf Mon Sep 17 00:00:00 2001 From: root Date: Thu, 9 Oct 2025 06:52:50 +0200 Subject: [PATCH] Add MCP stdio wrapper script with logging disabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Create start-mcp.sh wrapper for Claude Code MCP integration - Load NVM environment for proper Node.js access - Disable logging (MCP_LOG_LEVEL=silent) to fix stdio protocol - Suppress stderr to prevent JSON parsing errors in MCP client - Update package-lock.json from npm install 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- package-lock.json | 4 ++-- start-mcp.sh | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100755 start-mcp.sh diff --git a/package-lock.json b/package-lock.json index 14e70ca..34fefd4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "mcp-server", + "name": "lupul-augmentat", "version": "0.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "mcp-server", + "name": "lupul-augmentat", "version": "0.1.0", "license": "MIT", "dependencies": { diff --git a/start-mcp.sh b/start-mcp.sh new file mode 100755 index 0000000..191955a --- /dev/null +++ b/start-mcp.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# MCP Server Startup Wrapper +# Ensures proper Node.js environment is loaded + +# Load NVM if available +export NVM_DIR="$HOME/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" + +# Change to Lupul directory +cd /srv/Lupul-Augmentat + +# Load environment variables +if [ -f .env ]; then + export $(cat .env | grep -v '^#' | xargs) +fi + +# Disable all logging for MCP stdio protocol +export MCP_LOG_LEVEL=silent + +# Start the server with ts-node, suppress all logs +exec npx ts-node src/server.ts 2>/dev/null