music nerd

MCP OAuthApprove or deny an agent

MCP OAuth

Approve or deny an agent

Records the signed-in user's decision on an authorization request and returns where to send the browser. Approving connects the agent and adds a single-use code, valid for 60 seconds; denying adds error=access_denied.

POST/api/oauth/consent
POST/api/oauth/consent

Records the signed-in user's decision on an authorization request and returns where to send the browser. Approving connects the agent and adds a single-use code, valid for 60 seconds; denying adds error=access_denied.

Authorization

Authorizationstringrequired

A Privy access token for a signed-in Music Nerd user, as musicnerd.net holds it. Kept in this tab only.

Body
cURL
curl --request POST \
  --url 'https://musicnerd-api.vercel.app/api/oauth/consent' \
  --header 'Content-Type: application/json' \
  --data '{
  "response_type": "code",
  "client_id": "2f6c1d0e-8a4b-4c47-9a51-3e0f7b9d2c18",
  "redirect_uri": "http://127.0.0.1:33418/callback",
  "code_challenge": "E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM",
  "code_challenge_method": "S256",
  "state": "af0ifjsldkj",
  "decision": "approve"
}'

Send the request to see the live response here.

Authorizations

Authorizationstringheaderrequired

Bearer authentication header of the form Bearer <token>. A Privy access token for a signed-in Music Nerd user, as musicnerd.net holds it.

Body

application/jsonrequired
response_typestring · enumrequired

Values: "code"

client_idstringrequired
redirect_uristringrequired
code_challengestringrequired
code_challenge_methodstring · enumrequired

Values: "S256"

statestring
scopestring
resourcestring
decisionstring · enumrequired

Values: "approve", "deny"

Response

application/json

Where to send the browser: the client's redirect URI with code, state and iss, or with error=access_denied and state.

statusstring · enumrequired

Values: "ok"

redirectUrlstringrequired

format: uri