Skip to main content
Glama

Agricultural AI MCP Server

by BishalJena
update-api-key.sh•1.69 kB
#!/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\"}'"

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/BishalJena/fs-gate'

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