# DELETE Mcps Id (https://www.codevisor.dev/docs/api-reference/mcp-servers/delete-mcps-by-id)

## DELETE /v1/mcps/{id}

DELETE Mcps Id

## OpenAPI definition

```json

{
  "openapi": "3.2.0",
  "info": {
    "title": "Codevisor Server API",
    "version": "v1-experimental",
    "description": "Experimental public API for projects, coding-agent sessions, extensions, files, events, and terminals on a Codevisor server."
  },
  "servers": [
    {
      "url": "http://127.0.0.1:49361",
      "description": "Default local server. If 49361 is taken it uses the next free port up to 49399; `codevisor status` shows the port."
    }
  ],
  "tags": [
    {
      "name": "Server"
    },
    {
      "name": "Authentication"
    },
    {
      "name": "Updates"
    },
    {
      "name": "Projects"
    },
    {
      "name": "Workspaces"
    },
    {
      "name": "Harnesses"
    },
    {
      "name": "Plugins"
    },
    {
      "name": "MCP servers"
    },
    {
      "name": "Skills"
    },
    {
      "name": "Sessions"
    },
    {
      "name": "Files"
    },
    {
      "name": "Events"
    },
    {
      "name": "Terminals"
    }
  ],
  "paths": {
    "/v1/mcps/{id}": {
      "patch": {
        "operationId": "patch-mcps-by-id",
        "tags": [
          "MCP servers"
        ],
        "summary": "PATCH Mcps Id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "managed",
                        "browserUse",
                        "computerUse",
                        "codevisor"
                      ]
                    },
                    "canEdit": {
                      "type": "boolean"
                    },
                    "canRemove": {
                      "type": "boolean"
                    },
                    "transport": {
                      "type": "string",
                      "enum": [
                        "http",
                        "stdio"
                      ]
                    },
                    "url": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "command": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "args": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "headerNames": {
                      "anyOf": [
                        {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "environmentNames": {
                      "anyOf": [
                        {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "enabled": {
                      "type": "boolean"
                    },
                    "authType": {
                      "type": "string",
                      "enum": [
                        "none",
                        "bearer",
                        "oauth"
                      ]
                    },
                    "oauthScope": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "connectionState": {
                      "type": "string",
                      "enum": [
                        "disconnected",
                        "connecting",
                        "connected",
                        "needsSetup",
                        "unavailable",
                        "needsAuthorization",
                        "expired",
                        "error"
                      ]
                    },
                    "toolCount": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "string",
                          "enum": [
                            "NaN"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "Infinity"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "-Infinity"
                          ]
                        }
                      ]
                    },
                    "detail": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "catalogId": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "catalogVersion": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "capabilities": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "tools": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  },
                                  "description": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "effects": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "enum": [
                                          "read",
                                          "write",
                                          "external-write"
                                        ]
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "app": {
                                    "anyOf": [
                                      {
                                        "type": "boolean"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "name"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "events": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  },
                                  "description": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "name"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "skills": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  },
                                  "description": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "name"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "panes": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string"
                                  },
                                  "title": {
                                    "type": "string"
                                  },
                                  "resourceUri": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "title",
                                  "resourceUri"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "ingress": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string"
                                  },
                                  "title": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "route": {
                                    "anyOf": [
                                      {
                                        "type": "string"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "name"
                                ],
                                "additionalProperties": false
                              }
                            }
                          },
                          "required": [
                            "tools",
                            "events",
                            "skills",
                            "panes",
                            "ingress"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "ageRating": {
                      "anyOf": [
                        {
                          "type": "number",
                          "enum": [
                            4,
                            9,
                            13,
                            16,
                            18
                          ]
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "updatedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "kind",
                    "canEdit",
                    "canRemove",
                    "transport",
                    "args",
                    "enabled",
                    "authType",
                    "connectionState",
                    "toolCount",
                    "createdAt",
                    "updatedAt"
                  ],
                  "additionalProperties": false,
                  "$defs": {}
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "enabled": {
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "url": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "command": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "args": {
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "env": {
                    "anyOf": [
                      {
                        "type": "object",
                        "additionalProperties": {
                          "type": "string"
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "headers": {
                    "anyOf": [
                      {
                        "type": "object",
                        "additionalProperties": {
                          "type": "string"
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "removeEnv": {
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "removeHeaders": {
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "authType": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "none",
                          "bearer",
                          "oauth"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "bearerToken": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "oauthScope": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "oauthClientId": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "oauthClientSecret": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false,
                "$defs": {}
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete-mcps-by-id",
        "tags": [
          "MCP servers"
        ],
        "summary": "DELETE Mcps Id",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Success"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "Codevisor pairing token"
      }
    },
    "responses": {
      "BadRequest": {
        "description": "The JSON body is malformed or does not match the request schema.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "error"
              ],
              "properties": {
                "error": {
                  "type": "string"
                }
              },
              "additionalProperties": false
            }
          }
        }
      },
      "Unauthorized": {
        "description": "A valid bearer token is required for non-local requests.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "error"
              ],
              "properties": {
                "error": {
                  "type": "string"
                }
              },
              "additionalProperties": false
            }
          }
        }
      },
      "NotFound": {
        "description": "The requested resource does not exist.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "error"
              ],
              "properties": {
                "error": {
                  "type": "string"
                }
              },
              "additionalProperties": false
            }
          }
        }
      },
      "Conflict": {
        "description": "The request conflicts with the resource's current state.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "error"
              ],
              "properties": {
                "error": {
                  "type": "string"
                }
              },
              "additionalProperties": false
            }
          }
        }
      },
      "InvalidRequest": {
        "description": "The request is well formed but cannot be applied.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "error"
              ],
              "properties": {
                "error": {
                  "type": "string"
                }
              },
              "additionalProperties": false
            }
          }
        }
      },
      "ServerError": {
        "description": "The server could not complete the request.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "error"
              ],
              "properties": {
                "error": {
                  "type": "string"
                }
              },
              "additionalProperties": false
            }
          }
        }
      }
    }
  }
}

```