Update MCP Server
Update an existing MCP server.
PUT
/
ai
/
mcp_servers
/
{mcp_server_id}
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const mcpServer = await client.ai.mcpServers.update('mcp_server_id');
console.log(mcpServer.id);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
mcp_server = client.ai.mcp_servers.update(
mcp_server_id="mcp_server_id",
)
print(mcp_server.id)package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
mcpServer, err := client.AI.McpServers.Update(
context.TODO(),
"mcp_server_id",
telnyx.AIMcpServerUpdateParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", mcpServer.ID)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.ai.mcpservers.McpServerUpdateParams;
import com.telnyx.sdk.models.ai.mcpservers.McpServerUpdateResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
McpServerUpdateResponse mcpServer = client.ai().mcpServers().update("mcp_server_id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
mcp_server = telnyx.ai.mcp_servers.update("mcp_server_id")
puts(mcp_server)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$mcpServer = $client->ai->mcpServers->update(
'mcp_server_id',
id: 'id',
allowedTools: ['string'],
apiKeyRef: 'api_key_ref',
createdAt: new \DateTimeImmutable('2019-12-27T18:11:19.117Z'),
name: 'name',
type: 'type',
url: 'url',
);
var_dump($mcpServer);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx ai:mcp-servers update \
--api-key 'My API Key' \
--mcp-server-id mcp_server_idcurl --request PUT \
--url https://api.telnyx.com/v2/ai/mcp_servers/{mcp_server_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "<string>",
"name": "<string>",
"type": "<string>",
"url": "<string>",
"api_key_ref": "<string>",
"allowed_tools": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z"
}
'{
"id": "<string>",
"name": "<string>",
"type": "<string>",
"url": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"api_key_ref": "<string>",
"allowed_tools": [
"<string>"
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Unique identifier of the mcp server.
Body
application/json
Was this page helpful?
⌘I
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const mcpServer = await client.ai.mcpServers.update('mcp_server_id');
console.log(mcpServer.id);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
mcp_server = client.ai.mcp_servers.update(
mcp_server_id="mcp_server_id",
)
print(mcp_server.id)package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
mcpServer, err := client.AI.McpServers.Update(
context.TODO(),
"mcp_server_id",
telnyx.AIMcpServerUpdateParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", mcpServer.ID)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.ai.mcpservers.McpServerUpdateParams;
import com.telnyx.sdk.models.ai.mcpservers.McpServerUpdateResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
McpServerUpdateResponse mcpServer = client.ai().mcpServers().update("mcp_server_id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
mcp_server = telnyx.ai.mcp_servers.update("mcp_server_id")
puts(mcp_server)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$mcpServer = $client->ai->mcpServers->update(
'mcp_server_id',
id: 'id',
allowedTools: ['string'],
apiKeyRef: 'api_key_ref',
createdAt: new \DateTimeImmutable('2019-12-27T18:11:19.117Z'),
name: 'name',
type: 'type',
url: 'url',
);
var_dump($mcpServer);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx ai:mcp-servers update \
--api-key 'My API Key' \
--mcp-server-id mcp_server_idcurl --request PUT \
--url https://api.telnyx.com/v2/ai/mcp_servers/{mcp_server_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "<string>",
"name": "<string>",
"type": "<string>",
"url": "<string>",
"api_key_ref": "<string>",
"allowed_tools": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z"
}
'{
"id": "<string>",
"name": "<string>",
"type": "<string>",
"url": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"api_key_ref": "<string>",
"allowed_tools": [
"<string>"
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}