#!/usr/bin/env bash
echo "🚀 CME MCP Server - Complete Interaction Guide"
echo "=" * 60
# Base URL
BASE_URL="http://localhost:8080"
echo "✅ 1. Health Check"
curl -s "$BASE_URL/health" | python3 -m json.tool
echo ""
echo "✅ 2. List Available MCP Tools"
curl -s "$BASE_URL/mcp/tools" | python3 -m json.tool
echo ""
echo "✅ 3. Test Contract Info Tool"
curl -X POST "$BASE_URL/mcp/call_tool" \
-H "Content-Type: application/json" \
-d '{"name": "get_contract_info", "arguments": {"contract_symbol": "BTC_95000_YES"}}' | python3 -m json.tool
echo ""
echo "✅ 4. Test Trading Data Query"
curl -X POST "$BASE_URL/mcp/call_tool" \
-H "Content-Type: application/json" \
-d '{
"name": "query_trading_data",
"arguments": {
"contract_symbol": "BTC_95000_YES",
"start_time": "2025-12-19T00:00:00Z",
"end_time": "2025-12-19T23:59:59Z"
}
}' | python3 -m json.tool
echo ""
echo "✅ 5. Test Claim Verification"
curl -X POST "$BASE_URL/mcp/call_tool" \
-H "Content-Type: application/json" \
-d '{
"name": "verify_claim",
"arguments": {
"claim_text": "Bitcoin reached $95000 today"
}
}' | python3 -m json.tool
echo ""
echo "🎉 Complete! All MCP tools are working."
echo ""
echo "📚 Access Interactive Documentation:"
echo " • Swagger UI: $BASE_URL/docs"
echo " • OpenAPI Schema: $BASE_URL/openapi.json"
echo ""
echo "🔧 Available Endpoints:"
echo " • GET /mcp/tools - List all tools"
echo " • POST /mcp/call_tool - Call any tool"
echo " • POST /mcp/messages - Raw MCP protocol"
echo " • GET /health - Server health status"