Skip to main content
Glama

SAP Note Search MCP Server

by marianfoo
start-debug-safe.sh•1.94 kB
#!/bin/bash # Safest way to start debug - avoids race conditions # This script aggressively cleans and uses longer waits set -e echo "šŸ›”ļø SAFE DEBUG START šŸ›”ļø" echo "" # Step 1: Nuclear cleanup echo "1ļøāƒ£ Aggressive cleanup..." pkill -9 -f "http-mcp-server.js" 2>/dev/null && echo " āœ“ Killed server processes" || echo " āœ“ No server processes" pm2 stop mcp-sap-notes 2>/dev/null && echo " āœ“ Stopped PM2" || echo " āœ“ No PM2 process" # Step 2: Wait and verify multiple times echo "2ļøāƒ£ Waiting for port 3123 to be completely free..." for i in {1..15}; do if ! lsof -ti :3123 &>/dev/null; then echo " āœ… Port 3123 is free (checked $i times)" break fi PID=$(lsof -ti :3123 2>/dev/null || echo "") if [ -n "$PID" ]; then echo " āš ļø Attempt $i: Found PID $PID, killing..." kill -9 $PID 2>/dev/null fi sleep 2 done # Step 3: Final verification echo "3ļøāƒ£ Final port verification..." sleep 3 if lsof -ti :3123 &>/dev/null; then echo "āŒ FAILED: Port 3123 is STILL in use after aggressive cleanup" echo "" echo "Current processes on port 3123:" lsof -i :3123 echo "" echo "šŸ’” Something is persistently binding to this port." echo " Try using a different port by setting HTTP_PORT=3124 in .env" exit 1 fi echo " āœ… Port 3123 is FREE and stable" # Step 4: Pre-build (outside of debug script to avoid timing issues) echo "4ļøāƒ£ Building project..." npm run build --silent # Step 5: One more check before starting echo "5ļøāƒ£ Pre-flight check..." sleep 1 if lsof -ti :3123 &>/dev/null; then echo "āŒ Port was grabbed during build!" kill -9 $(lsof -ti :3123) sleep 2 fi # Step 6: Start server directly (skip npm to avoid spawning issues) echo "6ļøāƒ£ Starting debug server..." echo "" LOG_LEVEL=debug HTTP_PORT=3123 AUTO_START=true DEBUG_START=true node dist/http-mcp-server.js

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/marianfoo/mcp-sap-notes'

If you have feedback or need assistance with the MCP directory API, please join our Discord server