Good morning. I’m trying to figure out how to create an agent that can connect to an MCP with oauth. I’d like to create an agent that can connect to our Notion’s MCP workspace but I’m not sure how to sort the oauth part. 🙏🏻
k
Konstantin
11/21/2025, 2:26 PM
Hello! When you create MCP client, you may provide a KtorHttpClient. You should be able to configure authentication for Ktor client using Ktor auth plugin
m
Marc
11/21/2025, 2:40 PM
is there any documentation on how this is done? I’m strugling to figure out the flow. In my case I’m trying to create a backend service that is connected to a slack bot. the service gets thread conversation and afterwards the idea is to connect to Notion MCP to run a categorization task. not sure how to log the agent to the notion mcp 🤔
I see, this is working with api tokens right? there are MCPs like Notion or Jira that are triggering a browser where you can do the authentication, thats is my confusing part. If I would like to connect thougha. backend it seems not much feaisble I’m afraight, right? 😕
k
Konstantin
11/21/2025, 3:00 PM
Are you building agent on browser or you don’t need the agent and only need an MCP client?
m
Marc
11/21/2025, 3:01 PM
I’m running a backend service that creaes a koog agent that tries to use this MCP as a client
k
Konstantin
11/21/2025, 3:02 PM
You should probably authenticate user, get api key and then pass it to the agent setup and configure MCP client
m
Marc
11/21/2025, 3:02 PM
will check if they suport token injection, thank you for the info! 🙏🏻