@@ -115,13 +115,13 @@ SESSION_ID=$(curl -D - -s -o /dev/null -X POST http://localhost:9393 \
115115
1161162 . Connect to SSE stream (in one terminal):
117117``` bash
118- curl -N -H " Mcp-Session-Id: $SESSION_ID " http://localhost:9393
118+ curl -i - N -H " Mcp-Session-Id: $SESSION_ID " http://localhost:9393
119119```
120120
1211213 . Trigger notifications (in another terminal):
122122``` bash
123123# Send immediate notification
124- curl -X POST http://localhost:9393 \
124+ curl -i - X POST http://localhost:9393 \
125125 -H " Content-Type: application/json" \
126126 -H " Mcp-Session-Id: $SESSION_ID " \
127127 -d ' {"jsonrpc":"2.0","method":"tools/call","id":2,"params":{"name":"notification_tool","arguments":{"message":"Hello from cURL!"}}}'
@@ -152,22 +152,22 @@ The HTTP server implements the MCP Streamable HTTP transport protocol:
152152
153153Initialize a session:
154154``` bash
155- curl -X POST http://localhost:9292 \
155+ curl -i - X POST http://localhost:9292 \
156156 -H " Content-Type: application/json" \
157157 -d ' {"jsonrpc":"2.0","method":"initialize","id":1,"params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}'
158158```
159159
160160List tools (using the session ID from initialization):
161161``` bash
162- curl -X POST http://localhost:9292 \
162+ curl -i - X POST http://localhost:9292 \
163163 -H " Content-Type: application/json" \
164164 -H " Mcp-Session-Id: YOUR_SESSION_ID" \
165165 -d ' {"jsonrpc":"2.0","method":"tools/list","id":2}'
166166```
167167
168168Call a tool:
169169``` bash
170- curl -X POST http://localhost:9292 \
170+ curl -i - X POST http://localhost:9292 \
171171 -H " Content-Type: application/json" \
172172 -H " Mcp-Session-Id: YOUR_SESSION_ID" \
173173 -d ' {"jsonrpc":"2.0","method":"tools/call","id":3,"params":{"name":"ExampleTool","arguments":{"a":5,"b":3}}}'
0 commit comments