-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathrun_mcp_inspector.sh
More file actions
executable file
·42 lines (40 loc) · 1.6 KB
/
Copy pathrun_mcp_inspector.sh
File metadata and controls
executable file
·42 lines (40 loc) · 1.6 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
42
#!/bin/bash
echo "=== MCP Inspector Setup Guide ==="
echo
echo "To use the official MCP Inspector with odata-mcp:"
echo
echo "1. Install and run the inspector:"
echo " npx @modelcontextprotocol/inspector ./odata-mcp"
echo
echo "2. This will open a web UI at http://localhost:5173"
echo
echo "3. In the UI, you can:"
echo " - See all available tools"
echo " - Test tool calls interactively"
echo " - View request/response logs"
echo " - Debug any issues"
echo
echo "Alternative: Use CLI mode for automated testing:"
echo " npx @modelcontextprotocol/inspector --cli ./odata-mcp --method tools/list"
echo
echo "=== Quick Local Test ==="
echo "Running a quick local protocol test..."
echo
# Quick protocol test
echo '{"jsonrpc":"2.0","id":"test","method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{"tools":{}},"clientInfo":{"name":"inspector","version":"1.0.0"}}}' | ./odata-mcp 2>&1 | python3 -c "
import sys
import json
try:
response = json.loads(sys.stdin.read())
print('✅ Valid JSON response')
if 'error' in response:
print(f'❌ Error: {response[\"error\"]}')
elif 'result' in response:
result = response['result']
print(f'✅ Protocol version: {result.get(\"protocolVersion\")}')
print(f'✅ Server: {result.get(\"serverInfo\", {}).get(\"name\")} v{result.get(\"serverInfo\", {}).get(\"version\")}')
caps = result.get('capabilities', {})
print(f'✅ Capabilities: tools={\"tools\" in caps}, resources={\"resources\" in caps}, prompts={\"prompts\" in caps}')
except Exception as e:
print(f'❌ Failed to parse response: {e}')
"