Skip to content

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ooojustin
Copy link

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-alive flag which will automatically ping the remote server periodically.

Copy link

pkg-pr-new bot commented May 12, 2025

Open in StackBlitz

npx https://pkg.pr.new/mcp-remote@70

commit: 29886b5

@geelen
Copy link
Owner

geelen commented May 12, 2025

This looks great! I'll give this a try and release it soon, but in the interim you can test things yourself using https://pkg.pr.new/mcp-remote@70. Any changes you push to this branch should be automatically built and released to that URL so you can iterate/share it with others as needed.

@ooojustin
Copy link
Author

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 --ping-interval arg.)

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 https://pkg.pr.new/mcp-remote@70 was updated automatically, but can confirm again once it is.

@ooojustin
Copy link
Author

Just rebased, resolved conflicts, and tested again with local build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants