Created
January 28, 2026 10:54
-
-
Save david-martin/98ea28ade4c3b302926c5776d68c746f to your computer and use it in GitHub Desktop.
verify init, list, event-stream
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl --include -X POST -H "Content-Type: application/json" -H "Accept: application/json, text/event-stream" http://mcp.127-0-0-1.sslip.io:8001/mcp --data ' | |
| { | |
| "jsonrpc": "2.0", | |
| "id": 1, | |
| "method": "initialize", | |
| "params": { | |
| "protocolVersion": "2025-06-18", | |
| "capabilities": { | |
| "roots": { | |
| "listChanged": true | |
| }, | |
| "sampling": {} | |
| }, | |
| "clientInfo": { | |
| "name": "ExampleClient", | |
| "version": "1.0.0" | |
| } | |
| } | |
| } | |
| ' | tee /tmp/init-response.txt | |
| SESSION_ID=$(cat /tmp/init-response.txt | grep -i mcp-session-id: | sed 's/mcp-session-id: //I' | sed 's/\r//g') | |
| echo SESSION_ID is ${SESSION_ID} | |
| curl -v -X POST -H "mcp-session-id: ${SESSION_ID}" -H "Content-Type: application/json" -H "Accept: application/json, text/event-stream" http://mcp.127-0-0-1.sslip.io:8001/mcp --data ' | |
| { | |
| "jsonrpc": "2.0", | |
| "method": "notifications/initialized" | |
| } | |
| ' | |
| curl -v http://mcp.127-0-0-1.sslip.io:8001/mcp -H "mcp-session-id: ${SESSION_ID}" -H "Content-Type: application/json" -H "Accept: application/json, text/event-stream" --silent --data ' | |
| { | |
| "jsonrpc": "2.0", | |
| "id": 1, | |
| "method": "tools/list" | |
| } | |
| ' | jq | |
| curl -v http://mcp.127-0-0-1.sslip.io:8001/mcp -X GET -H "mcp-session-id: ${SESSION_ID}" -H "Content-Type: application/json" -H "Accept: application/json, text/event-stream" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment