| 148 | } |
| 149 | |
| 150 | func (c *Client) MCPServerConfigs(ctx context.Context) ([]MCPServerConfig, error) { |
| 151 | res, err := c.Request(ctx, http.MethodGet, "/api/experimental/mcp/servers", nil) |
| 152 | if err != nil { |
| 153 | return nil, err |
| 154 | } |
| 155 | defer res.Body.Close() |
| 156 | if res.StatusCode != http.StatusOK { |
| 157 | return nil, ReadBodyAsError(res) |
| 158 | } |
| 159 | var configs []MCPServerConfig |
| 160 | return configs, json.NewDecoder(res.Body).Decode(&configs) |
| 161 | } |
| 162 | |
| 163 | func (c *Client) MCPServerConfigByID(ctx context.Context, id uuid.UUID) (MCPServerConfig, error) { |
| 164 | res, err := c.Request(ctx, http.MethodGet, fmt.Sprintf("/api/experimental/mcp/servers/%s", id), nil) |