Skip to main content
Glama

Drip MCP Server

by ctrlswing
test_api.sh4.4 kB
#!/bin/bash # Simple Drip API Test Script # This script tests your Drip API credentials using curl echo "========================================" echo "Drip API Connection Test" echo "========================================" # Check if environment variables are set if [ -z "$DRIP_API_KEY" ]; then echo "❌ DRIP_API_KEY is not set" echo "Set it with: export DRIP_API_KEY='your-api-key'" exit 1 fi if [ -z "$DRIP_ACCOUNT_ID" ]; then echo "❌ DRIP_ACCOUNT_ID is not set" echo "Set it with: export DRIP_ACCOUNT_ID='your-account-id'" exit 1 fi echo "✅ Environment variables found" echo " API Key: ****${DRIP_API_KEY: -4}" echo " Account ID: $DRIP_ACCOUNT_ID" echo "" # Test 1: List all accounts (doesn't need account ID) echo "Test 1: Listing accounts..." echo "----------------------------------------" echo "Command: curl -u '$DRIP_API_KEY:' https://api.getdrip.com/v2/accounts" echo "" response=$(curl -s -w "\nHTTP_CODE:%{http_code}" -u "$DRIP_API_KEY:" \ -H "Content-Type: application/json" \ -H "User-Agent: Drip API Test" \ https://api.getdrip.com/v2/accounts 2>&1) http_code=$(echo "$response" | grep "HTTP_CODE:" | cut -d: -f2) body=$(echo "$response" | sed '/HTTP_CODE:/d') echo "HTTP Status: $http_code" if [ "$http_code" = "200" ]; then echo "✅ Authentication successful!" echo "" echo "Response preview:" echo "$body" | python3 -m json.tool 2>/dev/null | head -20 || echo "$body" | head -20 # Check if account ID exists in response if echo "$body" | grep -q "\"id\":\"$DRIP_ACCOUNT_ID\""; then echo "" echo "✅ Your account ID ($DRIP_ACCOUNT_ID) found!" else echo "" echo "⚠️ Your account ID ($DRIP_ACCOUNT_ID) not found in response" echo "Available account IDs:" echo "$body" | grep -o '"id":"[^"]*"' | cut -d'"' -f4 fi elif [ "$http_code" = "401" ]; then echo "❌ Authentication failed (401)" echo "" echo "Please check:" echo "1. You're using the API Token (not your password)" echo "2. The token hasn't been revoked/regenerated" echo "3. The token is copied correctly (no extra spaces)" echo "" echo "Get your API token from:" echo "Drip Dashboard → Settings → My User Settings → API Token" elif [ "$http_code" = "000" ]; then echo "❌ Connection failed (couldn't reach server)" echo "" echo "Possible causes:" echo "1. No internet connection" echo "2. Firewall blocking HTTPS" echo "3. Proxy configuration issues" echo "" echo "Testing general internet connectivity..." if curl -s https://httpbin.org/get > /dev/null 2>&1; then echo "✅ General internet works" echo "❌ But cannot reach Drip API" else echo "❌ No internet connectivity" fi else echo "❌ Unexpected response code: $http_code" echo "Response:" echo "$body" | head -50 fi echo "" echo "========================================" # Test 2: Get specific account if [ "$http_code" = "200" ]; then echo "" echo "Test 2: Getting specific account..." echo "----------------------------------------" echo "Command: curl -u '$DRIP_API_KEY:' https://api.getdrip.com/v2/accounts/$DRIP_ACCOUNT_ID" echo "" response2=$(curl -s -w "\nHTTP_CODE:%{http_code}" -u "$DRIP_API_KEY:" \ -H "Content-Type: application/json" \ -H "User-Agent: Drip API Test" \ https://api.getdrip.com/v2/accounts/$DRIP_ACCOUNT_ID 2>&1) http_code2=$(echo "$response2" | grep "HTTP_CODE:" | cut -d: -f2) echo "HTTP Status: $http_code2" if [ "$http_code2" = "200" ]; then echo "✅ Can access your specific account!" elif [ "$http_code2" = "404" ]; then echo "❌ Account not found (404)" echo "The account ID might be incorrect" else echo "❌ Unexpected response: $http_code2" fi fi echo "" echo "========================================" echo "Test complete!" echo "" if [ "$http_code" = "200" ]; then echo "✅ Your API credentials are working!" echo "" echo "Next steps:" echo "1. The drip_mcp.py server should work now" echo "2. Run: python3 drip_mcp.py" echo "3. Configure Claude Code with these credentials" else echo "❌ Fix the issues above before using the MCP server" fi echo "========================================"

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/ctrlswing/drip_mcp'

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