List MCP usage records
curl --request GET \
--url https://api.example.com/api/usage/mcp \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/usage/mcp"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/usage/mcp', 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/usage/mcp",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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/usage/mcp"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/usage/mcp")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/usage/mcp")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"records": [
{
"tool_name": "generate_report",
"success": true,
"created_at": "2026-08-04T04:30:00.000Z"
},
{
"tool_name": "sync_docs",
"success": true,
"created_at": "2026-08-04T03:15:00.000Z"
}
]
}{
"error": "AUTH_INVALID_CREDENTIALS",
"message": "No admin token provided",
"statusCode": 401
}{
"error": "AUTH_UNAUTHORIZED",
"message": "Admin access required",
"statusCode": 403
}{
"error": "INTERNAL_ERROR",
"message": "Failed to get MCP usage",
"statusCode": 500
}Usage
List MCP usage records
Returns recent MCP usage rows filtered by success.
GET
/
api
/
usage
/
mcp
List MCP usage records
curl --request GET \
--url https://api.example.com/api/usage/mcp \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/usage/mcp"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/usage/mcp', 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/usage/mcp",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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/usage/mcp"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/usage/mcp")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/usage/mcp")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"records": [
{
"tool_name": "generate_report",
"success": true,
"created_at": "2026-08-04T04:30:00.000Z"
},
{
"tool_name": "sync_docs",
"success": true,
"created_at": "2026-08-04T03:15:00.000Z"
}
]
}{
"error": "AUTH_INVALID_CREDENTIALS",
"message": "No admin token provided",
"statusCode": 401
}{
"error": "AUTH_UNAUTHORIZED",
"message": "Admin access required",
"statusCode": 403
}{
"error": "INTERNAL_ERROR",
"message": "Failed to get MCP usage",
"statusCode": 500
}Authorizations
bearerAuthapiKey
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Maximum number of usage records to return.
Filter records by success state.
Response
MCP usage records
Show child attributes
Show child attributes
Was this page helpful?
⌘I