kickload-watcher-mcp 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,233 +1,164 @@
1
- # KickLoad Watcher MCP
2
-
3
- Automated API performance testing for Claude Enterprise teams.
4
-
5
- When a developer writes an API using Claude Code, this watcher **automatically**:
6
- 1. Detects the new endpoint
7
- 2. Generates smart load test parameters using Claude
8
- 3. Runs the full test pipeline via KickLoad
9
- 4. Emails the developer their results
10
-
11
- **No GitHub required. Works directly with Claude Code CLI.**
12
-
13
- ---
14
-
15
- ## How It Works
16
-
17
- ```
18
- Developer writes API with Claude Code
19
-
20
- Watcher detects new session (Compliance API) + saved file (file watcher)
21
-
22
- Claude generates optimal test parameters for the endpoint
23
-
24
- KickLoad runs: generate JMX → run test → analyze JTL → return PDF
25
-
26
- Developer receives email with PASS/FAIL + latency + error rate + PDF link
27
- ```
28
-
29
- ---
30
-
31
- ## Prerequisites
32
-
33
- | Requirement | Where to Get It |
34
- |---|---|
35
- | Claude Enterprise plan | Required for Compliance API |
36
- | KickLoad API token | kickload.neeyatai.com → API's → Generate API Key |
37
- | Anthropic API key | platform.claude.com → API Keys |
38
- | Node.js 18+ | nodejs.org |
39
-
40
- ---
41
-
42
- ## Setup (3 Steps)
43
-
44
- ### Step 1 — Install
45
-
46
- ```bash
47
- git clone <this-repo>
48
- cd kickload-watcher-mcp
49
- npm install
50
- ```
51
-
52
- ### Step 2 — Configure
53
-
54
- ```bash
55
- cp .env.example .env
56
- ```
57
-
58
- Fill in your `.env`:
59
-
60
- ```env
61
- ANTHROPIC_API_KEY=sk-ant-api03-...
62
- ANTHROPIC_COMPLIANCE_API_KEY= # From Anthropic Console → Data and Privacy
63
- KICKLOAD_API_TOKEN=kl-... # From kickload.neeyatai.com → API's
64
- EMAIL_PROVIDER=smtp
65
- SMTP_HOST=smtp.gmail.com
66
- SMTP_USER=your@gmail.com
67
- SMTP_PASS=your-app-password
68
- EMAIL_FROM_ADDRESS=your@gmail.com
69
- WATCH_PATHS=/home/user/projects
70
- ```
71
-
72
- ### Step 3 — Map Developers
73
-
74
- Edit `users.json` to map Claude user IDs to emails:
75
-
76
- ```json
77
- {
78
- "usr_abc123": "john@company.com",
79
- "usr_xyz789": "jane@company.com"
80
- }
81
- ```
82
-
83
- Find Claude user IDs in: **Anthropic Console → Members**
84
-
85
- ---
86
-
87
- ## Add to Claude Code
88
-
89
- **Option A Claude Desktop** (`claude_desktop_config.json`):
90
-
91
- ```json
92
- {
93
- "mcpServers": {
94
- "kickload-watcher": {
95
- "command": "npx",
96
- "args": ["-y", "@kickload/watcher-mcp"],
97
- "env": {
98
- "KICKLOAD_API_TOKEN": "your-token",
99
- "ANTHROPIC_API_KEY": "your-key",
100
- "EMAIL_PROVIDER": "smtp",
101
- "SMTP_HOST": "smtp.gmail.com",
102
- "SMTP_USER": "your@gmail.com",
103
- "SMTP_PASS": "your-password",
104
- "EMAIL_FROM_ADDRESS": "your@gmail.com",
105
- "WATCH_PATHS": "/home/user/projects"
106
- }
107
- }
108
- }
109
- }
110
- ```
111
-
112
- **Option B — Claude Code CLI**:
113
-
114
- ```bash
115
- claude mcp add kickload-watcher --type stdio --command "node /path/to/index.js"
116
- ```
117
-
118
- **Option C — Run directly**:
119
-
120
- ```bash
121
- node index.js
122
- ```
123
-
124
- ---
125
-
126
- ## Enable Compliance API (Enterprise Required)
127
-
128
- 1. Go to **platform.claude.com**
129
- 2. Organization Settings → Data and Privacy
130
- 3. Enable Compliance API
131
- 4. Create a key and add it to `.env` as `ANTHROPIC_COMPLIANCE_API_KEY`
132
-
133
- > Only Primary Owners can enable the Compliance API.
134
-
135
- ---
136
-
137
- ## MCP Tools Available to Claude
138
-
139
- Once connected, Claude can call these tools directly:
140
-
141
- | Tool | What It Does |
142
- |---|---|
143
- | `run_kickload_test` | Manually trigger a test for any endpoint |
144
- | `get_test_status` | Check watcher status and configuration |
145
- | `lookup_developer` | Find email for a Claude user ID |
146
- | `send_test_email` | Verify email configuration |
147
-
148
- **Example — Claude can say:**
149
- > "Run a load test on /api/checkout and email results to dev@company.com"
150
-
151
- ---
152
-
153
- ## Email Providers
154
-
155
- | Provider | Config |
156
- |---|---|
157
- | SMTP (Gmail) | `EMAIL_PROVIDER=smtp` + SMTP_* vars |
158
- | SendGrid | `EMAIL_PROVIDER=sendgrid` + `SENDGRID_API_KEY` |
159
- | AWS SES | `EMAIL_PROVIDER=ses` + AWS_* vars |
160
-
161
- **Gmail tip**: Use an App Password, not your account password.
162
- Generate at: Google Account → Security → 2-Step Verification → App passwords
163
-
164
- ---
165
-
166
- ## Project Structure
167
-
168
- ```
169
- kickload-watcher-mcp/
170
- ├── index.js ← MCP server + tool handlers
171
- ├── orchestrator.js ← Main pipeline coordinator
172
- ├── compliance-poller.js ← Anthropic Compliance API watcher
173
- ├── file-watcher.js ← Filesystem watcher for saved code
174
- ├── test-generator.js ← Claude API test parameter generator
175
- ├── kickload-runner.js ← KickLoad API integration (/cra-line)
176
- ├── email-sender.js ← Email delivery (SMTP/SendGrid/SES)
177
- ├── identity-map.js ← Claude user ID → email mapping
178
- ├── config.js ← All configuration
179
- ├── users.json ← Developer identity map (you fill this)
180
- ├── .env.example ← Environment variable template
181
- └── package.json
182
- ```
183
-
184
- ---
185
-
186
- ## What the Email Looks Like
187
-
188
- ```
189
- Subject: [KickLoad Watcher] ✅ PASS — /api/checkout tested
190
-
191
- Hi John,
192
-
193
- Your API endpoint was automatically tested by KickLoad Watcher.
194
-
195
- STATUS: ✅ PASS
196
- ENDPOINT: /api/checkout
197
- TESTED AT: 2 Apr 2026, 14:32 IST
198
-
199
- RESULTS:
200
- Average Latency: 123ms
201
- Error Rate: 0.5%
202
- Throughput: 4,500 req/s
203
- Test Duration: 47s
204
-
205
- 📄 Download Full Report → [link expires in 24hrs]
206
-
207
- — KickLoad Watcher | Automated by NeeyatAI
208
- ```
209
-
210
- ---
211
-
212
- ## Troubleshooting
213
-
214
- **No email received?**
215
- - Run `send_test_email` MCP tool to verify email config
216
- - Check `users.json` has the correct Claude user ID mapped
217
- - Gmail: ensure App Password is used, not account password
218
-
219
- **Compliance API not working?**
220
- - Verify Enterprise plan is active
221
- - Only Primary Owners can enable Compliance API
222
- - File watcher still works without it
223
-
224
- **Test not triggering?**
225
- - Check `WATCH_PATHS` includes your project directories
226
- - Ensure files have supported extensions (.js, .ts, .py, etc.)
227
- - Check console logs for "API code detected" messages
228
-
229
- ---
230
-
231
- ## License
232
-
233
- MIT © NeeyatAI
1
+ # KickLoad Watcher MCP
2
+
3
+ Automated API performance testing for Claude Code workflows.
4
+
5
+ This tool automatically detects API endpoints, runs load tests via KickLoad, and sends results via email.
6
+
7
+ ---
8
+
9
+ ## 🚀 Installation
10
+
11
+ ```bash
12
+ npx kickload-watcher-mcp@beta
13
+ ```
14
+
15
+ ---
16
+
17
+ ## 🧠 First Run Setup
18
+
19
+ On first run, you will be prompted to enter:
20
+
21
+ * ANTHROPIC_API_KEY
22
+ * KICKLOAD_API_TOKEN
23
+ * Gmail address + App Password
24
+ * NGROK_AUTHTOKEN
25
+
26
+ These values are saved in a local `.env` file.
27
+
28
+ ---
29
+
30
+ ## 🔑 Required Services
31
+
32
+ | Service | Link |
33
+ | ------------------ | ----------------------------------------- |
34
+ | Anthropic | https://console.anthropic.com |
35
+ | KickLoad | https://kickload.neeyatai.com |
36
+ | Gmail App Password | https://myaccount.google.com/apppasswords |
37
+ | Ngrok | https://dashboard.ngrok.com |
38
+
39
+ ---
40
+
41
+ ## ⚙️ Example `.env`
42
+
43
+ ```env
44
+ ANTHROPIC_API_KEY=your_key
45
+ KICKLOAD_API_TOKEN=your_token
46
+
47
+ EMAIL_PROVIDER=smtp
48
+ SMTP_HOST=smtp.gmail.com
49
+ SMTP_PORT=465
50
+ SMTP_USER=your@gmail.com
51
+ SMTP_PASS=your-app-password
52
+ EMAIL_FROM_ADDRESS=your@gmail.com
53
+
54
+ NGROK_AUTHTOKEN=your_ngrok_token
55
+
56
+ WATCH_PATHS=.
57
+ TRIGGER_MODE=claudecode
58
+ LOG_LEVEL=info
59
+ ```
60
+
61
+ ---
62
+
63
+ ## 🔁 Workflow
64
+
65
+ 1. Save backend API file
66
+ 2. Watcher detects endpoints
67
+ 3. Ngrok exposes local server (if needed)
68
+ 4. Claude generates test parameters
69
+ 5. KickLoad runs performance test
70
+ 6. Results sent via email
71
+
72
+ ---
73
+
74
+ ## 📡 Features
75
+
76
+ * Automatic API detection (Express, Flask, FastAPI, etc.)
77
+ * Claude-powered test generation
78
+ * Auto ngrok tunneling for localhost
79
+ * Email reporting system
80
+ * Smart batching + deduplication
81
+ * Retry + error handling
82
+
83
+ ---
84
+
85
+ ## ⚠️ Important Notes
86
+
87
+ * `.env` is required after setup
88
+ * Use Gmail App Password (not normal password)
89
+ * Ngrok token is required for localhost testing
90
+ * Backend must be running
91
+
92
+ ---
93
+
94
+ ## 🧪 Troubleshooting
95
+
96
+ ### Setup runs twice
97
+
98
+ Delete `.env` and run again.
99
+
100
+ ---
101
+
102
+ ### Missing config error
103
+
104
+ Check `.env` contains:
105
+
106
+ * ANTHROPIC_API_KEY
107
+ * KICKLOAD_API_TOKEN
108
+ * SMTP_USER
109
+ * SMTP_PASS
110
+
111
+ ---
112
+
113
+ ### Ngrok not working
114
+
115
+ Add:
116
+
117
+ ```env
118
+ NGROK_AUTHTOKEN=your-token
119
+ ```
120
+
121
+ ---
122
+
123
+ ### Email not sending
124
+
125
+ * Check Gmail App Password
126
+ * Verify SMTP_USER and SMTP_PASS
127
+
128
+ ---
129
+
130
+ ## 📁 Project Structure
131
+
132
+ ```
133
+ index.js → entry point
134
+ setup.js → first-run setup
135
+ pipeline.js → core logic
136
+ kickload-client.js → API communication
137
+ email-sender.js → email system
138
+ file-watcher.js → file detection
139
+ compliance-poller.js → Claude session tracking
140
+ ngrok-manager.js → tunnel handling
141
+ config.js → configuration
142
+ ```
143
+
144
+ ---
145
+
146
+ ## 🏁 Run Locally
147
+
148
+ ```bash
149
+ node index.js
150
+ ```
151
+
152
+ ---
153
+
154
+ ## 📦 NPM Usage
155
+
156
+ ```bash
157
+ npx kickload-watcher-mcp@beta
158
+ ```
159
+
160
+ ---
161
+
162
+ ## 📜 License
163
+
164
+ MIT © NeeyatAI