Skip to content

Conversation

@mark-at-pieces
Copy link

  • ** first an foremost, thank you so much for an awesome package!!
  • I have been looking around for dart specific MCP packages and this one is by far the best
  • currently in app we have our own mcp server implementation for SSE with the first schema, however keeping up with all of the schema adjustments and bugs along the way have been a bit of a pain, but I am very happy to of found this package
  • in testing I found an issue with after 5 min no matter what the client would disconnect from server regardless, (believe it or not I ran into this issue a month ago with our initial implementation as well), and is a pretty simple fix to just pipe over a keep-alive signal on a timer to ensrue the client does not error out

Steps to reproduce:

  • configure and run a streamableHTTPServer
  • connect via cursor or some sort of client
  • Notice that after 5 min, you will see a disconnection

Fix: add support for a periodic keep alive signal from server -> client

Please let me know if you would like me to adjust anything and thank you again for the package!

@codecov
Copy link

codecov bot commented Sep 25, 2025

Codecov Report

❌ Patch coverage is 12.90323% with 27 lines in your changes missing coverage. Please review.
✅ Project coverage is 45.42%. Comparing base (1f08bd5) to head (dbf668e).
⚠️ Report is 12 commits behind head on main.

Files with missing lines Patch % Lines
lib/src/server/streamable_https.dart 12.90% 27 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #42      +/-   ##
==========================================
- Coverage   45.55%   45.42%   -0.13%     
==========================================
  Files          15       15              
  Lines        2880     2908      +28     
==========================================
+ Hits         1312     1321       +9     
- Misses       1568     1587      +19     
Flag Coverage Δ
unittests 45.42% <12.90%> (-0.13%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mark-at-pieces
Copy link
Author

cc: @leehack

wanted to follow up to see if there is anything that I can adjust with this pr to get this over the finish line

@leehack
Copy link
Owner

leehack commented Oct 9, 2025

cc: @leehack

wanted to follow up to see if there is anything that I can adjust with this pr to get this over the finish line

Sorry for the delay. I've been busy for the last few weeks. Let me review your PR.

@leehack
Copy link
Owner

leehack commented Oct 9, 2025

@mark-at-pieces I've just tested it but I don't see the disconnection issue. I used https://github.com/leehack/mcp_dart/blob/main/example/streamable_https/server_streamable_https.dart as a server and npx @modelcontextprotocol/inspector@latest as a server (in proxy mode)

I don't see the disconnection. I don't use a cursor, but could this be a cursor-side issue?

@mark-at-pieces
Copy link
Author

@leehack agreed, I'm also not seeing the same issue within the inspector.

I think you're 100% correct here, client side cursor issue.

Going to close this, for the time being I'm going to include this specific code on myside till cursor can get this straightened out.

Thank you for the rev 🤘

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