# Update ActivePieces MCP server

`PATCH /api/integration/activepieces/mcp/{serverId}`

Authentication (security requirement alternatives):

```json
[
  {
    "bearer": []
  }
]
```

- bearer: http (bearer), header JWT. Enter JWT token

Parameters:

- `serverId` (path, string, required) - MCP server ID
  Type: string

Request body: application/json (required)

Type: object

Schema: [ActivepiecesMcpUpdateDto](https://sourcey-gauzy.pages.dev/api-reference/models/activepiecesmcpupdatedto/index.md)

- `name` (optional)
  Type: string
  
  MCP server name

- `tools` (optional)
  Type: array
  
  Array of tools for the MCP server
  
  Items:
    Reference: [ActivepiecesMcpToolDto](https://sourcey-gauzy.pages.dev/api-reference/models/activepiecesmcptooldto/index.md); Type: object

Responses:

- 200: Returns updated MCP server

Content type: application/json

Type: object

## Examples

### cURL

```bash
curl -X PATCH 'http://localhost:3000/api/integration/activepieces/mcp/string' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "name": "string",
  "tools": [
    {
      "id": "string",
      "type": "string",
      "pieceMetadata": {},
      "flowId": "string"
    }
  ]
}'
```

### JavaScript

```javascript
const body = `{
  "name": "string",
  "tools": [
    {
      "id": "string",
      "type": "string",
      "pieceMetadata": {},
      "flowId": "string"
    }
  ]
}`;

const response = await fetch('http://localhost:3000/api/integration/activepieces/mcp/string', {
  method: 'PATCH',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json',
  },
  body,
});

const data = await response.text();
```

### Python

```python
import requests

body = '''{
  "name": "string",
  "tools": [
    {
      "id": "string",
      "type": "string",
      "pieceMetadata": {},
      "flowId": "string"
    }
  ]
}'''

response = requests.patch(
    'http://localhost:3000/api/integration/activepieces/mcp/string',
    data=body.encode('utf-8'),
    headers={
        'Authorization': 'Bearer YOUR_TOKEN',
        'Content-Type': 'application/json',
    },
)
print(response.text)
```
