curl --request POST \
--url https://api.streamkap.com/agents/mcp/tools \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"serverUrl": "",
"headers": {},
"savedConnectionId": "<string>",
"savedConnectionName": "<string>"
}
'import requests
url = "https://api.streamkap.com/agents/mcp/tools"
payload = {
"serverUrl": "",
"headers": {},
"savedConnectionId": "<string>",
"savedConnectionName": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
serverUrl: '',
headers: {},
savedConnectionId: '<string>',
savedConnectionName: '<string>'
})
};
fetch('https://api.streamkap.com/agents/mcp/tools', 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.streamkap.com/agents/mcp/tools",
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([
'serverUrl' => '',
'headers' => [
],
'savedConnectionId' => '<string>',
'savedConnectionName' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.streamkap.com/agents/mcp/tools"
payload := strings.NewReader("{\n \"serverUrl\": \"\",\n \"headers\": {},\n \"savedConnectionId\": \"<string>\",\n \"savedConnectionName\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.streamkap.com/agents/mcp/tools")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"serverUrl\": \"\",\n \"headers\": {},\n \"savedConnectionId\": \"<string>\",\n \"savedConnectionName\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.streamkap.com/agents/mcp/tools")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"serverUrl\": \"\",\n \"headers\": {},\n \"savedConnectionId\": \"<string>\",\n \"savedConnectionName\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Discover Mcp Tools
Discover available tools from an MCP server.
Three callable shapes - see DiscoverMcpToolsRequest docs for full details:
- Saved-id:
{savedConnectionId}-> BE reads the stored row and composes headers server-side; the browser never sees the token.savedConnectionNameis accepted as a deprecated alias for one release cycle. - Inline with masked secret:
{serverUrl, headers: {...: "********"}}-> BE matches the serverUrl against saved settings and substitutes the stored secret for every masked header value. - Inline plaintext:
{serverUrl, headers}- used on first-save “Test” click before the row exists.
URL is validated (SSRF guard) on every path. Per-tenant rate limit:
30 req/min -> 429 with Retry-After. A 300s in-process cache (M10)
keyed by (serverUrl, headers-hash) short-circuits repeat calls;
X-MCP-Cache: hit|miss is emitted on every response. Cache hits
still consume rate-limit budget - the cache is not a bypass.
curl --request POST \
--url https://api.streamkap.com/agents/mcp/tools \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"serverUrl": "",
"headers": {},
"savedConnectionId": "<string>",
"savedConnectionName": "<string>"
}
'import requests
url = "https://api.streamkap.com/agents/mcp/tools"
payload = {
"serverUrl": "",
"headers": {},
"savedConnectionId": "<string>",
"savedConnectionName": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
serverUrl: '',
headers: {},
savedConnectionId: '<string>',
savedConnectionName: '<string>'
})
};
fetch('https://api.streamkap.com/agents/mcp/tools', 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.streamkap.com/agents/mcp/tools",
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([
'serverUrl' => '',
'headers' => [
],
'savedConnectionId' => '<string>',
'savedConnectionName' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.streamkap.com/agents/mcp/tools"
payload := strings.NewReader("{\n \"serverUrl\": \"\",\n \"headers\": {},\n \"savedConnectionId\": \"<string>\",\n \"savedConnectionName\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.streamkap.com/agents/mcp/tools")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"serverUrl\": \"\",\n \"headers\": {},\n \"savedConnectionId\": \"<string>\",\n \"savedConnectionName\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.streamkap.com/agents/mcp/tools")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"serverUrl\": \"\",\n \"headers\": {},\n \"savedConnectionId\": \"<string>\",\n \"savedConnectionName\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Request body for POST /agents/mcp/tools.
Two callable shapes:
- Inline - the caller sends
{serverUrl, headers}directly. Used for the "Test" button on a new connection form before the row has been saved. If any header value isMASK_SENTINEL, the BE substitutes the stored secret for that row (matched byserverUrl) server-side so the decrypted value never reaches the browser. - By saved-id - the caller sends
savedConnectionIdand the BE reads the stored row fromagent_connectionsand composes headers viamcp_header_resolver. Used when the tenant triggers a re-discover against an existing saved connection - the browser doesn't need to hold the token at all. For MCP connections (which are keyed bynamein storage), the value sent assavedConnectionIdis the connection's stablename.
savedConnectionName is accepted as a deprecated alias for one
release cycle so an in-flight FE that hasn't shipped the rename yet
keeps working. New callers should send savedConnectionId.
2048Show child attributes
Show child attributes
If set, BE resolves serverUrl + headers from the tenant's saved connection by id
100Deprecated - prefer savedConnectionId. Accepted for backward compatibility for one release cycle.
100Response
Successful Response
The response is of type Response Discovermcptools · object.
Was this page helpful?