Developer Apps
Connect your app to duun MCP
Build a private OAuth client using Authorization Code with PKCE S256. Developer Apps are public clients, so no client secret is issued or required.
Connection quick reference
Copy these values into your OAuth and MCP client configuration.
https://duun.app/mcp
https://duun.app/oauth/token
https://duun.app/.well-known/oauth-authorization-server
https://duun.app/.well-known/oauth-protected-resource
Authorization flow
Your app owns the PKCE verifier and callback handling. duun authenticates the paid app owner and asks them to approve the requested scopes.
-
1
Register the app
Create a Developer App in Settings, register every exact callback URI, and copy the public Client ID. Hosted callbacks require HTTPS; loopback development callbacks may use HTTP.
-
2
Generate PKCE and redirect to authorization
Create a high-entropy verifier, derive its SHA-256 base64url challenge, store the verifier temporarily, and send the user to:
-
3
Validate the callback
Confirm that the returned state matches the value your app stored. Authorization codes are short-lived and single-use, so exchange them immediately.
-
4
Exchange the code without a client secret
Send the original verifier and the same redirect URI used during authorization.
Token exchangecurl https://duun.app/oauth/token \ -H 'content-type: application/x-www-form-urlencoded' \ --data-urlencode 'grant_type=authorization_code' \ --data-urlencode 'client_id=YOUR_CLIENT_ID' \ --data-urlencode 'code=AUTHORIZATION_CODE' \ --data-urlencode 'redirect_uri=YOUR_EXACT_REDIRECT_URI' \ --data-urlencode 'code_verifier=YOUR_ORIGINAL_VERIFIER' -
5
Call MCP
Send the access token as a Bearer token. The granted scopes and Developer App tool policy both limit the available tools.
List available toolscurl https://duun.app/mcp \ -H 'authorization: Bearer ACCESS_TOKEN' \ -H 'content-type: application/json' \ -d '{"jsonrpc":"2.0","id":"tools","method":"tools/list"}'