* feat: support hosted OAuth for authenticated HTTP MCP servers (#751) * fix(mcp): import McpOAuthFlowResponse in McpServersViewModel --------- Co-authored-by: M57 <hy4ri@users.noreply.github.com>
This commit is contained in:
1 parent
86e1e66ea9
commit
422bb9f5e6
8 files changed
+211
No files matched your search
@@ -17,6 +17,7 @@ data class McpServer(
|
||||
val enabled: Boolean,
|
||||
val status: String? = null,
|
||||
val error: String? = null,
|
||||
val auth: String? = null,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
@@ -64,3 +65,12 @@ data class McpCatalogInstallRequest(
|
||||
val name: String,
|
||||
val env: Map<String, String>? = null,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class McpOAuthFlowResponse(
|
||||
val flowId: String,
|
||||
val serverName: String,
|
||||
val status: String,
|
||||
val authorizationUrl: String? = null,
|
||||
val error: String? = null,
|
||||
)
|
||||
@@ -44,6 +44,7 @@ import com.m57.hermescontrol.data.model.ManagedFileUpload
|
||||
import com.m57.hermescontrol.data.model.ManagedFilesListResponse
|
||||
import com.m57.hermescontrol.data.model.McpCatalogInstallRequest
|
||||
import com.m57.hermescontrol.data.model.McpCatalogResponse
|
||||
import com.m57.hermescontrol.data.model.McpOAuthFlowResponse
|
||||
import com.m57.hermescontrol.data.model.McpServer
|
||||
import com.m57.hermescontrol.data.model.McpServerToggleRequest
|
||||
import com.m57.hermescontrol.data.model.McpServersResponse
|
||||
@@ -426,6 +427,16 @@ interface HermesApiService {
|
||||
@Path("name") name: String,
|
||||
): Response<Unit>
|
||||
|
||||
@POST("api/mcp/servers/{name}/auth")
|
||||
suspend fun authMcpServer(
|
||||
@Path("name") name: String,
|
||||
): Response<McpOAuthFlowResponse>
|
||||
|
||||
@GET("api/mcp/oauth/flows/{flow_id}")
|
||||
suspend fun getMcpOAuthFlowStatus(
|
||||
@Path("flow_id") flowId: String,
|
||||
): Response<McpOAuthFlowResponse>
|
||||
|
||||
@GET("api/mcp/catalog")
|
||||
suspend fun getMcpCatalog(): Response<McpCatalogResponse>
|
||||
|
||||
|
||||
Reference in new issue
Block a user