registry/tools/admin/takedown.sh
adam jones 8afe162f6f
feat: add admin operations documentation and scripts for server management (#323)
## Summary
- Added comprehensive admin operations documentation
- Included scripts for common server management tasks

Together with #315, #316, this fixes #182
2025-08-28 23:40:50 +01:00

17 lines
No EOL
551 B
Shell
Executable file

#!/bin/bash
# Simple takedown script
REGISTRY_URL="${REGISTRY_URL:-https://registry.modelcontextprotocol.io}"
if [ -z "$SERVER_ID" ] || [ -z "$REGISTRY_TOKEN" ]; then
echo "Usage: REGISTRY_TOKEN=<token> SERVER_ID=<server-uuid> $0"
exit 1
fi
# Get current server and update status to deleted
curl -s "${REGISTRY_URL}/v0/servers/${SERVER_ID}" | \
jq '.status = "deleted" | {server: .}' | \
curl -X PUT "${REGISTRY_URL}/v0/servers/${SERVER_ID}" \
-H "Authorization: Bearer ${REGISTRY_TOKEN}" \
-H "Content-Type: application/json" \
-d @-