import json,urllib.request
MCP="https://mcp.nonceprotocol.xyz/mcp"
body=json.dumps({"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"protocol_info","arguments":{}}}).encode()
req=urllib.request.Request(MCP,data=body,headers={"Content-Type":"application/json","Accept":"application/json, text/event-stream","User-Agent":"curl/8.7.1"})
try:
    r=urllib.request.urlopen(req,timeout=25)
    print("STATUS",r.status)
    print(r.read().decode()[:200])
except Exception as e:
    print("ERR",type(e).__name__,repr(e))
    c=getattr(e,"code",None)
    print("CODE",c)
    h=getattr(e,"headers",None)
    print("HDRS",dict(h) if h else None)
    try:
        print("BODY",e.read().decode()[:400])
    except Exception as e2:
        print("nobody",e2)
