-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-bridge.sh
More file actions
executable file
·41 lines (31 loc) · 1.43 KB
/
test-bridge.sh
File metadata and controls
executable file
·41 lines (31 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
set -e
cd /home/steam/Documents/llama-web-proxy/go-mcp-bridge
echo "=== Starting MCP Bridge ==="
./bin/mcp-bridge --config config.yaml &
BRIDGE_PID=$!
echo "Bridge PID: $BRIDGE_PID"
# Wait for bridge to start
sleep 2
echo "=== Testing Health Check ==="
curl -s http://localhost:8080/health && echo ""
echo "=== Testing Initialize ==="
timeout 5 curl -s -X POST http://localhost:8080/mcp/test/message \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"test-client","version":"1.0.0"}}}' && echo ""
echo "=== Testing Tools List ==="
timeout 5 curl -s -X POST http://localhost:8080/mcp/test/message \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}' && echo ""
echo "=== Testing Ping ==="
timeout 5 curl -s -X POST http://localhost:8080/mcp/test/message \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":3,"method":"ping","params":{}}' && echo ""
echo "=== Testing Echo Tool ==="
timeout 5 curl -s -X POST http://localhost:8080/mcp/test/message \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":4,"method":"tools/call","params":{"name":"echo","arguments":{"message":"Hello World!"}}}' && echo ""
echo "=== Cleanup ==="
kill $BRIDGE_PID 2>/dev/null || true
wait $BRIDGE_PID 2>/dev/null || true
echo "=== Tests Complete ==="