curl --request PATCH \
--url https://yoursite.com/wp-json/getmcp/v1/settings \
--header 'Authorization: Bearer gmcp_your_api_key' \
--header 'content-type: application/json' \
--data '
{
"log_retention_days": 60,
"analytics_retention_days": 180,
"enable_email_alerts": true,
"notification_email": "[email protected]",
"usage_alert_threshold": 500
}
'
import requests
response = requests.patch(
"https://yoursite.com/wp-json/getmcp/v1/settings",
headers={
"Authorization": "Bearer gmcp_your_api_key",
"Content-Type": "application/json"
},
json={
"log_retention_days": 60,
"analytics_retention_days": 180,
"enable_email_alerts": True,
"notification_email": "[email protected]",
"usage_alert_threshold": 500
}
)
print(response.json())
const response = await fetch(
"https://yoursite.com/wp-json/getmcp/v1/settings",
{
method: "PATCH",
headers: {
"Authorization": "Bearer gmcp_your_api_key",
"Content-Type": "application/json"
},
body: JSON.stringify({
log_retention_days: 60,
analytics_retention_days: 180,
enable_email_alerts: true,
notification_email: "[email protected]",
usage_alert_threshold: 500
})
}
);
const data = await response.json();
$response = wp_remote_request(
"https://yoursite.com/wp-json/getmcp/v1/settings",
[
"method" => "PATCH",
"headers" => [
"Authorization" => "Bearer gmcp_your_api_key",
"Content-Type" => "application/json"
],
"body" => json_encode([
"log_retention_days" => 60,
"analytics_retention_days" => 180,
"enable_email_alerts" => true,
"notification_email" => "[email protected]",
"usage_alert_threshold" => 500
])
]
);
$data = json_decode(wp_remote_retrieve_body($response), true);
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"log_retention_days": 60,
"analytics_retention_days": 180,
"enable_email_alerts": true,
"notification_email": "[email protected]",
"usage_alert_threshold": 500
}`)
req, _ := http.NewRequest("PATCH", "https://yoursite.com/wp-json/getmcp/v1/settings", body)
req.Header.Set("Authorization", "Bearer gmcp_your_api_key")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
data, _ := io.ReadAll(resp.Body)
fmt.Println(string(data))
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String json = "{\n \"log_retention_days\": 60,\n \"analytics_retention_days\": 180,\n \"enable_email_alerts\": true,\n \"notification_email\": \"[email protected]\",\n \"usage_alert_threshold\": 500\n}";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://yoursite.com/wp-json/getmcp/v1/settings"))
.header("Authorization", "Bearer gmcp_your_api_key")
.header("Content-Type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString(json))
.build();
HttpClient client = HttpClient.newHttpClient();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
require 'net/http'
require 'json'
require 'uri'
uri = URI('https://yoursite.com/wp-json/getmcp/v1/settings')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == 'https'
request = Net::HTTP::Patch.new(uri)
request['Authorization'] = 'Bearer gmcp_your_api_key'
request['Content-Type'] = 'application/json'
request.body = '{
"log_retention_days": 60,
"analytics_retention_days": 180,
"enable_email_alerts": true,
"notification_email": "[email protected]",
"usage_alert_threshold": 500
}'
response = http.request(request)
puts JSON.parse(response.body)
{
"default_rate_limit": 60,
"default_timeout": 30,
"log_retention_days": 60,
"analytics_retention_days": 180,
"log_response_data": false,
"enable_health_checks": true,
"health_check_interval": 60,
"notification_email": "[email protected]",
"enable_email_alerts": true,
"usage_alert_threshold": 500,
"keep_data_on_uninstall": false
}
Settings
Update Settings
Partially update plugin settings.
PATCH
/
wp-json
/
getmcp
/
v1
/
settings
curl --request PATCH \
--url https://yoursite.com/wp-json/getmcp/v1/settings \
--header 'Authorization: Bearer gmcp_your_api_key' \
--header 'content-type: application/json' \
--data '
{
"log_retention_days": 60,
"analytics_retention_days": 180,
"enable_email_alerts": true,
"notification_email": "[email protected]",
"usage_alert_threshold": 500
}
'
import requests
response = requests.patch(
"https://yoursite.com/wp-json/getmcp/v1/settings",
headers={
"Authorization": "Bearer gmcp_your_api_key",
"Content-Type": "application/json"
},
json={
"log_retention_days": 60,
"analytics_retention_days": 180,
"enable_email_alerts": True,
"notification_email": "[email protected]",
"usage_alert_threshold": 500
}
)
print(response.json())
const response = await fetch(
"https://yoursite.com/wp-json/getmcp/v1/settings",
{
method: "PATCH",
headers: {
"Authorization": "Bearer gmcp_your_api_key",
"Content-Type": "application/json"
},
body: JSON.stringify({
log_retention_days: 60,
analytics_retention_days: 180,
enable_email_alerts: true,
notification_email: "[email protected]",
usage_alert_threshold: 500
})
}
);
const data = await response.json();
$response = wp_remote_request(
"https://yoursite.com/wp-json/getmcp/v1/settings",
[
"method" => "PATCH",
"headers" => [
"Authorization" => "Bearer gmcp_your_api_key",
"Content-Type" => "application/json"
],
"body" => json_encode([
"log_retention_days" => 60,
"analytics_retention_days" => 180,
"enable_email_alerts" => true,
"notification_email" => "[email protected]",
"usage_alert_threshold" => 500
])
]
);
$data = json_decode(wp_remote_retrieve_body($response), true);
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"log_retention_days": 60,
"analytics_retention_days": 180,
"enable_email_alerts": true,
"notification_email": "[email protected]",
"usage_alert_threshold": 500
}`)
req, _ := http.NewRequest("PATCH", "https://yoursite.com/wp-json/getmcp/v1/settings", body)
req.Header.Set("Authorization", "Bearer gmcp_your_api_key")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
data, _ := io.ReadAll(resp.Body)
fmt.Println(string(data))
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String json = "{\n \"log_retention_days\": 60,\n \"analytics_retention_days\": 180,\n \"enable_email_alerts\": true,\n \"notification_email\": \"[email protected]\",\n \"usage_alert_threshold\": 500\n}";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://yoursite.com/wp-json/getmcp/v1/settings"))
.header("Authorization", "Bearer gmcp_your_api_key")
.header("Content-Type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString(json))
.build();
HttpClient client = HttpClient.newHttpClient();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
require 'net/http'
require 'json'
require 'uri'
uri = URI('https://yoursite.com/wp-json/getmcp/v1/settings')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == 'https'
request = Net::HTTP::Patch.new(uri)
request['Authorization'] = 'Bearer gmcp_your_api_key'
request['Content-Type'] = 'application/json'
request.body = '{
"log_retention_days": 60,
"analytics_retention_days": 180,
"enable_email_alerts": true,
"notification_email": "[email protected]",
"usage_alert_threshold": 500
}'
response = http.request(request)
puts JSON.parse(response.body)
{
"default_rate_limit": 60,
"default_timeout": 30,
"log_retention_days": 60,
"analytics_retention_days": 180,
"log_response_data": false,
"enable_health_checks": true,
"health_check_interval": 60,
"notification_email": "[email protected]",
"enable_email_alerts": true,
"usage_alert_threshold": 500,
"keep_data_on_uninstall": false
}
Updates one or more plugin settings. Only include the fields you want to change. Returns the complete updated settings object.
Body Parameters
integer
Default rate limit (requests per minute) for new servers.
integer
Default request timeout in seconds for new tools.
integer
How many days to keep call log entries. Set to 0 for indefinite retention.
integer
How many days to keep aggregated daily analytics.
boolean
Whether to store API response bodies in call logs. Disabled by default for privacy.
boolean
Enable or disable background health checks.
integer
Health check interval in minutes.
string
Email address for alert notifications.
boolean
Enable or disable email alerts.
integer
Calls per hour threshold that triggers an alert email.
boolean
If
true, all plugin data is preserved when the plugin is deleted.curl --request PATCH \
--url https://yoursite.com/wp-json/getmcp/v1/settings \
--header 'Authorization: Bearer gmcp_your_api_key' \
--header 'content-type: application/json' \
--data '
{
"log_retention_days": 60,
"analytics_retention_days": 180,
"enable_email_alerts": true,
"notification_email": "[email protected]",
"usage_alert_threshold": 500
}
'
import requests
response = requests.patch(
"https://yoursite.com/wp-json/getmcp/v1/settings",
headers={
"Authorization": "Bearer gmcp_your_api_key",
"Content-Type": "application/json"
},
json={
"log_retention_days": 60,
"analytics_retention_days": 180,
"enable_email_alerts": True,
"notification_email": "[email protected]",
"usage_alert_threshold": 500
}
)
print(response.json())
const response = await fetch(
"https://yoursite.com/wp-json/getmcp/v1/settings",
{
method: "PATCH",
headers: {
"Authorization": "Bearer gmcp_your_api_key",
"Content-Type": "application/json"
},
body: JSON.stringify({
log_retention_days: 60,
analytics_retention_days: 180,
enable_email_alerts: true,
notification_email: "[email protected]",
usage_alert_threshold: 500
})
}
);
const data = await response.json();
$response = wp_remote_request(
"https://yoursite.com/wp-json/getmcp/v1/settings",
[
"method" => "PATCH",
"headers" => [
"Authorization" => "Bearer gmcp_your_api_key",
"Content-Type" => "application/json"
],
"body" => json_encode([
"log_retention_days" => 60,
"analytics_retention_days" => 180,
"enable_email_alerts" => true,
"notification_email" => "[email protected]",
"usage_alert_threshold" => 500
])
]
);
$data = json_decode(wp_remote_retrieve_body($response), true);
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"log_retention_days": 60,
"analytics_retention_days": 180,
"enable_email_alerts": true,
"notification_email": "[email protected]",
"usage_alert_threshold": 500
}`)
req, _ := http.NewRequest("PATCH", "https://yoursite.com/wp-json/getmcp/v1/settings", body)
req.Header.Set("Authorization", "Bearer gmcp_your_api_key")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
data, _ := io.ReadAll(resp.Body)
fmt.Println(string(data))
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String json = "{\n \"log_retention_days\": 60,\n \"analytics_retention_days\": 180,\n \"enable_email_alerts\": true,\n \"notification_email\": \"[email protected]\",\n \"usage_alert_threshold\": 500\n}";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://yoursite.com/wp-json/getmcp/v1/settings"))
.header("Authorization", "Bearer gmcp_your_api_key")
.header("Content-Type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString(json))
.build();
HttpClient client = HttpClient.newHttpClient();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
require 'net/http'
require 'json'
require 'uri'
uri = URI('https://yoursite.com/wp-json/getmcp/v1/settings')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == 'https'
request = Net::HTTP::Patch.new(uri)
request['Authorization'] = 'Bearer gmcp_your_api_key'
request['Content-Type'] = 'application/json'
request.body = '{
"log_retention_days": 60,
"analytics_retention_days": 180,
"enable_email_alerts": true,
"notification_email": "[email protected]",
"usage_alert_threshold": 500
}'
response = http.request(request)
puts JSON.parse(response.body)
{
"default_rate_limit": 60,
"default_timeout": 30,
"log_retention_days": 60,
"analytics_retention_days": 180,
"log_response_data": false,
"enable_health_checks": true,
"health_check_interval": 60,
"notification_email": "[email protected]",
"enable_email_alerts": true,
"usage_alert_threshold": 500,
"keep_data_on_uninstall": false
}
⌘I

