chainlit icon indicating copy to clipboard operation
chainlit copied to clipboard

feat: Rework MCP settings and support headers for SSE

Open tcx4c70 opened this issue 1 year ago • 2 comments

tcx4c70 avatar Mar 24 '25 03:03 tcx4c70

Can you provide a description of why these changes are necessary?

willydouhard avatar Apr 17 '25 13:04 willydouhard

Changes are necessary to support #2022.

GhimBoon avatar Apr 23 '25 10:04 GhimBoon

Can you provide a description of why these changes are necessary?

These changes are valuable if you want to secure your MCP tool endpoints behind some sort of auth (with token passthrough), especially if you're building on top of existing APIs. That way, you can set a bearer token at the point of the chainlit app making requests, e.g. at user session init, and provide that token to the MCP server which can pass it through to the relevant tool endpoints.

A good example of this is https://github.com/tadata-org/fastapi_mcp/blob/main/examples/08_auth_example_token_passthrough.py

jiriklein avatar May 16 '25 08:05 jiriklein

@tcx4c70 this isn't working for me. image

image

image

hayescode avatar Jul 01 '25 03:07 hayescode

For headers i'd recommend a form with seperate key/value input areas, and a + sign to add a new row/header.

hayescode avatar Jul 01 '25 03:07 hayescode

Will there be another approach? Imo this feature is really important.

senj avatar Jul 02 '25 14:07 senj