curl --request DELETE \
--url https://api.example.com/api/settings/mcp/{settings_key} \
--header 'X-Session-API-Key: <api-key>'import requests
url = "https://api.example.com/api/settings/mcp/{settings_key}"
headers = {"X-Session-API-Key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'X-Session-API-Key': '<api-key>'}};
fetch('https://api.example.com/api/settings/mcp/{settings_key}', 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.example.com/api/settings/mcp/{settings_key}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"X-Session-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"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/settings/mcp/{settings_key}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("X-Session-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.example.com/api/settings/mcp/{settings_key}")
.header("X-Session-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/settings/mcp/{settings_key}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-Session-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"agent_settings": {
"mcp_config": {},
"agent_kind": "openhands",
"schema_version": 2
},
"conversation_settings": {},
"llm_api_key_is_set": true,
"active_agent_profile_id": "<string>",
"active_meta_profile": "<string>",
"active_profile": "<string>",
"misc_settings": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Delete Mcp Server
Delete one existing named MCP server without altering sibling entries.
curl --request DELETE \
--url https://api.example.com/api/settings/mcp/{settings_key} \
--header 'X-Session-API-Key: <api-key>'import requests
url = "https://api.example.com/api/settings/mcp/{settings_key}"
headers = {"X-Session-API-Key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'X-Session-API-Key': '<api-key>'}};
fetch('https://api.example.com/api/settings/mcp/{settings_key}', 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.example.com/api/settings/mcp/{settings_key}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"X-Session-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"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/settings/mcp/{settings_key}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("X-Session-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.example.com/api/settings/mcp/{settings_key}")
.header("X-Session-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/settings/mcp/{settings_key}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-Session-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"agent_settings": {
"mcp_config": {},
"agent_kind": "openhands",
"schema_version": 2
},
"conversation_settings": {},
"llm_api_key_is_set": true,
"active_agent_profile_id": "<string>",
"active_meta_profile": "<string>",
"active_profile": "<string>",
"misc_settings": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Authorizations
Path Parameters
Response
Successful Response
Response model for GET /api/settings.
Contains the full settings payload including agent configuration, conversation settings, active LLM profile, miscellaneous frontend-owned settings, and a flag indicating whether an LLM API key is set.
The agent_settings and conversation_settings fields are raw dicts
because the server controls secret serialization via context. Use the
typed accessor methods for validation:
Example::
response = SettingsResponse.model_validate(api_response.json())
agent = response.get_agent_settings() # Returns AgentSettingsConfig
conv = response.get_conversation_settings() # Returns ConversationSettings
misc_settings is an opaque container for frontend-owned data that the
agent-server persists but does not interpret — see the docstring of
:class:PersistedSettings.misc_settings.
Show child attributes
Show child attributes
Stable id of the currently active AgentProfile, if one is set.
Name of the currently active meta-profile, if one is selected.
Name of the currently active LLM profile, if one is selected.
Was this page helpful?

