curl --request POST \
--url https://use.hoop.dev/api/mcp-oauth/authorize \
--header 'Content-Type: application/json' \
--data '
{
"server_url": "https://mcp.figma.com/mcp",
"client_id": "<string>",
"client_secret": "<string>",
"scopes": "openid profile"
}
'import requests
url = "https://use.hoop.dev/api/mcp-oauth/authorize"
payload = {
"server_url": "https://mcp.figma.com/mcp",
"client_id": "<string>",
"client_secret": "<string>",
"scopes": "openid profile"
}
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_url: 'https://mcp.figma.com/mcp',
client_id: '<string>',
client_secret: '<string>',
scopes: 'openid profile'
})
};
fetch('https://use.hoop.dev/api/mcp-oauth/authorize', 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://use.hoop.dev/api/mcp-oauth/authorize",
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_url' => 'https://mcp.figma.com/mcp',
'client_id' => '<string>',
'client_secret' => '<string>',
'scopes' => 'openid profile'
]),
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://use.hoop.dev/api/mcp-oauth/authorize"
payload := strings.NewReader("{\n \"server_url\": \"https://mcp.figma.com/mcp\",\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\",\n \"scopes\": \"openid profile\"\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://use.hoop.dev/api/mcp-oauth/authorize")
.header("Content-Type", "application/json")
.body("{\n \"server_url\": \"https://mcp.figma.com/mcp\",\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\",\n \"scopes\": \"openid profile\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://use.hoop.dev/api/mcp-oauth/authorize")
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_url\": \"https://mcp.figma.com/mcp\",\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\",\n \"scopes\": \"openid profile\"\n}"
response = http.request(request)
puts response.read_body{
"authorization_url": "https://www.figma.com/oauth?client_id=...&state=...",
"flow_id": "7c8a1234-5678-9abc-def0-123456789abc"
}{
"message": "the error description"
}{
"message": "the error description"
}{
"message": "the error description"
}Start the OAuth login flow for an MCP connection
Discovers the MCP server’s authorization server (RFC 9728 / RFC 8414), optionally performs Dynamic Client Registration (RFC 7591) when no client credentials are supplied, and returns the authorization URL for the admin’s browser to complete an Authorization Code + PKCE login. The browser is redirected there; the upstream provider redirects back to the gateway callback, which exchanges the code for a token. Used by the connection create page.
curl --request POST \
--url https://use.hoop.dev/api/mcp-oauth/authorize \
--header 'Content-Type: application/json' \
--data '
{
"server_url": "https://mcp.figma.com/mcp",
"client_id": "<string>",
"client_secret": "<string>",
"scopes": "openid profile"
}
'import requests
url = "https://use.hoop.dev/api/mcp-oauth/authorize"
payload = {
"server_url": "https://mcp.figma.com/mcp",
"client_id": "<string>",
"client_secret": "<string>",
"scopes": "openid profile"
}
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_url: 'https://mcp.figma.com/mcp',
client_id: '<string>',
client_secret: '<string>',
scopes: 'openid profile'
})
};
fetch('https://use.hoop.dev/api/mcp-oauth/authorize', 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://use.hoop.dev/api/mcp-oauth/authorize",
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_url' => 'https://mcp.figma.com/mcp',
'client_id' => '<string>',
'client_secret' => '<string>',
'scopes' => 'openid profile'
]),
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://use.hoop.dev/api/mcp-oauth/authorize"
payload := strings.NewReader("{\n \"server_url\": \"https://mcp.figma.com/mcp\",\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\",\n \"scopes\": \"openid profile\"\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://use.hoop.dev/api/mcp-oauth/authorize")
.header("Content-Type", "application/json")
.body("{\n \"server_url\": \"https://mcp.figma.com/mcp\",\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\",\n \"scopes\": \"openid profile\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://use.hoop.dev/api/mcp-oauth/authorize")
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_url\": \"https://mcp.figma.com/mcp\",\n \"client_id\": \"<string>\",\n \"client_secret\": \"<string>\",\n \"scopes\": \"openid profile\"\n}"
response = http.request(request)
puts response.read_body{
"authorization_url": "https://www.figma.com/oauth?client_id=...&state=...",
"flow_id": "7c8a1234-5678-9abc-def0-123456789abc"
}{
"message": "the error description"
}{
"message": "the error description"
}{
"message": "the error description"
}Body
MCP OAuth login request
ServerURL is the MCP endpoint to authorize against (the OAuth resource).
"https://mcp.figma.com/mcp"
ClientID is an optional pre-registered OAuth client id. When empty the gateway registers a client dynamically.
ClientSecret is an optional pre-registered OAuth client secret, paired with ClientID.
Scopes is an optional space-delimited scope string. When empty the scopes advertised by the authorization server are requested.
"openid profile"
Was this page helpful?