We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/altinakseven/tavily-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
deploy.shโข1.9 kB
#!/bin/bash
# Tavily MCP Server Deployment Script
set -e
echo "๐ Deploying Tavily MCP Server..."
# Check if we're in the right directory
if [ ! -f "package.json" ]; then
echo "โ Error: package.json not found. Please run this script from the tavily-mcp-server directory."
exit 1
fi
# Check if TAVILY_API_KEY is set
if [ -z "$TAVILY_API_KEY" ]; then
echo "โ Error: TAVILY_API_KEY environment variable is not set."
echo "Please set it with: export TAVILY_API_KEY='your-api-key-here'"
exit 1
fi
# Install dependencies
echo "๐ฆ Installing dependencies..."
npm install
# Run tests
echo "๐งช Running tests..."
npm test
# Build the project
echo "๐จ Building project..."
npm run build
# Check if PM2 is installed
if ! command -v pm2 &> /dev/null; then
echo "๐ฆ Installing PM2 globally..."
npm install -g pm2
fi
# Update PM2 config with actual API key
echo "โ๏ธ Updating PM2 configuration..."
sed -i "s/\"TAVILY_API_KEY\": \"\"/\"TAVILY_API_KEY\": \"$TAVILY_API_KEY\"/g" pm2-apps.json
# Create log directory if it doesn't exist
sudo mkdir -p /var/log/pm2
sudo chown $USER:$USER /var/log/pm2
# Stop existing process if running
echo "๐ Stopping existing process..."
pm2 stop tavily-mcp-server 2>/dev/null || true
pm2 delete tavily-mcp-server 2>/dev/null || true
# Start the server with PM2
echo "๐ Starting server with PM2..."
pm2 start pm2-apps.json
# Save PM2 configuration
pm2 save
# Setup PM2 startup script
pm2 startup
echo "โ Deployment complete!"
echo ""
echo "๐ Server status:"
pm2 status
echo ""
echo "๐ Useful commands:"
echo " pm2 logs tavily-mcp-server # View logs"
echo " pm2 restart tavily-mcp-server # Restart server"
echo " pm2 stop tavily-mcp-server # Stop server"
echo " pm2 monit # Monitor all processes"
echo ""
echo "๐ The server is now running and ready to accept MCP connections!"