feat: Implement dynamic MCP server integration with authentication#121
Conversation
|
I welcome this PR as we're dynamically registering MCP Severs with a In order to move to I wonder however whether the authentication should/could be moved to a separate PR. The approach proposed in this PR does not fulfil our requirements (of providing different headers for different MCP servers). |
Thanks for the review. |
4cbd2cd to
31ad6d8
Compare
|
@eranco74 if you like, I will add you as maintainer for the core, so all the CI tests will run automatically. Agreed? |
e404f65 to
3882c25
Compare
tisnik
left a comment
There was a problem hiding this comment.
it looks ok!
Please:
- change from draft to ready for review state
- accept invitation, so your changes will trigger CI (TBH dunno if it works for existing PRs)
- try to fix linter errors, seems like pretty straightforward
LGTM instead
- Add ModelContextProtocolServer configuration model - Add MCP server registration during app startup lifecycle - Update query handler to use configured MCP tools with authentication - Integrate Agent with dynamic MCP tool registration from config - Implement access token forwarding to MCP servers via headers - Refactor auth dependency to extract and return access tokens - Migrate from startup events to lifespan context manager This enables dynamic registration and authentication of multiple MCP servers through configuration without hardcoded endpoints. Signed-off-by: Eran Cohen <eranco@redhat.com>
* Configuration loading and access * Server registration logic * Integration with query processing * Authorization token propagation * Error handling scenarios Signed-off-by: Eran Cohen <eranco@redhat.com>
Description
This enables dynamic registration and authentication of multiple MCP servers through configuration without hardcoded endpoints.
Type of change
Related Tickets & Documents
Checklist before requesting a review
Testing