MCPcopy Index your code
hub / github.com/coder/coder / MCPServerOAuth2Disconnect

Method MCPServerOAuth2Disconnect

codersdk/mcp.go:22–32  ·  view source on GitHub ↗

MCPServerOAuth2Disconnect removes the user's OAuth2 token for an MCP server.

(ctx context.Context, id uuid.UUID)

Source from the content-addressed store, hash-verified

20// MCPServerOAuth2Disconnect removes the user's OAuth2 token for an
21// MCP server.
22func (c *Client) MCPServerOAuth2Disconnect(ctx context.Context, id uuid.UUID) error {
23 res, err := c.Request(ctx, http.MethodDelete, fmt.Sprintf("/api/experimental/mcp/servers/%s/oauth2/disconnect", id), nil)
24 if err != nil {
25 return err
26 }
27 defer res.Body.Close()
28 if res.StatusCode != http.StatusNoContent {
29 return ReadBodyAsError(res)
30 }
31 return nil
32}
33
34// MCPServerConfig represents an admin-configured MCP server.
35type MCPServerConfig struct {

Callers 1

Calls 3

RequestMethod · 0.95
ReadBodyAsErrorFunction · 0.85
CloseMethod · 0.65

Tested by 1