`cam mcp remove NAME --client TOOL`.
(state *globalState)
| 204 | |
| 205 | // `cam mcp remove NAME --client TOOL`. |
| 206 | func (a *App) mcpRemoveCommand(state *globalState) *cobra.Command { |
| 207 | var ( |
| 208 | clientName string |
| 209 | scope string |
| 210 | ) |
| 211 | cmd := &cobra.Command{ |
| 212 | Use: "remove NAME", |
| 213 | Aliases: []string{"delete", "rm"}, |
| 214 | Short: "Remove MCP server from a client", |
| 215 | Args: cobra.ExactArgs(1), |
| 216 | RunE: func(cmd *cobra.Command, args []string) error { |
| 217 | out := cmd.OutOrStdout() |
| 218 | client, err := requireClient(clientName) |
| 219 | if err != nil { |
| 220 | return err |
| 221 | } |
| 222 | path, found, err := mcp.RemoveServer(client, mcp.Scope(scope), args[0]) |
| 223 | if err != nil { |
| 224 | return err |
| 225 | } |
| 226 | if !found { |
| 227 | fmt.Fprintf(out, "Not installed: %s\n", args[0]) |
| 228 | return nil |
| 229 | } |
| 230 | fmt.Fprintf(out, "Removed %s from %s\n Config: %s\n", args[0], client.Name, path) |
| 231 | return nil |
| 232 | }, |
| 233 | } |
| 234 | cmd.Flags().StringVarP(&clientName, "client", "c", "", "Target MCP client (required)") |
| 235 | cmd.Flags().StringVarP(&scope, "scope", "s", "user", "Scope (user|project)") |
| 236 | _ = cmd.MarkFlagRequired("client") |
| 237 | return cmd |
| 238 | } |
| 239 | |
| 240 | // `cam mcp server <list|search|show>` queries the bundled registry. |
| 241 | func (a *App) mcpServerCommand() *cobra.Command { |
no test coverage detected