Save the organization's OAuth app for an issuer
curl --request PUT \
--url https://api.runaether.dev/orgs/{orgID}/mcp-oauth-apps \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"client_id": "<string>",
"client_secret": "<string>"
}
'import requests
url = "https://api.runaether.dev/orgs/{orgID}/mcp-oauth-apps"
payload = {
"client_id": "<string>",
"client_secret": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({client_id: '<string>', client_secret: '<string>'})
};
fetch('https://api.runaether.dev/orgs/{orgID}/mcp-oauth-apps', 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.runaether.dev/orgs/{orgID}/mcp-oauth-apps",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'client_id' => '<string>',
'client_secret' => '<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.runaether.dev/orgs/{orgID}/mcp-oauth-apps"
payload := strings.NewReader("{\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.runaether.dev/orgs/{orgID}/mcp-oauth-apps")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runaether.dev/orgs/{orgID}/mcp-oauth-apps")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"client_id": "<string>",
"issuer": "<string>",
"token_endpoint_auth_method": "client_secret_basic",
"updated_at": "2023-11-07T05:31:56Z"
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}MCP Servers
Save the organization's OAuth app for an issuer
Saves the client id and secret of the OAuth app the organization registered at an issuer's authorization server, and returns the app.
Use this tool when you need to:
- Let the organization connect a server whose probe or connection said oauth_app_required
- Rotate the secret of the organization's app, or replace the app with another client
Examples:
- PUT /orgs/{orgID}/mcp-oauth-apps?issuer=https://auth.acme.dev {"client_id": "aether-acme", "client_secret": "Zx8vQ2mN7pL4"}
Hints:
- issuer is required, at most 2048 bytes: the issuer the probe's oauth_app_required result names. client_id (1 to 512 characters) and client_secret (1 to 1024) are required, outside those bounds the schema refuses with a plain 422; within them, either holding anything but printable ASCII without spaces is 422 mcp_oauth_app_invalid.
- Re-entering the secret with the app's client id rotates it, and the connections made with the app stay; another client id replaces the app, and every connection made with the replaced one needs its owner to connect again (needs_reauth, revoked).
- The issuer's metadata is read first: the app is stored for the issuer it names, and Aether sends the secret to its token endpoint by client_secret_basic (when token_endpoint_auth_methods_supported lists it or nothing) or client_secret_post, refused with 422 mcp_oauth_app_auth_method_unsupported when it allows neither.
- Every server of the issuer in the organization then connects with the app, members' own connections and the organization's alike, unless the issuer offers Aether a client ID metadata document or dynamic client registration. The secret is encrypted and never returned.
- Use getMcpOAuthRedirectURI instead to read the redirect URI to register at the authorization server before saving the app, and probeMcpServer to learn a server's issuer.
- Org admins only: owners and admins of the organization in the path; a member, viewer or billing member is refused with 403 org_role_insufficient and a non-member with 403 org_membership_required.
- Refused with 422 mcp_oauth_app_issuer_invalid for an issuer that is not an https URL with a host and no credentials, query or fragment, and 422 mcp_server_auth_discovery_failed when the issuer's metadata cannot be read.
- An agent host's grant is refused with 403 agent_host_route_not_allowed.
PUT
/
orgs
/
{orgID}
/
mcp-oauth-apps
Save the organization's OAuth app for an issuer
curl --request PUT \
--url https://api.runaether.dev/orgs/{orgID}/mcp-oauth-apps \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"client_id": "<string>",
"client_secret": "<string>"
}
'import requests
url = "https://api.runaether.dev/orgs/{orgID}/mcp-oauth-apps"
payload = {
"client_id": "<string>",
"client_secret": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({client_id: '<string>', client_secret: '<string>'})
};
fetch('https://api.runaether.dev/orgs/{orgID}/mcp-oauth-apps', 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.runaether.dev/orgs/{orgID}/mcp-oauth-apps",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'client_id' => '<string>',
'client_secret' => '<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.runaether.dev/orgs/{orgID}/mcp-oauth-apps"
payload := strings.NewReader("{\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.runaether.dev/orgs/{orgID}/mcp-oauth-apps")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runaether.dev/orgs/{orgID}/mcp-oauth-apps")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"client_id": "<string>",
"issuer": "<string>",
"token_endpoint_auth_method": "client_secret_basic",
"updated_at": "2023-11-07T05:31:56Z"
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}Authorizations
Query Parameters
Body
application/json
Response
OK