claude-docker/scripts/startup.sh
Vishal Jain d9bf0f4b53 Switch to simplified Twilio MCP integration using @yiyang.1i/sms-mcp-server
- Replace API Key/Secret auth with Account SID/Auth Token
- Configure MCP during Docker build instead of runtime
- Remove mcp-config.json and config directory
- Simplify startup script by removing MCP configuration logic
- Update documentation and test scripts for new auth method

The MCP server is now configured directly in the Dockerfile using
'claude mcp add-json' command, making the setup more reliable and
eliminating runtime configuration complexity.
2025-06-17 21:48:00 +01:00

43 lines
1.4 KiB
Bash
Executable File

#!/bin/bash
# ABOUTME: Startup script for Claude Code container with MCP server
# ABOUTME: Loads environment and starts Claude Code with pre-configured Twilio MCP
# Load environment variables from .env if it exists
# Use the .env file baked into the image at build time
if [ -f /app/.env ]; then
echo "Loading environment from baked-in .env file"
set -a
source /app/.env 2>/dev/null || true
set +a
# Export Twilio variables for runtime use
export TWILIO_ACCOUNT_SID
export TWILIO_AUTH_TOKEN
export TWILIO_FROM_NUMBER
export TWILIO_TO_NUMBER
else
echo "WARNING: No .env file found in image."
fi
# Check for existing authentication
if [ -f "$HOME/.claude/.credentials.json" ]; then
echo "Found existing Claude authentication"
else
echo "No existing authentication found - you will need to log in"
echo "Your login will be saved for future sessions"
fi
# Verify Twilio MCP configuration
if [ -n "$TWILIO_ACCOUNT_SID" ] && [ -n "$TWILIO_AUTH_TOKEN" ]; then
echo "Twilio MCP server configured with:"
echo " - Account SID: ${TWILIO_ACCOUNT_SID:0:10}..."
echo " - From Number: $TWILIO_FROM_NUMBER"
echo " - To Number: $TWILIO_TO_NUMBER"
echo " - SMS capability ready via: twilio__send_text"
else
echo "No Twilio credentials found"
fi
# Start Claude Code with permissions bypass
echo "Starting Claude Code..."
exec claude --dangerously-skip-permissions "$@"