Skip to content

feat(mcp): add streamable http client - #2292

Merged
hayescode merged 33 commits into
Chainlit:mainfrom
tituslhy:main
Jul 30, 2025
Merged

hayescode merged 33 commits into
Chainlit:mainfrom
tituslhy:main

Conversation

@tituslhy

Copy link
Copy Markdown
Contributor

No description provided.

@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. backend Pertains to the Python backend. frontend Pertains to the frontend. labels Jul 15, 2025
@asvishnyakov asvishnyakov changed the title add streamable-http client feat(mcp): add streamable http client Jul 15, 2025
@hayescode

Copy link
Copy Markdown
Contributor

@tituslhy can you please fix the CI issues?

@tituslhy

Copy link
Copy Markdown
Contributor Author

Sorry my frontend skills are extremely limited so I apologize for not being able to resolve the CI issues. On the backend side I only edited a few scripts to include the streamable-http class but I was also unable to clear mypy for some reason. I did what I could and pushed to kickstart the inclusion of the integration of this feature

If it's possible can I trouble you for your support please. My profuse apologies.

@agnivabanerjee

Copy link
Copy Markdown
Contributor

@tituslhy there are some issues:

  1. on server.py: "url": payload.url if payload.clientType in ["sse", "streamable-http"] else None,
  2. on config.py: add a dataclass for StreamableHTTP, and add streamable http to McpFeature
  3. on api/index.ts: add sessionId as well

there are more, and I am trying to test these changes locally. can you please provide write access to me?

thank you :)

@tituslhy

tituslhy commented Jul 25, 2025 •

Copy link
Copy Markdown
Contributor Author

@agnivabanerjee sorry how do I provide write access, please? All I did was raise a pull request.

But I've added you as a collaborator to my personal fork of chainlit just in case.

@agnivabanerjee

Copy link
Copy Markdown
Contributor

@agnivabanerjee sorry how do I provide write access, please? All I did was raise a pull request.

But I've added you as a collaborator to my personal fork of chainlit just in case.

Thank you Titus! I have made the changes and merged.
@hayescode can you please review and help make a release if everything looks good?

@hayescode

Copy link
Copy Markdown
Contributor

@asvishnyakov

@asvishnyakov
asvishnyakov self-requested a review July 25, 2025 21:48
@agnivabanerjee

agnivabanerjee commented Jul 25, 2025 •

Copy link
Copy Markdown
Contributor

@asvishnyakov thank you for the review! sorry for the overlook before, I have since fixed lint and CI errors in the latest commit 🙏
Please let us know if any further changes are required!

- Fix quote style in server.py (single to double quotes)
- Apply ruff format to config.py, server.py, and types.py
- Ensure all code passes ruff check and format --check
Fixes TypeError: Cannot read properties of undefined (reading 'statusCode')
that occurs after page reload due to browser caching.

Minimal fix: just wrap statusCode access in null check.
Ignoring get_session_id for now
@agnivabanerjee

Copy link
Copy Markdown
Contributor

hi @hayescode @asvishnyakov @tituslhy !

with the latest push, I have fixed the remaining errors when connecting to streamable-http.
PyTests and CI issues pass locally.
Let me know please if there are any more issues 🙏

having this feature in the next release would be great!

@hayescode
hayescode added this pull request to the merge queue Jul 30, 2025
Merged via the queue into Chainlit:main with commit df3d4ff Jul 30, 2025
asvishnyakov added a commit to Chainlit/docs that referenced this pull request Aug 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Pertains to the Python backend. frontend Pertains to the frontend. size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants