Log headers in curl initialize requests
The user needs the `mcp-session-id` header, so we should log headers.
This commit is contained in:
parent
7a2043b49c
commit
cccb7494fa
2 changed files with 2 additions and 2 deletions
|
|
@ -156,7 +156,7 @@ end
|
|||
puts "Starting MCP HTTP server on http://localhost:9292"
|
||||
puts "Use POST requests to initialize and send JSON-RPC commands"
|
||||
puts "Example initialization:"
|
||||
puts ' curl -X POST http://localhost:9292 -H "Content-Type: application/json" -d \'{"jsonrpc":"2.0","method":"initialize","id":1,"params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}\''
|
||||
puts ' curl -i -X POST http://localhost:9292 -H "Content-Type: application/json" -d \'{"jsonrpc":"2.0","method":"initialize","id":1,"params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}\''
|
||||
puts ""
|
||||
puts "The server will return a session ID in the Mcp-Session-Id header."
|
||||
puts "Use this session ID for subsequent requests."
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ puts ""
|
|||
puts "Testing SSE:"
|
||||
puts ""
|
||||
puts "1. Initialize session:"
|
||||
puts ' curl -X POST http://localhost:9393 -H "Content-Type: application/json" \\'
|
||||
puts ' curl -i -X POST http://localhost:9393 -H "Content-Type: application/json" \\'
|
||||
puts ' -d \'{"jsonrpc":"2.0","method":"initialize","id":1,"params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"sse-test","version":"1.0"}}}\''
|
||||
puts ""
|
||||
puts "2. Connect SSE stream (use the session ID from step 1):"
|
||||
|
|
|
|||
Loading…
Reference in a new issue