Skip to content

Commit e2081b9

Browse files
committed
docs: add README for Socket MCP Debug Clients
1 parent 410beaf commit e2081b9

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed

mock-client/README.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Socket MCP Debug Clients
2+
3+
Simple debug clients for testing the Socket MCP server in different modes.
4+
5+
## Quick Start
6+
7+
### 1. Build the project
8+
```bash
9+
npm run build
10+
```
11+
12+
### 2. Start the MCP server
13+
14+
**STDIO mode:**
15+
```bash
16+
SOCKET_API_KEY=your-api-key ./build/index.js
17+
```
18+
19+
**HTTP mode:**
20+
```bash
21+
MCP_HTTP_MODE=true SOCKET_API_KEY=your-api-key ./build/index.js
22+
```
23+
24+
**HTTP mode with custom port:**
25+
```bash
26+
MCP_HTTP_MODE=true MCP_PORT=3901 SOCKET_API_KEY=your-api-key ./build/index.js
27+
```
28+
29+
### 3. Test with debug clients
30+
31+
**Test STDIO mode:**
32+
```bash
33+
npm run debug:stdio
34+
```
35+
36+
**Test HTTP mode (default port 3000):**
37+
```bash
38+
npm run debug:http
39+
```
40+
41+
**Test HTTP mode (custom URL):**
42+
```bash
43+
MCP_URL="http://localhost:3901/" npm run debug:http
44+
```
45+
46+
**Test with MCP SDK client:**
47+
```bash
48+
npm run debug:sdk
49+
```
50+
51+
## What the debug clients test
52+
53+
- **Initialize**: Connect to MCP server and get server info
54+
- **List tools**: Get available tools (should show `depscore`)
55+
- **Call depscore**: Test dependency scoring with sample packages
56+
- **Cleanup**: Close connection properly
57+
58+
## Troubleshooting
59+
60+
**Server not responding?**
61+
- Check if server is running: `curl http://localhost:3000/health`
62+
- Verify API key is set
63+
- Check server logs for errors
64+
65+
**HTTP client getting 404?**
66+
- Remove trailing slash from MCP_URL
67+
- Verify server is in HTTP mode (`MCP_HTTP_MODE=true`)
68+
69+
**STDIO client hanging?**
70+
- Ctrl+C to exit
71+
- Check server is in STDIO mode (no `MCP_HTTP_MODE`)

0 commit comments

Comments
 (0)