flipside-mcp-extension/test-proxy.sh
Erik Brakke a179b10854 Initial commit: Flipside Intelligence MCP Extension
- Add Go-based MCP proxy for Flipside Intelligence blockchain analytics
- Configure project structure with proper Go module naming
- Include comprehensive README focused on product vision
- Add manifest.json for Claude Desktop integration
- Setup build automation with Makefile and test scripts
- Configure .gitignore for Go project best practices

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-01 14:06:57 -06:00

83 lines
2.1 KiB
Bash
Executable File

#!/bin/bash
# Test script for the MCP remote proxy
# This simulates how Claude Desktop would interact with the proxy
set -e
# Colors for output
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
# Configuration
REMOTE_URL="${MCP_REMOTE_URL:-https://mcp.flipsidecrypto.xyz/beta/sse}"
API_KEY="${FLIPSIDE_API_KEY}"
DEBUG="${MCP_DEBUG:-true}"
if [ -z "$API_KEY" ]; then
echo "Error: FLIPSIDE_API_KEY environment variable is required"
echo "Usage: FLIPSIDE_API_KEY=your_key ./test-proxy.sh"
exit 1
fi
echo -e "${BLUE}🧪 Testing MCP Remote Proxy${NC}"
echo -e "${BLUE}Remote URL: ${REMOTE_URL}${NC}"
echo -e "${BLUE}Debug Mode: ${DEBUG}${NC}"
echo -e "${BLUE}API Key: ${API_KEY:0:8}...${NC}"
echo ""
# Build the proxy if it doesn't exist
if [ ! -f "./remote-mcp-proxy" ]; then
echo -e "${YELLOW}Building proxy binary...${NC}"
go build -o remote-mcp-proxy .
fi
# Function to test a message
test_message() {
local message="$1"
local description="$2"
echo -e "${YELLOW}📤 Testing: ${description}${NC}"
echo -e "${BLUE}Message: ${message}${NC}"
echo -e "${GREEN}Response (press Ctrl+C when done):${NC}"
echo ""
echo "$message" | MCP_REMOTE_URL="$REMOTE_URL" FLIPSIDE_API_KEY="$API_KEY" MCP_DEBUG="$DEBUG" ./remote-mcp-proxy
echo ""
echo -e "${BLUE}────────────────────────────────────${NC}"
echo ""
}
echo -e "${GREEN}🚀 Starting proxy tests...${NC}"
echo ""
# Test 1: Initialize
echo "TEST 1: Initialize"
read -p "Press Enter to continue or Ctrl+C to skip..."
test_message '{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2024-11-05",
"capabilities": {},
"clientInfo": {
"name": "test-client",
"version": "1.0.0"
}
}
}' "Initialize"
# Test 2: List Tools
echo "TEST 2: List Tools"
read -p "Press Enter to continue or Ctrl+C to skip..."
test_message '{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/list"
}' "List Tools"
echo -e "${GREEN}✅ All tests completed!${NC}"