Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@tt
Copy link
Contributor

@tt tt commented Apr 9, 2025

Description

I'm working on an MCP tool which takes a while to boot.

When interacting with this tool through the standard I/O transport, this means that each new request takes a while to complete. That makes the interactive shell mode slower than it needs to be.

This change introduces an option for not closing the process after each request. (The SSE transport will already keep the connection alive.)

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Outside running the tests, I have used this locally with mcptools shell <command>.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@ayakut16
Copy link
Contributor

ayakut16 commented Apr 9, 2025

I think a nice addition to this PR would be to have isInitializeSent field in the process so we don't have to send initialize request for every command if the connection is not closed.

@f
Copy link
Owner

f commented Apr 9, 2025

@ayakut16 I'll approve this, can you (or @tt) can open a new PR for the isInitializeSent field?

@f f merged commit d743d3b into f:master Apr 9, 2025
2 checks passed
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.

3 participants