Skip to content

[FEAT] Add websocket transport support - #73

Merged
grll merged 1 commit into
grll:mainfrom
ILJICH:feat/ws
Oct 9, 2025
Merged

[FEAT] Add websocket transport support#73
grll merged 1 commit into
grll:mainfrom
ILJICH:feat/ws

Conversation

@ILJICH

@ILJICH ILJICH commented Oct 2, 2025

Copy link
Copy Markdown
Contributor

I'm trying to use this lib in a project that uses ws as a main transport for mcp servers. I had to patch it, but here's also a PR that does it properly.
Should work both with ws and wss:

from mcpadapt.core import MCPAdapt
from mcpadapt.smolagents_adapter import SmolAgentsAdapter

with MCPAdapt(
    {"url": "ws://127.0.0.1:8001/ws", "transport": "ws"},
    SmolAgentsAdapter(),
) as tools:
    ...

@ILJICH

ILJICH commented Oct 3, 2025

Copy link
Copy Markdown
Contributor Author

@grll Hey there, can you take a look at this PR? It'll make my life a little easier ^^

@grll

grll commented Oct 3, 2025

Copy link
Copy Markdown
Owner

Hey hey thanks for the contribution will have a look soon

@ILJICH

ILJICH commented Oct 9, 2025

Copy link
Copy Markdown
Contributor Author

@grll Hi, just a friendly reminder that this PR is still waiting for your attention =]
It's basically a one-liner and some tests, shouldn't take much time.

@grll

grll commented Oct 9, 2025

Copy link
Copy Markdown
Owner

@grll Hi, just a friendly reminder that this PR is still waiting for your attention =] It's basically a one-liner and some tests, shouldn't take much time.

sorry for the delay and thank you for the reminder. The change look good to me! I was a bit surprised that there is no easier way to define a simple echo server with the websocket transport but I guess they are prioritizing other transports...

@grll
grll merged commit 70a40f9 into grll:main Oct 9, 2025
3 checks passed
@grll

grll commented Oct 9, 2025

Copy link
Copy Markdown
Owner

@ILJICH your change is available from v0.1.17 and above:
https://github.com/grll/mcpadapt/releases/tag/v0.1.17

@ILJICH

ILJICH commented Oct 9, 2025

Copy link
Copy Markdown
Contributor Author

Thank you so much ^^
Yeah, ws is not standard (yet), so not all the libraries support it

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