#!/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"