Skip to content

Make mcp server awaitable #5

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 1 commit into
base: main
Choose a base branch
from

Conversation

sparfenyuk
Copy link

This change fixes the problem of connecting to the server through mcp-proxy:

mcp-proxy --sse-port=9991 --pass-environment -- bunx mcp-server-code-runner@latest

This change fixes the problem of connecting to the server through mcp-proxy:

```
mcp-proxy --sse-port=9991 --pass-environment -- bunx mcp-server-code-runner@latest
```
@formulahendry
Copy link
Owner

Hi @sparfenyuk , thanks for you PR, and mcp-proxy looks awesome!
As server.connect(transport) is just return a void, I'd like to learn more why we need to return it to make mcp-proxy work?
If we really need to do that, then we need to put console.debug("Code Runner MCP Server running on stdio"); after main()?

@sparfenyuk
Copy link
Author

An instance of Promise is returned, and it's important for the promise chain. This is why main().catch((error) => {}) is written.

@sparfenyuk
Copy link
Author

If we really need to do that, then we need to put console.debug("Code Runner MCP Server running on stdio"); after main()?

In such scenario, the log wouldn't be displayed unless the script is stopped, I believe. So, keep it as it is.

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