-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathbuild-multi-transport.sh
More file actions
45 lines (37 loc) · 1.34 KB
/
Copy pathbuild-multi-transport.sh
File metadata and controls
45 lines (37 loc) · 1.34 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
43
44
45
#!/bin/bash
# Build and Test Multi-Transport Pentest MCP
echo "=== Building Pentest MCP with Multi-Transport Support ==="
# Step 1: Install dependencies
echo -e "\n1. Installing dependencies (including express)..."
echo "Run: npm install"
# Step 2: Build TypeScript
echo -e "\n2. Building TypeScript..."
echo "Run: npm run build"
# Step 3: Make executable
echo -e "\n3. Making dist/index.js executable..."
echo "Run: chmod +x dist/index.js"
# Step 4: Test different transports
echo -e "\n4. Testing transports..."
echo ""
echo "Test STDIO (default):"
echo " node dist/index.js"
echo ""
echo "Test HTTP transport:"
echo " MCP_TRANSPORT=http node dist/index.js"
echo " # In another terminal: curl http://localhost:8000/health"
echo ""
echo "Test SSE transport:"
echo " MCP_TRANSPORT=sse node dist/index.js"
echo " # In another terminal: curl http://localhost:8001/health"
echo ""
echo "Test bundled MCP Inspector:"
echo " node dist/index.js inspector"
echo "Inspector CLI tools-list smoke test:"
echo " node dist/index.js inspector --cli --method tools/list"
# Step 5: Docker build
echo -e "\n5. Docker build (optional):"
echo " docker build -t pentest-mcp:latest ."
echo -e "\n=== Next Steps ==="
echo "1. Copy .env.example to .env and configure as needed"
echo "2. Choose your transport type"
echo "3. Run with your preferred method (see usage-examples.sh)"