MCP server with basic auth and AIAgent #940
-
|
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? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
Hi @devcrocod @tiginamaria, could you please help with these questions? Thanks! |
Beta Was this translation helpful? Give feedback.
-
|
You can instantiate |
Beta Was this translation helpful? Give feedback.
Hi @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