servicenow-mcp-server 2.1.5 → 2.1.6
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/package.json +1 -1
- package/RESPONSE_DRAFT.md +0 -229
package/package.json
CHANGED
package/RESPONSE_DRAFT.md
DELETED
|
@@ -1,229 +0,0 @@
|
|
|
1
|
-
# Response to SSE Connection Issue
|
|
2
|
-
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
## Your Message:
|
|
6
|
-
|
|
7
|
-
Hey [Name],
|
|
8
|
-
|
|
9
|
-
Thanks for reporting this issue! You're absolutely right - the SSE connection was dropping in Docker environments. I've identified and **fixed the root cause** in **v2.1.5** (just published).
|
|
10
|
-
|
|
11
|
-
### What Was Wrong
|
|
12
|
-
|
|
13
|
-
The SSE connection had no keepalive mechanism, so:
|
|
14
|
-
- Proxies/load balancers timed out idle connections (typically 60-120 seconds)
|
|
15
|
-
- Docker networking killed idle TCP connections
|
|
16
|
-
- Express default timeouts closed long-running connections
|
|
17
|
-
|
|
18
|
-
### The Fix ✅
|
|
19
|
-
|
|
20
|
-
I've implemented an **automatic keepalive heartbeat** that:
|
|
21
|
-
- Sends invisible SSE comments every 15 seconds (configurable)
|
|
22
|
-
- Keeps the connection alive indefinitely
|
|
23
|
-
- Works seamlessly behind nginx, Traefik, HAProxy, etc.
|
|
24
|
-
- Zero configuration required (works out of the box)
|
|
25
|
-
|
|
26
|
-
### How to Use (Quick Start)
|
|
27
|
-
|
|
28
|
-
**Pull the latest version:**
|
|
29
|
-
```bash
|
|
30
|
-
docker pull nczitzer/mcp-servicenow-nodejs:latest
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
**Run it:**
|
|
34
|
-
```bash
|
|
35
|
-
docker run -d \
|
|
36
|
-
--name servicenow-mcp \
|
|
37
|
-
-p 3000:3000 \
|
|
38
|
-
-e SERVICENOW_INSTANCE_URL=https://your-instance.service-now.com \
|
|
39
|
-
-e SERVICENOW_USERNAME=admin \
|
|
40
|
-
-e SERVICENOW_PASSWORD=password \
|
|
41
|
-
nczitzer/mcp-servicenow-nodejs:latest
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
**Test the connection (you should see keepalive comments every 15 seconds):**
|
|
45
|
-
```bash
|
|
46
|
-
curl -N http://localhost:3000/mcp
|
|
47
|
-
|
|
48
|
-
# Expected output:
|
|
49
|
-
event: endpoint
|
|
50
|
-
data: /message
|
|
51
|
-
|
|
52
|
-
: keepalive
|
|
53
|
-
|
|
54
|
-
: keepalive
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
### Configuration (Optional)
|
|
58
|
-
|
|
59
|
-
If you need to tune the keepalive interval:
|
|
60
|
-
|
|
61
|
-
```yaml
|
|
62
|
-
# docker-compose.yml
|
|
63
|
-
services:
|
|
64
|
-
servicenow-mcp-server:
|
|
65
|
-
image: nczitzer/mcp-servicenow-nodejs:latest
|
|
66
|
-
environment:
|
|
67
|
-
- SSE_KEEPALIVE_INTERVAL=15000 # milliseconds (default: 15s)
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
**Recommended settings:**
|
|
71
|
-
- **Default (15s)** - Works for most environments
|
|
72
|
-
- **Behind aggressive proxies (10s)** - Use `SSE_KEEPALIVE_INTERVAL=10000`
|
|
73
|
-
- **Low-latency networks (30s)** - Use `SSE_KEEPALIVE_INTERVAL=30000`
|
|
74
|
-
|
|
75
|
-
### If You're Using nginx
|
|
76
|
-
|
|
77
|
-
Make sure to disable buffering for the SSE endpoint:
|
|
78
|
-
|
|
79
|
-
```nginx
|
|
80
|
-
location /mcp {
|
|
81
|
-
proxy_pass http://servicenow-mcp:3000;
|
|
82
|
-
|
|
83
|
-
# CRITICAL for SSE
|
|
84
|
-
proxy_buffering off;
|
|
85
|
-
proxy_cache off;
|
|
86
|
-
proxy_read_timeout 86400s; # 24 hours
|
|
87
|
-
|
|
88
|
-
proxy_http_version 1.1;
|
|
89
|
-
proxy_set_header Connection '';
|
|
90
|
-
proxy_set_header X-Accel-Buffering 'no';
|
|
91
|
-
}
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
### Complete Documentation
|
|
95
|
-
|
|
96
|
-
I've created comprehensive docs for SSE setup:
|
|
97
|
-
- **[SSE Docker Setup Guide](https://github.com/Happy-Technologies-LLC/mcp-servicenow-nodejs/blob/main/docs/SSE_DOCKER_SETUP.md)** - Complete guide with troubleshooting
|
|
98
|
-
- **[Quick Reference](https://github.com/Happy-Technologies-LLC/mcp-servicenow-nodejs/blob/main/docs/SSE_FIX_SUMMARY.md)** - TL;DR version
|
|
99
|
-
|
|
100
|
-
### Verification
|
|
101
|
-
|
|
102
|
-
Check that it's working:
|
|
103
|
-
|
|
104
|
-
```bash
|
|
105
|
-
# 1. Check server logs
|
|
106
|
-
docker logs servicenow-mcp-server
|
|
107
|
-
|
|
108
|
-
# Look for:
|
|
109
|
-
💓 SSE keepalive interval: 15000ms
|
|
110
|
-
🔗 New session established: <session-id>
|
|
111
|
-
|
|
112
|
-
# 2. Monitor the connection
|
|
113
|
-
curl -N http://localhost:3000/mcp
|
|
114
|
-
# You should see ": keepalive" comments every 15 seconds
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
### Summary
|
|
118
|
-
|
|
119
|
-
- ✅ **v2.1.5 published** to npm and Docker Hub
|
|
120
|
-
- ✅ **Automatic keepalive** prevents connection drops
|
|
121
|
-
- ✅ **Works out of the box** - no configuration needed
|
|
122
|
-
- ✅ **Fully documented** with examples and troubleshooting
|
|
123
|
-
|
|
124
|
-
The connection should now stay alive indefinitely! Let me know if you run into any issues.
|
|
125
|
-
|
|
126
|
-
Thanks again for reporting this - it's now fixed for everyone! 🎉
|
|
127
|
-
|
|
128
|
-
Best,
|
|
129
|
-
[Your Name]
|
|
130
|
-
|
|
131
|
-
---
|
|
132
|
-
|
|
133
|
-
## Alternative (Shorter Version):
|
|
134
|
-
|
|
135
|
-
Hey [Name],
|
|
136
|
-
|
|
137
|
-
Great catch! I've fixed the SSE connection dropping issue in **v2.1.5** (just published).
|
|
138
|
-
|
|
139
|
-
**What I fixed:**
|
|
140
|
-
- Added automatic keepalive heartbeat (every 15 seconds)
|
|
141
|
-
- Disabled timeouts for SSE endpoint
|
|
142
|
-
- Added proxy-friendly headers
|
|
143
|
-
|
|
144
|
-
**How to use:**
|
|
145
|
-
```bash
|
|
146
|
-
docker pull nczitzer/mcp-servicenow-nodejs:latest
|
|
147
|
-
docker run -d -p 3000:3000 \
|
|
148
|
-
-e SERVICENOW_INSTANCE_URL=https://your-instance.service-now.com \
|
|
149
|
-
-e SERVICENOW_USERNAME=admin \
|
|
150
|
-
-e SERVICENOW_PASSWORD=password \
|
|
151
|
-
nczitzer/mcp-servicenow-nodejs:latest
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
**Test it:**
|
|
155
|
-
```bash
|
|
156
|
-
curl -N http://localhost:3000/mcp
|
|
157
|
-
# You'll see ": keepalive" comments every 15 seconds
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
**Full docs:** https://github.com/Happy-Technologies-LLC/mcp-servicenow-nodejs/blob/main/docs/SSE_DOCKER_SETUP.md
|
|
161
|
-
|
|
162
|
-
The connection should now stay alive indefinitely. Let me know if you have any issues!
|
|
163
|
-
|
|
164
|
-
Thanks for reporting! 🙏
|
|
165
|
-
|
|
166
|
-
---
|
|
167
|
-
|
|
168
|
-
## GitHub Issue Template (If responding on GitHub):
|
|
169
|
-
|
|
170
|
-
## Fixed in v2.1.5 ✅
|
|
171
|
-
|
|
172
|
-
Thanks for reporting this! The SSE connection dropping issue has been **fixed in v2.1.5**.
|
|
173
|
-
|
|
174
|
-
### Root Cause
|
|
175
|
-
The server had no keepalive mechanism, causing proxies and Docker networking to timeout idle SSE connections.
|
|
176
|
-
|
|
177
|
-
### Solution
|
|
178
|
-
Implemented automatic keepalive heartbeat that sends invisible SSE comments every 15 seconds (configurable).
|
|
179
|
-
|
|
180
|
-
### How to Use
|
|
181
|
-
|
|
182
|
-
**1. Pull the latest version:**
|
|
183
|
-
```bash
|
|
184
|
-
docker pull nczitzer/mcp-servicenow-nodejs:latest
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
**2. Run it:**
|
|
188
|
-
```bash
|
|
189
|
-
docker run -d \
|
|
190
|
-
--name servicenow-mcp \
|
|
191
|
-
-p 3000:3000 \
|
|
192
|
-
-e SERVICENOW_INSTANCE_URL=https://your-instance.service-now.com \
|
|
193
|
-
-e SERVICENOW_USERNAME=admin \
|
|
194
|
-
-e SERVICENOW_PASSWORD=password \
|
|
195
|
-
nczitzer/mcp-servicenow-nodejs:latest
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
**3. Test the connection:**
|
|
199
|
-
```bash
|
|
200
|
-
curl -N http://localhost:3000/mcp
|
|
201
|
-
# You should see ": keepalive" comments every 15 seconds
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
### Configuration
|
|
205
|
-
|
|
206
|
-
Optional tuning via environment variable:
|
|
207
|
-
```yaml
|
|
208
|
-
environment:
|
|
209
|
-
- SSE_KEEPALIVE_INTERVAL=15000 # milliseconds (default: 15s)
|
|
210
|
-
```
|
|
211
|
-
|
|
212
|
-
### Documentation
|
|
213
|
-
|
|
214
|
-
- [Complete SSE Setup Guide](docs/SSE_DOCKER_SETUP.md)
|
|
215
|
-
- [Quick Reference](docs/SSE_FIX_SUMMARY.md)
|
|
216
|
-
|
|
217
|
-
### Changes
|
|
218
|
-
- ✅ Automatic keepalive heartbeat (configurable)
|
|
219
|
-
- ✅ Disabled timeouts for SSE endpoint
|
|
220
|
-
- ✅ Proxy-friendly headers (`X-Accel-Buffering: no`)
|
|
221
|
-
- ✅ Connection monitoring with automatic cleanup
|
|
222
|
-
|
|
223
|
-
The connection should now stay alive indefinitely! Let me know if you encounter any issues.
|
|
224
|
-
|
|
225
|
-
Closing this as **resolved** in v2.1.5. Feel free to reopen if needed.
|
|
226
|
-
|
|
227
|
-
---
|
|
228
|
-
|
|
229
|
-
**Choose the version that fits your communication style!**
|