music nerd

MCP OAuthStart authorization

MCP OAuth

Start authorization

Where an MCP client sends the user's browser to connect. A valid request redirects to the Music Nerd page where the user signs in and approves the agent; an invalid one redirects back to the client with error and state.

GET/api/oauth/auth
GET/api/oauth/auth

Where an MCP client sends the user's browser to connect. A valid request redirects to the Music Nerd page where the user signs in and approves the agent; an invalid one redirects back to the client with error and state.

Query

response_typestringrequired

Always code.

client_idstringrequired

The client_id from registration.

redirect_uristringrequired

One of the client's registered redirect URIs, exactly.

code_challengestringrequired

The PKCE challenge: base64url SHA-256 of the code verifier.

code_challenge_methodstringrequired

Always S256.

statestring

Returned unchanged to the client.

scopestring

mcp:tools, the only scope. Optional.

resourcestring

https://api.musicnerd.net/mcp, if sent.

cURL
curl --request GET \
  --url 'https://musicnerd-api.vercel.app/api/oauth/auth?response_type=code&client_id=2f6c1d0e-8a4b-4c47-9a51-3e0f7b9d2c18&redirect_uri=http%3A%2F%2F127.0.0.1%3A33418%2Fcallback&code_challenge=E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM&code_challenge_method=S256&state=af0ifjsldkj&scope=mcp%3Atools&resource=https%3A%2F%2Fapi.musicnerd.net%2Fmcp'

Send the request to see the live response here.

Authorizations

None. This endpoint is public.

Query Parameters

response_typestring · enumrequired

Always code.

Values: "code"

client_idstringrequired

The client_id from registration.

redirect_uristringrequired

One of the client's registered redirect URIs, exactly.

code_challengestringrequired

The PKCE challenge: base64url SHA-256 of the code verifier.

code_challenge_methodstring · enumrequired

Always S256.

Values: "S256"

statestring

Returned unchanged to the client.

scopestring

mcp:tools, the only scope. Optional.

resourcestring

https://api.musicnerd.net/mcp, if sent.

Response

To the Music Nerd sign-in page with the same query, or back to redirect_uri with error and state when the request is invalid.

Locationresponse header

The sign-in page, or the client's redirect URI with the error.