We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/elevanaltd/smartsuite-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
start-server.sh•2.92 KiB
#!/usr/bin/env bash
# SmartSuite MCP Server Startup Script
# Usage: ./scripts/start-server.sh [options]
#
# Options:
# --validate Run validation mode and exit
# --dev Run in development mode with auto-reload
# --build Build before starting
# --help Show this help message
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"
cd "${PROJECT_ROOT}"
# Colors for output
GREEN='\033[0;32m'
BLUE='\033[0;34m'
YELLOW='\033[1;33m'
RED='\033[0;31m'
NC='\033[0m' # No Color
# Parse arguments
VALIDATE_MODE=false
DEV_MODE=false
BUILD_FIRST=false
for arg in "$@"; do
case $arg in
--validate)
VALIDATE_MODE=true
shift
;;
--dev)
DEV_MODE=true
shift
;;
--build)
BUILD_FIRST=true
shift
;;
--help)
echo "SmartSuite MCP Server Startup Script"
echo ""
echo "Usage: ./scripts/start-server.sh [options]"
echo ""
echo "Options:"
echo " --validate Run validation mode and exit"
echo " --dev Run in development mode with auto-reload"
echo " --build Build before starting"
echo " --help Show this help message"
exit 0
;;
*)
echo -e "${RED}Unknown option: $arg${NC}"
echo "Use --help for usage information"
exit 1
;;
esac
done
# Check for .env file
if [ ! -f .env ]; then
echo -e "${RED}Error: .env file not found${NC}"
echo "Please create a .env file with your SmartSuite credentials:"
echo " cp .env.example .env"
echo " # Edit .env and add your SMARTSUITE_API_KEY and SMARTSUITE_WORKSPACE_ID"
exit 1
fi
# Load environment variables from .env
echo -e "${BLUE}Loading environment from .env...${NC}"
set -a
source .env
set +a
# Verify required environment variables
if [ -z "${SMARTSUITE_API_KEY}" ]; then
echo -e "${RED}Error: SMARTSUITE_API_KEY not set in .env${NC}"
exit 1
fi
if [ -z "${SMARTSUITE_WORKSPACE_ID}" ]; then
echo -e "${RED}Error: SMARTSUITE_WORKSPACE_ID not set in .env${NC}"
exit 1
fi
echo -e "${GREEN}✓ Environment configured${NC}"
echo -e " Workspace: ${SMARTSUITE_WORKSPACE_ID}"
echo -e " API Key: ${SMARTSUITE_API_KEY:0:8}...${SMARTSUITE_API_KEY: -4}"
# Build if requested
if [ "$BUILD_FIRST" = true ]; then
echo -e "${BLUE}Building project...${NC}"
npm run build
echo -e "${GREEN}✓ Build complete${NC}"
fi
# Check if build directory exists
if [ ! -d "build" ]; then
echo -e "${YELLOW}Build directory not found. Running build...${NC}"
npm run build
fi
# Run the server
if [ "$DEV_MODE" = true ]; then
echo -e "${BLUE}Starting in development mode...${NC}"
npm run dev
elif [ "$VALIDATE_MODE" = true ]; then
echo -e "${BLUE}Running validation mode...${NC}"
MCP_VALIDATE_AND_EXIT=true node build/src/index.js
echo -e "${GREEN}✓ Validation complete${NC}"
else
echo -e "${BLUE}Starting SmartSuite MCP Server...${NC}"
node build/src/index.js
fi