feat: Rework MCP settings and support headers for SSE
Can you provide a description of why these changes are necessary?
Changes are necessary to support #2022.
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
@tcx4c70 this isn't working for me.
For headers i'd recommend a form with seperate key/value input areas, and a + sign to add a new row/header.
Will there be another approach? Imo this feature is really important.