-
Notifications
You must be signed in to change notification settings - Fork 175
Keep alive (ping) mechanism for proxied connections #70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
commit: |
|
This looks great! I'll give this a try and release it soon, but in the interim you can test things yourself using |
|
Thanks. Spotted an issue with the default interval (should've been in seconds, I had it set to milliseconds. Didn't notice since I was setting a custom value via the I've been using this in my fork by building it locally and running the file with node. I've confirmed that it works as intended with both Claude Desktop and Cursor. I don't think the remote version from |
|
Just rebased, resolved conflicts, and tested again with local build. |
clouatre
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR solves a real problem (Zapier MCP timeouts) and the keep-alive mechanism is well-designed with proper cleanup, error handling, and MCP spec compliance.
Current Status:
The PR has merge conflicts with main due to significant changes merged since May (testing framework, OAuth scope handling, new CLI parameters). The branch needs to be rebased onto current main before it can be merged.
Code Review (based on May version):
- TypeScript compilation: Clean
- Core implementation: Solid
- Minor suggestions for cleanup:
- Remove unused
pingTimeoutvariable (line 106 in src/lib/utils.ts) - Rename
pingInterval→timerId(it's a timer handle, not an interval value) - Use JSDoc
/**consistently instead of/*(src/lib/types.ts)
- Remove unused
Happy to help with the rebase if needed, or these cleanup items can be addressed during conflict resolution.
While using this package with the Zapier MCP (and likely many other remote providers), the server would automatically close the connection if a message isn't sent for some time.
This adds a
--keep-aliveflag which will automatically ping the remote server periodically.