---
docId: doc_079a423580474f418b039beb799a1e5e
title: Update an MCP server
description: "Update an MCP server and verify it again when the connection changes."
api:
  group: herramientas/servidores-mcp
  auth: bearer
  operations:
    - operationId: updateMcpServer
      method: PATCH
      path: '/v1/tools/mcp/{mcpId}'
      postmanName: Update an MCP server
---

<script>
  import { Ways, Note } from '$lib/components';
</script>

# Update an MCP server

Update only the fields you send. A connection change invalidates the previous test and returns the server to `pending_config`. Bind its secrets, test it, and choose its tools again.

## Example

<Ways tabs="api,sdk">
<Ways.Way name="api">

```bash
curl -X PATCH https://api.platic.ai/v1/tools/mcp/$MCP_ID \
  -H "Authorization: Bearer $PLATIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "description": "Product documentation" }'
```

</Ways.Way>
<Ways.Way name="sdk">

```ts
await platic.tools.mcp.update("mcp_123", { description: "Product documentation" });
```

</Ways.Way>
</Ways>

## Path parameters

| Parameter | Type | Description | Required |
|-----------|------|-------------|----------|
| `mcpId` | string | Id of the MCP server | ✓ |

## Request body

Send at least one field.

| Field | Type | Description | Required |
|-------|------|-------------|----------|
| `name` | string | 1 to 120 characters | — |
| `description` | string | Up to 500 characters | — |
| `url` | string | URL of the MCP server | — |
| `auth` | object | Same as when you [connect](/api-reference/mcp-servers/connect#authentication) | — |
| `headers` | object | Replaces all fixed headers | — |
| `secrets` | object | Map of slot to secret id. If it is the only thing you send, it only binds and does not touch the connection | — |
| `expectedVersion` | number | The `version` you read. If the stored one is different, it answers `409` instead of overwriting | — |

```json
{
  "url": "https://mcp.linear.app/mcp",
  "auth": { "type": "apikey-header", "headerName": "X-Api-Key" },
  "expectedVersion": 3,
  "secrets": {
    "auth.token": "5d0c7a1e9b3f4a6c8e2d1f0b7a9c3e5d6f8a0b2c4d6e8f1a3b5c7d9e0f2a4b6c"
  }
}
```

Sending `secrets` together with the change binds the slots again in the same call.

`tools` is not accepted here: tools are chosen with [choose tools](/api-reference/mcp-servers/select-tools).

## Response

`data` has the server after the change, with the fields in [get an MCP server](/api-reference/mcp-servers/get#response-fields).

```json
{
  "status": "success",
  "message": "MCP server updated successfully",
  "data": {
    "id": "QZPHpckDPC58JIVLQA3Z",
    "name": "Linear",
    "description": "Support team issues",
    "url": "https://mcp.linear.app/mcp",
    "transport": "streamable-http",
    "slug": "a1b2c3",
    "authType": "apikey-header",
    "auth": { "type": "apikey-header", "headerName": "X-Api-Key", "headerPrefix": "" },
    "status": "pending_config",
    "lastError": null,
    "serverInfo": { "name": "linear-mcp", "version": "1.4.0" },
    "customHeaderNames": [],
    "discoveredToolsCount": 2,
    "installedToolsCount": 0,
    "lastSyncAt": null,
    "createdAt": "2026-10-28T12:02:11.410Z",
    "updatedAt": "2026-11-03T18:40:12.000Z",
    "version": 4,
    "verified": false,
    "secrets": [
      {
        "slot": "auth.token",
        "state": "authorized",
        "secretId": "5d0c7a1e9b3f4a6c8e2d1f0b7a9c3e5d6f8a0b2c4d6e8f1a3b5c7d9e0f2a4b6c"
      }
    ],
    "discoveredTools": [
      {
        "name": "create_issue",
        "description": "Create a new issue in Linear",
        "inputSchema": { "type": "object", "properties": { "title": { "type": "string" } } },
        "installed": false
      }
    ],
    "installedTools": [],
    "nextStep": "Test the connection with POST /v1/tools/mcp/QZPHpckDPC58JIVLQA3Z/test: that is when the server lists the tools it offers."
  }
}
```

## What changes when you update

<Note type="warning">

Updating a `connected` server takes its tools out of the catalog. Agents stop using them until you test it and choose them again.

</Note>

| Effect | Detail |
|--------|--------|
| `status` goes back to `pending_config` | Also if you only changed `name` or `description` |
| `verified` goes back to `false` | The previous test no longer counts |
| `installedTools` is empty | The tools stop being available. Their connections to agents are not deleted |
| Slots become `needs_authorization` | They keep their `secretId`. Bind them again, in this call with `secrets` or with [bind a secret](/api-reference/mcp-servers/bind-secret) |
| `version` goes up by one | Use it as `expectedVersion` in the next change |

To leave it as it was: bind the secrets, [test](/api-reference/mcp-servers/test), and [choose the same tools](/api-reference/mcp-servers/select-tools). When they are installed again they keep their `toolId`, and the agents that had them connected use them again.

If you send only `secrets`, tools stay installed and the secrets are bound.

## Errors

| Status | `details.code` | When it happens |
|--------|----------------|-----------------|
| `400` | `INVALID_REQUEST` | The body is empty or fails validation. `details.issues` has the list of problems, or the message `No update fields provided` |
| `400` | `SECRET_REFERENCE_REQUIRED` | You sent a credential inside the connection. When it applies, `details.slot` names the slot |
| `400` | `INVALID_CONFIG` | The name, URL, authentication, or headers are not valid |
| `403` | `FORBIDDEN` | The person behind the token does not have access to Integrations |
| `404` | `NOT_FOUND` | The server does not exist in this workspace |
| `409` | `RESOURCE_CHANGED` | `expectedVersion` does not match, or the server changed while it was being saved. Get it again and retry |

If the change is saved but a secret in `secrets` cannot be bound, the response is `200` and `data.secretsError` has `{ code, message }`.

## Notes

- If you only want an agent to stop using a tool, [pause its connection](/api-reference/agents/tools/pause) instead of editing the server.
- To change a credential without touching the connection, [rotate the secret](/api-reference/secrets/rotate).
