auth0-whoami-mcp
A minimal remote MCP server for Auth0 Custom Extensions that provides a single tool, who_am_i, returning safe identity claims from the authenticated Auth0 access token without exposing sensitive credentials.
README
Auth0 Who Am I MCP
A minimal, remote MCP server for an Auth0 Custom Extension. Its single tool,
who_am_i, returns the safe identity claims from the Auth0 access token that
authenticated the current MCP request.
The server never returns or logs an access token, authorization header, client secret, or extension secret.
What the tool returns
who_am_i has no inputs and returns a JSON object like:
{
"subject": "auth0|user-123",
"name": "Ada Lovelace",
"email": "ada@example.com",
"email_verified": true,
"client_id": "client-123",
"scopes": ["use:mcp"],
"permissions": []
}
subject is the reliable identifier. name, email, and email_verified
are null unless those standard claims are included in the access token.
Build
Use Node 22 or newer. The Custom Extension runtime is explicitly Node 22.
npm install
npm run build
Keep both index.js and build/bundle.js in the repository: the legacy
Custom Extension importer fetches generated loader artifacts directly.
Import and configure the Custom Extension
Import or update the extension using webtask.json. It declares the required
top-level "runtime": "node22"; if you change the manifest, increment its
version and perform a full extension update/reinstall so the dashboard refreshes
the settings schema.
Set these extension settings:
| Setting | Value |
|---|---|
AUTH0_TENANT_ORIGIN |
Your canonical tenant issuer, for example https://tenant.us.auth0.com. |
MCP_PUBLIC_URL |
The exact deployed HTTPS endpoint ending in /mcp, for example https://tenant-region.webtask.run/auth0-whoami-mcp/mcp. |
MCP_RESOURCE_METADATA_URL |
Optional. A reachable protected-resource metadata URL; omit it to use the extension-scoped default. |
The server validates a token with all of these constraints:
- Auth0 signature from
AUTH0_TENANT_ORIGIN/.well-known/jwks.json issequal toAUTH0_TENANT_ORIGIN/audequal to the exactMCP_PUBLIC_URL- JWT expiration and not-before timestamps
For this deliberately simple extension, create the corresponding Auth0 API in
the Dashboard before connecting a client. Its identifier/audience must be
exactly MCP_PUBLIC_URL, and it should use RS256 signing. Authorize the client
and user to request that audience. This project does not create a privileged
Management API client or expose a public provisioning route.
OAuth protected-resource discovery
The extension serves this fallback metadata endpoint:
https://tenant-region.webtask.run/auth0-whoami-mcp/.well-known/oauth-protected-resource/mcp
Unauthenticated MCP requests return 401 with a WWW-Authenticate: Bearer
challenge that points to it. Some clients first request host-root metadata such
as:
https://tenant-region.webtask.run/.well-known/oauth-protected-resource/auth0-whoami-mcp/mcp
Namespaced Custom Extensions cannot normally serve that host-root route. For
those clients, import auth0-ext-wellknown
as a separate Custom Extension in the same tenant, keeping its name as
.well-known and useHashName as false. Configure its MCP_RESOURCE_URL
with the exact MCP_PUBLIC_URL above and its AUTH0_TENANT_ORIGIN with the
same tenant origin. Configure MCP clients with the actual /mcp URL, never
the companion extension URL.
Validate after deployment
GET /healthreturns200and a Nodev22...runtime value.- Fetch the protected-resource metadata and confirm its
resourceis exactlyMCP_PUBLIC_URLand its authorization server is the Auth0 issuer. - Send an unauthenticated
POST /mcpand confirm401plus aWWW-Authenticatechallenge. - Add the complete HTTPS
/mcpURL to an OAuth-capable MCP client such as Codex, Claude, or MCP Inspector. Let it complete OAuth; do not combine the OAuth flow with a manually pastedAuthorizationheader. - Run
initialize, then invokewho_am_i.
Local verification
npm test
The tests cover configuration, OAuth discovery/challenge behavior, Auth0 JWT signature/issuer/audience verification, and a Streamable HTTP MCP tool call.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。