Auth0 Who Am I MCP Template
Fork this public template to create an Auth0 Custom Extension that exposes an authenticated Streamable HTTP MCP server. Its whoami tool returns safe claims for the current Auth0 user.
The template targets Node 22, derives the tenant issuer and installed MCP URL at runtime, and creates or reuses the Auth0 API resource server from a tenant-admin setup flow. It does not ask users to enter tenant or direct MCP URLs in extension settings.
Fork and customize
- Fork this repository and keep the fork public.
- Update
webtask.jsonandpackage.jsonwith your title, extension name, author, repository URL, and version. - Replace or add tools in
src/app.ts. Keep the bearer-token verification and protected setup route intact. - Run
npm installandnpm testwith your organization's managed npm authentication. - Commit generated
index.js,build/bundle.js,dist/extension.js, anddist/package.zip. - Push the same release to both
mainandmaster. The legacy Custom Extension importer fetches generated loader files frommaster.
Deploy to Auth0
- Perform a full Custom Extension import or update from this public repository. Do not use a code-only redeploy when the manifest changes.
- Open the installed extension and select Sign in and provision.
- Complete the Dashboard-admin login. The extension creates or reuses an
RS256Auth0 API resource server whose identifier is the displayed MCP URL. - Import
https://github.com/mustafadeel/auth0-ext-wellknownas a separate Custom Extension in the same tenant. Keep its name.well-knownanduseHashName: false. - Configure the companion with the MCP URL displayed by this extension and the tenant issuer displayed by setup.
- Connect Claude, Codex, or MCP Inspector to the displayed
/mcpURL and complete OAuth.
The public MCP, health, and metadata routes never change tenant configuration. Only the Dashboard-admin-protected setup route can provision the resource server.
Optional external public endpoint
The default audience is the installed Webtask URL plus /mcp. If you intentionally put an external proxy or custom domain in front of the MCP server, add an optional PUBLIC_BASE_URL setting to webtask.json and set it to the proxy origin. The resource-server identifier becomes ${PUBLIC_BASE_URL}/mcp.
Local checks
npm install
npm test
The smoke test verifies that the landing page and admin-login route are present and that unauthenticated provisioning is rejected.