MCP server with basic auth and AIAgent #940
Answered
by
devcrocod
Hari Rao (hariraogotit)
asked this question in
Q&A
|
Team, I followed https://mcp.http4k.org/ and I am running a MCP server locally http://localhost:3000/mcp with basic auth security. I then created an ai agent using AIAgent. In AIAgent I am passing toolRegistry. From https://docs.koog.ai/model-context-protocol/ I understand I can use
Any leads will help please? |
Answered by
devcrocod
Oct 28, 2025
Replies: 2 comments
|
Hi Pavel Gorgulov (@devcrocod) Maria Tigina (@tiginamaria), could you please help with these questions? Thanks! |
0 replies
|
You can instantiate |
0 replies
Answer selected by
zarechneva-a
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Hari Rao (@hariraogotit)
You can instantiate
SseClientTransportfrom mcp kotlin-sdk that accepts a Ktor HttpClient, where you can configure authentication (e.g., Basic auth) (ktor doc)After that, either create an MCP Client with this transport and pass it to
fromClient(...), or callfromTransport(...)and pass the transport directly