Connect a customer-supplied MCP server (static creds or OAuth)
Static-cred connections are born active; OAuth returns an
authorize_url + state and the row starts pending_oauth until the
/integrations/oauth/callback redirect lands. server_url (and any
OAuth endpoint URLs) are SSRF-validated in the service layer.
curl --request POST \
--url https://api-sandbox.featherhq.com/v1/integrations/connections/custom-mcp \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"nickname": "<string>",
"server_url": "<string>",
"transport": "sse",
"auth_type": "none",
"token": "<string>",
"api_key": "<string>",
"api_key_header": "X-API-Key",
"headers": {},
"oauth_authorize_url": "<string>",
"oauth_token_url": "<string>",
"oauth_client_id": "<string>",
"oauth_client_secret": "<string>",
"oauth_scopes": [
"<string>"
]
}
'import requests
url = "https://api-sandbox.featherhq.com/v1/integrations/connections/custom-mcp"
payload = {
"nickname": "<string>",
"server_url": "<string>",
"transport": "sse",
"auth_type": "none",
"token": "<string>",
"api_key": "<string>",
"api_key_header": "X-API-Key",
"headers": {},
"oauth_authorize_url": "<string>",
"oauth_token_url": "<string>",
"oauth_client_id": "<string>",
"oauth_client_secret": "<string>",
"oauth_scopes": ["<string>"]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
nickname: '<string>',
server_url: '<string>',
transport: 'sse',
auth_type: 'none',
token: '<string>',
api_key: '<string>',
api_key_header: 'X-API-Key',
headers: {},
oauth_authorize_url: '<string>',
oauth_token_url: '<string>',
oauth_client_id: '<string>',
oauth_client_secret: '<string>',
oauth_scopes: ['<string>']
})
};
fetch('https://api-sandbox.featherhq.com/v1/integrations/connections/custom-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-sandbox.featherhq.com/v1/integrations/connections/custom-mcp",
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([
'nickname' => '<string>',
'server_url' => '<string>',
'transport' => 'sse',
'auth_type' => 'none',
'token' => '<string>',
'api_key' => '<string>',
'api_key_header' => 'X-API-Key',
'headers' => [
],
'oauth_authorize_url' => '<string>',
'oauth_token_url' => '<string>',
'oauth_client_id' => '<string>',
'oauth_client_secret' => '<string>',
'oauth_scopes' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.featherhq.com/v1/integrations/connections/custom-mcp"
payload := strings.NewReader("{\n \"nickname\": \"<string>\",\n \"server_url\": \"<string>\",\n \"transport\": \"sse\",\n \"auth_type\": \"none\",\n \"token\": \"<string>\",\n \"api_key\": \"<string>\",\n \"api_key_header\": \"X-API-Key\",\n \"headers\": {},\n \"oauth_authorize_url\": \"<string>\",\n \"oauth_token_url\": \"<string>\",\n \"oauth_client_id\": \"<string>\",\n \"oauth_client_secret\": \"<string>\",\n \"oauth_scopes\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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-sandbox.featherhq.com/v1/integrations/connections/custom-mcp")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"nickname\": \"<string>\",\n \"server_url\": \"<string>\",\n \"transport\": \"sse\",\n \"auth_type\": \"none\",\n \"token\": \"<string>\",\n \"api_key\": \"<string>\",\n \"api_key_header\": \"X-API-Key\",\n \"headers\": {},\n \"oauth_authorize_url\": \"<string>\",\n \"oauth_token_url\": \"<string>\",\n \"oauth_client_id\": \"<string>\",\n \"oauth_client_secret\": \"<string>\",\n \"oauth_scopes\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.featherhq.com/v1/integrations/connections/custom-mcp")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"nickname\": \"<string>\",\n \"server_url\": \"<string>\",\n \"transport\": \"sse\",\n \"auth_type\": \"none\",\n \"token\": \"<string>\",\n \"api_key\": \"<string>\",\n \"api_key_header\": \"X-API-Key\",\n \"headers\": {},\n \"oauth_authorize_url\": \"<string>\",\n \"oauth_token_url\": \"<string>\",\n \"oauth_client_id\": \"<string>\",\n \"oauth_client_secret\": \"<string>\",\n \"oauth_scopes\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"vendor": "<string>",
"authorize_url": "<string>",
"state": "<string>"
}{
"error": "<string>",
"message": "<string>",
"retryable": true,
"retry_after": 123
}{
"error": "<string>",
"message": "<string>",
"retryable": true,
"retry_after": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Body
Body for POST /v1/integrations/connections/custom-mcp.
One shape for all four auth types. none/bearer/api_key are the
static-credential paths (Step 6 — the row is born active); oauth is
the authorization-code path (Step 7 — the row starts pending_oauth and
the response carries authorize_url + state). The OAuth endpoint URLs
are optional because :func:discover_mcp_oauth fills them in when the server
advertises RFC 9728 metadata; customer-supplied values override discovery.
Show child attributes
Show child attributes
Response
Successful Response
Returned by POST /v1/integrations/connections/custom-mcp.
authorize_url + state are populated only for the oauth path so
the frontend can redirect the user to the provider; the static paths return
status="active" with both None.
Was this page helpful?
curl --request POST \
--url https://api-sandbox.featherhq.com/v1/integrations/connections/custom-mcp \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"nickname": "<string>",
"server_url": "<string>",
"transport": "sse",
"auth_type": "none",
"token": "<string>",
"api_key": "<string>",
"api_key_header": "X-API-Key",
"headers": {},
"oauth_authorize_url": "<string>",
"oauth_token_url": "<string>",
"oauth_client_id": "<string>",
"oauth_client_secret": "<string>",
"oauth_scopes": [
"<string>"
]
}
'import requests
url = "https://api-sandbox.featherhq.com/v1/integrations/connections/custom-mcp"
payload = {
"nickname": "<string>",
"server_url": "<string>",
"transport": "sse",
"auth_type": "none",
"token": "<string>",
"api_key": "<string>",
"api_key_header": "X-API-Key",
"headers": {},
"oauth_authorize_url": "<string>",
"oauth_token_url": "<string>",
"oauth_client_id": "<string>",
"oauth_client_secret": "<string>",
"oauth_scopes": ["<string>"]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
nickname: '<string>',
server_url: '<string>',
transport: 'sse',
auth_type: 'none',
token: '<string>',
api_key: '<string>',
api_key_header: 'X-API-Key',
headers: {},
oauth_authorize_url: '<string>',
oauth_token_url: '<string>',
oauth_client_id: '<string>',
oauth_client_secret: '<string>',
oauth_scopes: ['<string>']
})
};
fetch('https://api-sandbox.featherhq.com/v1/integrations/connections/custom-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-sandbox.featherhq.com/v1/integrations/connections/custom-mcp",
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([
'nickname' => '<string>',
'server_url' => '<string>',
'transport' => 'sse',
'auth_type' => 'none',
'token' => '<string>',
'api_key' => '<string>',
'api_key_header' => 'X-API-Key',
'headers' => [
],
'oauth_authorize_url' => '<string>',
'oauth_token_url' => '<string>',
'oauth_client_id' => '<string>',
'oauth_client_secret' => '<string>',
'oauth_scopes' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.featherhq.com/v1/integrations/connections/custom-mcp"
payload := strings.NewReader("{\n \"nickname\": \"<string>\",\n \"server_url\": \"<string>\",\n \"transport\": \"sse\",\n \"auth_type\": \"none\",\n \"token\": \"<string>\",\n \"api_key\": \"<string>\",\n \"api_key_header\": \"X-API-Key\",\n \"headers\": {},\n \"oauth_authorize_url\": \"<string>\",\n \"oauth_token_url\": \"<string>\",\n \"oauth_client_id\": \"<string>\",\n \"oauth_client_secret\": \"<string>\",\n \"oauth_scopes\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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-sandbox.featherhq.com/v1/integrations/connections/custom-mcp")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"nickname\": \"<string>\",\n \"server_url\": \"<string>\",\n \"transport\": \"sse\",\n \"auth_type\": \"none\",\n \"token\": \"<string>\",\n \"api_key\": \"<string>\",\n \"api_key_header\": \"X-API-Key\",\n \"headers\": {},\n \"oauth_authorize_url\": \"<string>\",\n \"oauth_token_url\": \"<string>\",\n \"oauth_client_id\": \"<string>\",\n \"oauth_client_secret\": \"<string>\",\n \"oauth_scopes\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.featherhq.com/v1/integrations/connections/custom-mcp")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"nickname\": \"<string>\",\n \"server_url\": \"<string>\",\n \"transport\": \"sse\",\n \"auth_type\": \"none\",\n \"token\": \"<string>\",\n \"api_key\": \"<string>\",\n \"api_key_header\": \"X-API-Key\",\n \"headers\": {},\n \"oauth_authorize_url\": \"<string>\",\n \"oauth_token_url\": \"<string>\",\n \"oauth_client_id\": \"<string>\",\n \"oauth_client_secret\": \"<string>\",\n \"oauth_scopes\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"connection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"vendor": "<string>",
"authorize_url": "<string>",
"state": "<string>"
}{
"error": "<string>",
"message": "<string>",
"retryable": true,
"retry_after": 123
}{
"error": "<string>",
"message": "<string>",
"retryable": true,
"retry_after": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}