Create MCP server
curl --request POST \
--url 'https://api.flashcat.cloud/safari/mcp/server/create?app_key=' \
--header 'Content-Type: application/json' \
--data '
{
"server_name": "prometheus",
"description": "Query Prometheus metrics and alerts.",
"transport": "streamable-http",
"url": "https://mcp.example.com/prometheus",
"headers": {
"Authorization": "Bearer example-token-f2c1"
},
"status": "enabled"
}
'import requests
url = "https://api.flashcat.cloud/safari/mcp/server/create?app_key="
payload = {
"server_name": "prometheus",
"description": "Query Prometheus metrics and alerts.",
"transport": "streamable-http",
"url": "https://mcp.example.com/prometheus",
"headers": { "Authorization": "Bearer example-token-f2c1" },
"status": "enabled"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
server_name: 'prometheus',
description: 'Query Prometheus metrics and alerts.',
transport: 'streamable-http',
url: 'https://mcp.example.com/prometheus',
headers: {Authorization: 'Bearer example-token-f2c1'},
status: 'enabled'
})
};
fetch('https://api.flashcat.cloud/safari/mcp/server/create?app_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.flashcat.cloud/safari/mcp/server/create?app_key=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'server_name' => 'prometheus',
'description' => 'Query Prometheus metrics and alerts.',
'transport' => 'streamable-http',
'url' => 'https://mcp.example.com/prometheus',
'headers' => [
'Authorization' => 'Bearer example-token-f2c1'
],
'status' => 'enabled'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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.flashcat.cloud/safari/mcp/server/create?app_key="
payload := strings.NewReader("{\n \"server_name\": \"prometheus\",\n \"description\": \"Query Prometheus metrics and alerts.\",\n \"transport\": \"streamable-http\",\n \"url\": \"https://mcp.example.com/prometheus\",\n \"headers\": {\n \"Authorization\": \"Bearer example-token-f2c1\"\n },\n \"status\": \"enabled\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://api.flashcat.cloud/safari/mcp/server/create?app_key=")
.header("Content-Type", "application/json")
.body("{\n \"server_name\": \"prometheus\",\n \"description\": \"Query Prometheus metrics and alerts.\",\n \"transport\": \"streamable-http\",\n \"url\": \"https://mcp.example.com/prometheus\",\n \"headers\": {\n \"Authorization\": \"Bearer example-token-f2c1\"\n },\n \"status\": \"enabled\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flashcat.cloud/safari/mcp/server/create?app_key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"server_name\": \"prometheus\",\n \"description\": \"Query Prometheus metrics and alerts.\",\n \"transport\": \"streamable-http\",\n \"url\": \"https://mcp.example.com/prometheus\",\n \"headers\": {\n \"Authorization\": \"Bearer example-token-f2c1\"\n },\n \"status\": \"enabled\"\n}"
response = http.request(request)
puts response.read_body{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"data": {
"server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1",
"account_id": 10023,
"team_id": 0,
"can_edit": true,
"environments": [],
"server_name": "prometheus",
"description": "Query Prometheus metrics and alerts.",
"transport": "streamable-http",
"url": "https://mcp.example.com/prometheus",
"headers": {
"Authorization": "Bear****f2c1"
},
"status": "enabled",
"connect_timeout": 0,
"call_timeout": 0,
"auth_mode": "shared",
"created_by": 80011,
"created_at": 1716960000000,
"updated_at": 1716960000000
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "InvalidParameter",
"message": "The specified parameter skill_id is not valid."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "Unauthorized",
"message": "You are unauthorized."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "AccessDenied",
"message": "Access Denied."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "RequestTooFrequently",
"message": "Request too frequently."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "InternalError",
"message": "We encountered an internal error, and it has been reported. Please try again later."
}
}MCP servers
Create MCP server
Register a new MCP server (connector) on the account.
POST
/
safari
/
mcp
/
server
/
create
Create MCP server
curl --request POST \
--url 'https://api.flashcat.cloud/safari/mcp/server/create?app_key=' \
--header 'Content-Type: application/json' \
--data '
{
"server_name": "prometheus",
"description": "Query Prometheus metrics and alerts.",
"transport": "streamable-http",
"url": "https://mcp.example.com/prometheus",
"headers": {
"Authorization": "Bearer example-token-f2c1"
},
"status": "enabled"
}
'import requests
url = "https://api.flashcat.cloud/safari/mcp/server/create?app_key="
payload = {
"server_name": "prometheus",
"description": "Query Prometheus metrics and alerts.",
"transport": "streamable-http",
"url": "https://mcp.example.com/prometheus",
"headers": { "Authorization": "Bearer example-token-f2c1" },
"status": "enabled"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
server_name: 'prometheus',
description: 'Query Prometheus metrics and alerts.',
transport: 'streamable-http',
url: 'https://mcp.example.com/prometheus',
headers: {Authorization: 'Bearer example-token-f2c1'},
status: 'enabled'
})
};
fetch('https://api.flashcat.cloud/safari/mcp/server/create?app_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.flashcat.cloud/safari/mcp/server/create?app_key=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'server_name' => 'prometheus',
'description' => 'Query Prometheus metrics and alerts.',
'transport' => 'streamable-http',
'url' => 'https://mcp.example.com/prometheus',
'headers' => [
'Authorization' => 'Bearer example-token-f2c1'
],
'status' => 'enabled'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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.flashcat.cloud/safari/mcp/server/create?app_key="
payload := strings.NewReader("{\n \"server_name\": \"prometheus\",\n \"description\": \"Query Prometheus metrics and alerts.\",\n \"transport\": \"streamable-http\",\n \"url\": \"https://mcp.example.com/prometheus\",\n \"headers\": {\n \"Authorization\": \"Bearer example-token-f2c1\"\n },\n \"status\": \"enabled\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://api.flashcat.cloud/safari/mcp/server/create?app_key=")
.header("Content-Type", "application/json")
.body("{\n \"server_name\": \"prometheus\",\n \"description\": \"Query Prometheus metrics and alerts.\",\n \"transport\": \"streamable-http\",\n \"url\": \"https://mcp.example.com/prometheus\",\n \"headers\": {\n \"Authorization\": \"Bearer example-token-f2c1\"\n },\n \"status\": \"enabled\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flashcat.cloud/safari/mcp/server/create?app_key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"server_name\": \"prometheus\",\n \"description\": \"Query Prometheus metrics and alerts.\",\n \"transport\": \"streamable-http\",\n \"url\": \"https://mcp.example.com/prometheus\",\n \"headers\": {\n \"Authorization\": \"Bearer example-token-f2c1\"\n },\n \"status\": \"enabled\"\n}"
response = http.request(request)
puts response.read_body{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"data": {
"server_id": "mcp_4kP9wQ2nLceRtY7uVb3xA1",
"account_id": 10023,
"team_id": 0,
"can_edit": true,
"environments": [],
"server_name": "prometheus",
"description": "Query Prometheus metrics and alerts.",
"transport": "streamable-http",
"url": "https://mcp.example.com/prometheus",
"headers": {
"Authorization": "Bear****f2c1"
},
"status": "enabled",
"connect_timeout": 0,
"call_timeout": 0,
"auth_mode": "shared",
"created_by": 80011,
"created_at": 1716960000000,
"updated_at": 1716960000000
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "InvalidParameter",
"message": "The specified parameter skill_id is not valid."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "Unauthorized",
"message": "You are unauthorized."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "AccessDenied",
"message": "Access Denied."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "RequestTooFrequently",
"message": "Request too frequently."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "InternalError",
"message": "We encountered an internal error, and it has been reported. Please try again later."
}
}Restrictions
| Aspect | Value |
|---|---|
| Rate limits | 300 requests/minute; 20 requests/second per account |
| Permissions | MCP Manage (ai-sre) |
Usage
command/args/envapply tostdio;url/headersapply tosse/streamable-http.server_namemust start with a letter and contain only letters, digits,-, or_, and must be unique within its scope (account-wide or one team); violations returnInvalidParameter.- Without
source_template_name, creating into a team (team_id > 0) requires the caller to belong to that team, and only the account owner or an admin may create at account scope (team_id=0). - Setting
source_template_nameinstalls a marketplace template: the template must exist (ResourceNotFoundotherwise),team_idis ignored and the server is created at account scope, and the connection fields must equal the template’s own except for its declared parameter values. Templates with per-user auth whose parameters let the installer choose the destination host can be installed only by the account owner or an admin. - Each
environmentsentry must becloudor the ID of a BYOC runner that is account-scoped or belongs to one of the caller’s teams; duplicates are dropped and an empty string is rejected. Omitted or empty means all environments. per_user_secretauth mode requiressecret_schemato be valid JSON with a non-emptyheader_name.envandheadersvalues are masked when the key name containsKEY,SECRET,TOKEN,PASSWORD,PASSWD,CREDENTIAL, orAUTHORIZATION(case-insensitive), or has aPWD/PASSsegment, or the value is encrypted at rest; such values are also encrypted at rest.- The response is the stored server. Its tool list is then fetched in the background through an already-online execution environment; the call does not wait for it.
- Every call is recorded in the account audit log.
Authorizations
Body
application/json
Configuration for a new MCP server.
Who supplies the credential:
shared(default; an empty value behaves the same): one credential stored on the server (env/headers) is used for every caller.per_user_secret: each user stores their own secret, sent in the header named bysecret_schema.header_name.per_user_oauth: each user completes their own OAuth authorization; discovery and client registration run on first use.
per_user_secret requires secret_schema with a non-empty header_name; any other value returns InvalidParameter.
Available options:
shared, per_user_secret, per_user_oauth Response
Success
Standard response envelope used by every Flashduty public API. On success data contains the endpoint-specific payload and error is absent. On failure error is present and data is absent. request_id is always present and is also mirrored in the Flashcat-Request-Id response header.
Was this page helpful?