# Authorization server metadata

Source: https://docs.musicnerd.net/api-reference/oauth/authorization-server

Authorization server metadata

## GET /.well-known/oauth-authorization-server/api/oauth

Full OpenAPI specification: https://docs.musicnerd.net/spec/oauth.json

## Authentication

This operation's specification permits a request without authentication.

[Authentication guide](https://docs.musicnerd.net/authentication)

## Operation and referenced schemas

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Music Nerd API: OAuth",
    "version": "1.0.0",
    "description": "How agents connect to the MCP server with OAuth: the discovery documents an MCP client reads, and the member's list of connected agents."
  },
  "servers": [
    {
      "url": "https://api.musicnerd.net",
      "description": "Production"
    },
    {
      "url": "https://musicnerd-api-staging.vercel.app",
      "description": "Staging (staging database)"
    }
  ],
  "paths": {
    "/.well-known/oauth-authorization-server/api/oauth": {
      "get": {
        "summary": "Authorization server metadata",
        "operationId": "getAuthorizationServerMetadata",
        "security": [],
        "description": "The OAuth authorization server metadata (RFC 8414) for `https://api.musicnerd.net/api/oauth`. Clients register, then use the authorization code flow with PKCE; access tokens last five minutes and refresh tokens rotate on every use. Signing in opens a Music Nerd page where the user approves the agent.",
        "responses": {
          "200": {
            "description": "The metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthorizationServerMetadata"
                },
                "example": {
                  "issuer": "https://api.musicnerd.net/api/oauth",
                  "authorization_endpoint": "https://api.musicnerd.net/api/oauth/auth",
                  "token_endpoint": "https://api.musicnerd.net/api/oauth/token",
                  "registration_endpoint": "https://api.musicnerd.net/api/oauth/reg",
                  "scopes_supported": [
                    "mcp:tools"
                  ],
                  "response_types_supported": [
                    "code"
                  ],
                  "grant_types_supported": [
                    "authorization_code",
                    "refresh_token"
                  ],
                  "code_challenge_methods_supported": [
                    "S256"
                  ],
                  "token_endpoint_auth_methods_supported": [
                    "none"
                  ],
                  "authorization_response_iss_parameter_supported": true
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AuthorizationServerMetadata": {
        "type": "object",
        "required": [
          "issuer",
          "authorization_endpoint",
          "token_endpoint",
          "response_types_supported"
        ],
        "additionalProperties": true,
        "properties": {
          "issuer": {
            "type": "string",
            "format": "uri"
          },
          "authorization_endpoint": {
            "type": "string",
            "format": "uri"
          },
          "token_endpoint": {
            "type": "string",
            "format": "uri"
          },
          "registration_endpoint": {
            "type": "string",
            "format": "uri"
          },
          "scopes_supported": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "response_types_supported": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "grant_types_supported": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "code_challenge_methods_supported": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "token_endpoint_auth_methods_supported": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "authorization_response_iss_parameter_supported": {
            "type": "boolean"
          }
        }
      }
    }
  }
}
```
