Add MCP server disconnect functionality

What does this MR do and why?

Related issue: Enable custom agents to access external data vi... (#590708)

Add MCP server disconnect functionality

  • Add RevokeTokenService that attempts provider token revocation (RFC 7009) before destroying the local McpServersUser record; returns an error if destroy fails, ignores provider-side errors
  • Add disconnect action and POST route to McpConnectorsAuthController, returning JSON 200/422
  • Expose currentUserConnected boolean field on AiCatalogMcpServer GraphQL type via connected_by_user? model method
  • Show Disconnect button in place of Connect when the current user is already connected; handle disconnect with axios POST + Apollo refetch
  • Add disconnectMcpServer utility alongside connectMcpServer in utils.js
  • Add full spec coverage: RevokeTokenService (12 examples), disconnect action in controller spec (6 examples), type spec field check

Screenshots

Button

Screenshot_2026-03-12_at_21.48.22

Confirmation

Screenshot_2026-03-12_at_21.48.56

Edited by Igor Drozdov

Merge request reports

Loading