Update MCP server
Update an MCP server’s URL, auth config, or other settings.
PATCH
/
v1
/
agents
/
{agentId}
/
branches
/
{branchId}
/
mcp-servers
/
{serverId}
Update MCP server
curl --request PATCH \
--url https://api.us.poly.ai/v1/agents/{agentId}/branches/{branchId}/mcp-servers/{serverId} \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"url": "<string>",
"auth": {
"header": "<string>",
"queryParam": "<string>",
"secretName": "<string>"
},
"timeout": 29
}
'import requests
url = "https://api.us.poly.ai/v1/agents/{agentId}/branches/{branchId}/mcp-servers/{serverId}"
payload = {
"url": "<string>",
"auth": {
"header": "<string>",
"queryParam": "<string>",
"secretName": "<string>"
},
"timeout": 29
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: '<string>',
auth: {header: '<string>', queryParam: '<string>', secretName: '<string>'},
timeout: 29
})
};
fetch('https://api.us.poly.ai/v1/agents/{agentId}/branches/{branchId}/mcp-servers/{serverId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.us.poly.ai/v1/agents/{agentId}/branches/{branchId}/mcp-servers/{serverId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>',
'auth' => [
'header' => '<string>',
'queryParam' => '<string>',
'secretName' => '<string>'
],
'timeout' => 29
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.us.poly.ai/v1/agents/{agentId}/branches/{branchId}/mcp-servers/{serverId}"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"auth\": {\n \"header\": \"<string>\",\n \"queryParam\": \"<string>\",\n \"secretName\": \"<string>\"\n },\n \"timeout\": 29\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.us.poly.ai/v1/agents/{agentId}/branches/{branchId}/mcp-servers/{serverId}")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"auth\": {\n \"header\": \"<string>\",\n \"queryParam\": \"<string>\",\n \"secretName\": \"<string>\"\n },\n \"timeout\": 29\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.us.poly.ai/v1/agents/{agentId}/branches/{branchId}/mcp-servers/{serverId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"auth\": {\n \"header\": \"<string>\",\n \"queryParam\": \"<string>\",\n \"secretName\": \"<string>\"\n },\n \"timeout\": 29\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"providerId": "<string>",
"url": "<string>",
"connected": true,
"auth": {
"header": "<string>",
"queryParam": "<string>",
"oauth": {
"clientId": "<string>",
"tokenUrl": "<string>",
"clientSecretName": "<string>",
"audience": "<string>",
"scope": "<string>"
},
"secretName": "<string>"
},
"timeout": 123,
"enabledFunctions": [
"<string>"
],
"lastDiscoveredAt": "<string>",
"lastDiscoveredToolCount": 123
}Authorizations
Body
application/json
Response
Updated MCP server
An MCP server connection configured on a branch, including its live discovery and connection state.
How the MCP server authenticates: a header, a query parameter, or OAuth client credentials, each resolved from a secret at connect time.
Show child attributes
Show child attributes
Last modified on November 12, 2026
Was this page helpful?
⌘I
Update MCP server
curl --request PATCH \
--url https://api.us.poly.ai/v1/agents/{agentId}/branches/{branchId}/mcp-servers/{serverId} \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"url": "<string>",
"auth": {
"header": "<string>",
"queryParam": "<string>",
"secretName": "<string>"
},
"timeout": 29
}
'import requests
url = "https://api.us.poly.ai/v1/agents/{agentId}/branches/{branchId}/mcp-servers/{serverId}"
payload = {
"url": "<string>",
"auth": {
"header": "<string>",
"queryParam": "<string>",
"secretName": "<string>"
},
"timeout": 29
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: '<string>',
auth: {header: '<string>', queryParam: '<string>', secretName: '<string>'},
timeout: 29
})
};
fetch('https://api.us.poly.ai/v1/agents/{agentId}/branches/{branchId}/mcp-servers/{serverId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.us.poly.ai/v1/agents/{agentId}/branches/{branchId}/mcp-servers/{serverId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>',
'auth' => [
'header' => '<string>',
'queryParam' => '<string>',
'secretName' => '<string>'
],
'timeout' => 29
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.us.poly.ai/v1/agents/{agentId}/branches/{branchId}/mcp-servers/{serverId}"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"auth\": {\n \"header\": \"<string>\",\n \"queryParam\": \"<string>\",\n \"secretName\": \"<string>\"\n },\n \"timeout\": 29\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.us.poly.ai/v1/agents/{agentId}/branches/{branchId}/mcp-servers/{serverId}")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"auth\": {\n \"header\": \"<string>\",\n \"queryParam\": \"<string>\",\n \"secretName\": \"<string>\"\n },\n \"timeout\": 29\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.us.poly.ai/v1/agents/{agentId}/branches/{branchId}/mcp-servers/{serverId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"auth\": {\n \"header\": \"<string>\",\n \"queryParam\": \"<string>\",\n \"secretName\": \"<string>\"\n },\n \"timeout\": 29\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"providerId": "<string>",
"url": "<string>",
"connected": true,
"auth": {
"header": "<string>",
"queryParam": "<string>",
"oauth": {
"clientId": "<string>",
"tokenUrl": "<string>",
"clientSecretName": "<string>",
"audience": "<string>",
"scope": "<string>"
},
"secretName": "<string>"
},
"timeout": 123,
"enabledFunctions": [
"<string>"
],
"lastDiscoveredAt": "<string>",
"lastDiscoveredToolCount": 123
}
