Skip to main content
Glama
deploy.sh2.98 kB
#!/bin/bash # FluentBoards MCP Server Deployment Script # This script builds and deploys the MCP server set -e # Exit on any error # Colors for output RED='\033[0;31m' GREEN='\033[0;32m' YELLOW='\033[1;33m' NC='\033[0m' # No Color # Configuration SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" PROJECT_DIR="$(dirname "$SCRIPT_DIR")" DIST_DIR="$PROJECT_DIR/dist" BACKUP_DIR="$PROJECT_DIR/backup" echo -e "${GREEN}🚀 FluentBoards MCP Server Deployment${NC}" echo "===============================================" # Check if we're in the right directory if [ ! -f "$PROJECT_DIR/package.json" ]; then echo -e "${RED}❌ Error: package.json not found. Please run from the mcp-server-app directory.${NC}" exit 1 fi # Check if node_modules exists if [ ! -d "$PROJECT_DIR/node_modules" ]; then echo -e "${YELLOW}⚠️ node_modules not found. Installing dependencies...${NC}" cd "$PROJECT_DIR" && npm install fi # Backup existing dist if it exists if [ -d "$DIST_DIR" ]; then echo -e "${YELLOW}📦 Backing up existing dist directory...${NC}" rm -rf "$BACKUP_DIR" mkdir -p "$BACKUP_DIR" cp -r "$DIST_DIR" "$BACKUP_DIR/dist-$(date +%Y%m%d-%H%M%S)" echo -e "${GREEN}✅ Backup created${NC}" fi # Build the project echo -e "${YELLOW}🔨 Building project...${NC}" cd "$PROJECT_DIR" npm run build if [ $? -eq 0 ]; then echo -e "${GREEN}✅ Build successful${NC}" else echo -e "${RED}❌ Build failed${NC}" exit 1 fi # Verify build output if [ ! -f "$DIST_DIR/index.js" ]; then echo -e "${RED}❌ Build output not found at $DIST_DIR/index.js${NC}" exit 1 fi # Test the server echo -e "${YELLOW}🧪 Testing server startup...${NC}" timeout 5s node "$DIST_DIR/index.js" 2>&1 | grep -q "FluentBoards MCP server running" && echo -e "${GREEN}✅ Server test passed${NC}" || echo -e "${YELLOW}⚠️ Server test timed out (this is expected)${NC}" # Show file sizes echo -e "${YELLOW}📊 Build artifacts:${NC}" du -h "$DIST_DIR"/* | sort -h # Get current git info if command -v git &> /dev/null && [ -d "$PROJECT_DIR/.git" ]; then echo -e "${YELLOW}📝 Git info:${NC}" echo " Branch: $(git branch --show-current)" echo " Commit: $(git rev-parse --short HEAD)" echo " Date: $(git log -1 --format=%cd --date=short)" fi # Show configuration reminder echo -e "${YELLOW}⚙️ Configuration reminder:${NC}" echo " Make sure your MCP client is configured with:" echo " - Command: node" echo " - Args: [\"$DIST_DIR/index.js\"]" echo " - Environment variables: WORDPRESS_URL, WORDPRESS_USERNAME, WORDPRESS_APP_PASSWORD" echo -e "${GREEN}🎉 Deployment completed successfully!${NC}" echo "===============================================" # Optional: Show how to test echo -e "${YELLOW}💡 To test the deployed server:${NC}" echo " 1. Update your MCP client configuration" echo " 2. Restart your MCP client (e.g., Claude Desktop)" echo " 3. Test with: 'Can you run the debug_test tool?'"

Latest Blog Posts

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/danieliser/fluent-boards-mcp-server'

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