initial: blog-app snapshot
This commit is contained in:
24
.probe/exa_mcp_probe.sh
Normal file
24
.probe/exa_mcp_probe.sh
Normal file
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env bash
|
||||
# Probe the Exa hosted MCP (same endpoint omo websearch uses) from plain HTTP.
|
||||
set -u
|
||||
URL="https://mcp.exa.ai/mcp?tools=web_search_exa"
|
||||
H1='Content-Type: application/json'
|
||||
H2='Accept: application/json, text/event-stream'
|
||||
|
||||
echo "=== initialize ==="
|
||||
INIT_RESP=$(curl -sS -i -m 30 "$URL" -X POST -H "$H1" -H "$H2" \
|
||||
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"watchdog-probe","version":"0.1"}}}')
|
||||
echo "$INIT_RESP" | head -30
|
||||
SID=$(echo "$INIT_RESP" | grep -i '^mcp-session-id:' | tr -d '\r' | awk '{print $2}')
|
||||
echo "session-id: ${SID:-<none>}"
|
||||
|
||||
echo "=== notifications/initialized ==="
|
||||
curl -sS -m 15 -o /dev/null -w '%{http_code}\n' "$URL" -X POST -H "$H1" -H "$H2" \
|
||||
${SID:+-H "Mcp-Session-Id: $SID"} \
|
||||
-d '{"jsonrpc":"2.0","method":"notifications/initialized"}'
|
||||
|
||||
echo "=== tools/call web_search_exa ==="
|
||||
curl -sS -m 60 "$URL" -X POST -H "$H1" -H "$H2" \
|
||||
${SID:+-H "Mcp-Session-Id: $SID"} \
|
||||
-d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"web_search_exa","arguments":{"query":"sst opencode latest release 2026","numResults":3}}}' | head -c 2500
|
||||
echo
|
||||
Reference in New Issue
Block a user