We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/BishalJena/fs-gate'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
update-api-key.shβ’1.65 KiB
#!/bin/bash
# Script to update DATAGOVIN_API_KEY in Docker deployment
# Usage: ./update-api-key.sh <new-api-key>
set -e
if [ $# -eq 0 ]; then
echo "Usage: $0 <new-datagovin-api-key>"
echo "Example: $0 57abc123def456"
exit 1
fi
NEW_API_KEY="$1"
ENV_FILE=".env"
echo "π§ Updating DATAGOVIN_API_KEY in Docker deployment..."
# Create .env file if it doesn't exist
if [ ! -f "$ENV_FILE" ]; then
echo "π Creating .env file from template..."
cp .env.example "$ENV_FILE"
fi
# Update the API key in .env file
if grep -q "DATAGOVIN_API_KEY=" "$ENV_FILE"; then
# Replace existing key
sed -i.bak "s/DATAGOVIN_API_KEY=.*/DATAGOVIN_API_KEY=$NEW_API_KEY/" "$ENV_FILE"
echo "β Updated existing DATAGOVIN_API_KEY in $ENV_FILE"
else
# Add new key
echo "DATAGOVIN_API_KEY=$NEW_API_KEY" >> "$ENV_FILE"
echo "β Added DATAGOVIN_API_KEY to $ENV_FILE"
fi
echo "π³ Restarting Docker services to apply changes..."
# Restart the agricultural-ai-server to pick up new API key
docker-compose restart agricultural-ai-server
echo "π API key updated successfully!"
echo "π Checking service health..."
# Wait a moment for service to start
sleep 5
# Check if service is healthy
if curl -f http://localhost:10001/health > /dev/null 2>&1; then
echo "β Service is healthy and running with new API key"
else
echo "β οΈ Service may still be starting. Check logs with: docker-compose logs agricultural-ai-server"
fi
echo ""
echo "π To verify the API key is working:"
echo "curl -X POST http://localhost:10001/tools/crop-price \\"
echo " -H 'Content-Type: application/json' \\"
echo " -d '{\"state\": \"Punjab\", \"commodity\": \"wheat\"}'"