# Update MCP server

> Source: https://truto.one/docs/api-reference/admin/mcp/update/

`PATCH /integrated-account/{integrated_account_id}/mcp/{id}`

Resource: **MCP**

## Path parameters

- **`integrated_account_id`** _(string, required)_
  The ID of the integrated account.
- **`id`** _(string, required)_
  The ID of the MCP server to update.

## Request body

- **`name`** _(string)_
  The new name for the MCP server.
- **`config`** _(object)_
  Updated configuration settings for the MCP server
  - **`methods`** _(array<string>)_
    The methods allowed for this server.
  - **`tags`** _(array<string>)_
    The tags associated with this server.

## Response body

- **`id`** _(string)_
  Unique identifier for the MCP server
- **`name`** _(string)_
  Updated name of the MCP server
- **`config`** _(object)_
  Updated configuration settings for the MCP server
  - **`methods`** _(array<string>)_
    Updated list of HTTP methods allowed for this server
  - **`tags`** _(array<string>)_
    Updated List of tags associated with this server
- **`created_at`** _(string)_
  Timestamp when the MCP server was created
- **`updated_at`** _(string)_
  Timestamp when the MCP server was last updated

## Code examples

### curl

```bash
curl -X PATCH 'https://api.truto.one/integrated-account/{integrated_account_id}/mcp/{id}' \
  -H 'Authorization: Bearer <your_api_token>' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "Updated MCP server",
  "config": {}
}'
```

### JavaScript

```javascript
const body = {
  "name": "Updated MCP server",
  "config": {}
};

const response = await fetch('https://api.truto.one/integrated-account/{integrated_account_id}/mcp/{id}', {
  method: 'PATCH',
  headers: {
    'Authorization': 'Bearer <your_api_token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(body),
});

const data = await response.json();
console.log(data);
```

### Python

```python
import requests

url = "https://api.truto.one/integrated-account/{integrated_account_id}/mcp/{id}"
headers = {
    "Authorization": "Bearer <your_api_token>",
    "Content-Type": "application/json",
}
params = {
}
payload = {
    "name": "Updated MCP server",
    "config": {}
}

response = requests.patch(url, headers=headers, params=params, json=payload)
print(response.json())
```
