Skip to content

Instantly share code, notes, and snippets.

@ataliba
Last active April 28, 2026 13:25
Show Gist options
  • Select an option

  • Save ataliba/35b2c6cd1ff73415220eb212f54437d7 to your computer and use it in GitHub Desktop.

Select an option

Save ataliba/35b2c6cd1ff73415220eb212f54437d7 to your computer and use it in GitHub Desktop.
#!/bin/bash
# πŸ“… Reclaim MCP - Standalone Installation Script
# Supports: Debian and Ubuntu
set -e
INSTALL_DIR="$HOME/reclaim-mcp-server"
MCP_REPO="https://github.com/erikmackinnon/reclaim-mcp-server.git"
NODE_MIN_VERSION=20
echo "πŸ“… Starting Reclaim MCP server setup..."
# 1. Install Node.js (>= 20), npm, git, curl
sudo apt-get update
sudo apt-get install -y git curl ca-certificates gnupg
# Use NodeSource to guarantee a modern Node version
# (Debian/Ubuntu default repos often ship outdated Node)
if ! command -v node &> /dev/null || [ "$(node -v | sed 's/v//' | cut -d. -f1)" -lt "$NODE_MIN_VERSION" ]; then
curl -fsSL https://deb.nodesource.com/setup_${NODE_MIN_VERSION}.x | sudo -E bash -
sudo apt-get install -y nodejs
fi
echo "βœ… Node.js $(node -v) ready."
# 2. Install Infisical CLI
if ! command -v infisical &> /dev/null; then
curl -1sLf 'https://dl.cloudsmith.io/public/infisical/infisical-cli/setup.deb.sh' | sudo -E bash
sudo apt-get install -y infisical
fi
# 3. Clone and build MCP
if [ ! -d "$INSTALL_DIR" ]; then
git clone "$MCP_REPO" "$INSTALL_DIR"
fi
cd "$INSTALL_DIR"
npm install
npm run build
# 4. Create systemd service
echo "βš™οΈ Configuring reclaim-mcp.service (systemd)..."
SERVICE_FILE="/etc/systemd/system/reclaim-mcp.service"
NODE_PATH=$(command -v node)
INFISICAL_PATH=$(command -v infisical)
sudo bash -c "cat <<EOF > $SERVICE_FILE
[Unit]
Description=Reclaim MCP Server (HTTP)
After=network.target
[Service]
Type=simple
User=$USER
WorkingDirectory=$INSTALL_DIR
ExecStart=$INFISICAL_PATH run -- $NODE_PATH dist/index.js
Environment=MCP_TRANSPORT=http
Environment=MCP_HTTP_HOST=0.0.0.0
Environment=MCP_HTTP_PORT=3000
Environment=MCP_HTTP_ALLOW_ANY_ORIGIN=true
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
EOF"
sudo systemctl daemon-reload
sudo systemctl enable reclaim-mcp
echo ""
echo "✨ Reclaim MCP Server ready on Debian/Ubuntu!"
echo "πŸ‘‰ Start: sudo systemctl start reclaim-mcp"
echo "πŸ‘‰ Logs: journalctl -u reclaim-mcp -f"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment