File tree Expand file tree Collapse file tree 1 file changed +1
-11
lines changed
example/demo-http/src/main/scala/ch/linkyard/mcp/example/demo Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Original file line number Diff line number Diff line change @@ -28,17 +28,7 @@ object HttpDemoMcpServer extends IOApp:
2828 given SessionStore [IO ] <- SessionStore .inMemory[IO ](30 .minutes)
2929 handler = DemoServer ().jsonRpcConnectionHandler(logError)
3030 given Client [IO ] <- EmberClientBuilder .default[IO ].build
31- // To authenticate use
32- // authServer <- OAuthAuthorizationServer.fromOidcServer(uri"https://id.yourkeycloak.com/auth/realms/my-realm")
33- // middleware =
34- // OAuthMiddleware(
35- // name = "demo-mcp-server",
36- // authorizationServers = authServer.rootUri :: Nil,
37- // scopes = List("openid"),
38- // t => IO.println(s"Got Token: $t").as(true), // check the token here
39- // )
40- // mcpRoute = McpServerRoute.route(handler)
41- // route = middleware.wellKnownRoutes <+> authServer.route <+> middleware.protectMcp(mcpRoute)
31+ // if you need authentication see the simple-authenticated example
4232 route = McpServerRoute .route(handler)
4333 _ <- EmberServerBuilder .default[IO ]
4434 .withHost(Host .fromString(" 127.0.0.1" ).get)
You can’t perform that action at this time.
0 commit comments