Improve error handling and logging for diagnostics
This commit is contained in:
+34
@@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
# Diagnostic script for MCP Summary Server
|
||||
|
||||
echo "================================"
|
||||
echo "MCP Summary Server Diagnostics"
|
||||
echo "================================"
|
||||
|
||||
# Check if server is running
|
||||
echo -e "\n1. Checking if server process is running..."
|
||||
ps aux | grep mcp_summary_server || echo "Server process not found"
|
||||
|
||||
# Check if port is listening
|
||||
echo -e "\n2. Checking if port is listening..."
|
||||
netstat -tlnp 2>/dev/null | grep 8080 || echo "Port 8080 not listening"
|
||||
|
||||
# Test basic connectivity
|
||||
echo -e "\n3. Testing basic connectivity..."
|
||||
curl -s http://localhost:8080/ || echo "Cannot connect to localhost:8080"
|
||||
|
||||
# Test MCP initialize
|
||||
echo -e "\n4. Testing MCP initialize..."
|
||||
curl -s -X POST http://localhost:8080/ \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"test","version":"1.0.0"}}}' | jq .
|
||||
|
||||
# Test tools list
|
||||
echo -e "\n5. Testing tools list..."
|
||||
curl -s -X POST http://localhost:8080/ \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}' | jq .
|
||||
|
||||
echo -e "\n================================"
|
||||
echo "Diagnostics complete"
|
||||
echo "================================"
|
||||
Reference in New Issue
Block a user