Auth0 Forms MCP Custom Extension

Auth0 Forms MCP Custom Extension

Exposes an Auth0 Form as an MCP server, enabling AI models to interact with the form via natural language. It uses a stateless HTTP MCP transport with Auth0 authentication.

Category
访问服务器

README

Auth0 Forms MCP Custom Extension

This repository packages the MCP server from auth0-agent-components/examples/poc-server in the same format as Auth0's Delegated Administration Extension. The package exposes one Auth0 Form as an MCP App at the deployed extension URL plus /mcp.

What is in the package

  • package.json contains the auth0-extension manifest that the Custom Extension importer reads.
  • webtask.json selects the Node 22 Webtask runtime used by the extension deployment.
  • src/webtask.ts is the Webtask handler expected by the extension runtime.
  • src/app.ts adapts the POC server to a stateless Streamable HTTP MCP transport.
  • dist/package.zip, created by npm run build, is the file to import into the Custom Extension workflow.
  • index.js and build/bundle.js support the legacy repository loader that fetches those paths from the master branch.

Configure the extension

During import, set these settings:

Setting Required Purpose
AUTH0_TENANT_ORIGIN No Optional canonical tenant issuer override; defaults to the tenant supplied by the extension runtime.
FORM_ID Yes The Auth0 Form ID to expose.
AUTH0_FORMS_TRUST_SECRET Session forms Shared secret for the Forms session JWT.
FORM_SESSION_FIELD Session forms Hidden Form field receiving the session JWT, normally session_token.
AUTH0_AUDIENCE External endpoint only Optional audience override for an OAuth proxy or custom endpoint.
PUBLIC_BASE_URL OAuth proxy Public proxy origin, without a trailing slash.
FORMS_ORIGIN No Custom domain that hosts the Forms bundle.
MCP_AUTH No Leave on in production. Set off only for no-session local development.

FORM_DESCRIPTION and FORM_NAME control the model-facing tool description and tool name.

Provision the tenant API

The extension requests an extension-owned Management API client with only read:resource_servers and create:resource_servers. It reads the tenant domain from the runtime and creates or reuses an Auth0 API whose identifier is the exact installed MCP URL.

  1. Perform a full Custom Extension update or reinstall after importing version 0.3.0 so Auth0 creates the managed client and grants its declared scopes.
  2. Open the extension landing page and select Sign in and provision.
  3. Complete the tenant-admin login. The landing page creates or reuses the required API audience, then shows its status.
  4. Connect the MCP client to the displayed MCP endpoint.

Provisioning is available only through the Dashboard-admin login flow. Public MCP, health, and discovery routes never modify tenant configuration. AUTH0_CLIENT_ID, AUTH0_CLIENT_SECRET, AUTH0_DOMAIN, and EXTENSION_SECRET are runtime-managed values; do not add them to extension settings or log them.

Build an importable package

The local @auth0/agent-components dependency points to the sibling source repository because it is not available from the configured npm registry. Keep these two directories adjacent while building:

/Users/adeel.mustafa/
  auth0-agent-components/
  auth0-mcp-custom-extension/

Then run:

npm install
npm run build

The importer artifact is dist/package.zip. It contains the bundled extension.js and a runtime-only package.json; neither references the sibling checkout once imported.

The repository also publishes a master branch because the legacy Custom Extension loader fetches index.js and build/bundle.js from that branch. Do not remove the generated build/bundle.js file.

Import and connect

  1. Import dist/package.zip into the same Custom Extension workflow that accepts the Delegated Administration Extension package format.
  2. Enter the configuration values above.
  3. Open the installed extension and complete Sign in and provision once.
  4. Register the displayed MCP URL in an MCP client. The extension advertises its protected-resource metadata at /.well-known/oauth-protected-resource.

The extension uses a stateless MCP transport because Webtask-style extension runtimes do not guarantee that the same process handles successive requests. It does not support server-initiated notifications or resumable SSE sessions.

OAuth discovery companion

Webtask routes are scoped under the extension name, so the platform cannot serve the host-root OAuth protected-resource metadata URL. Use the companion Custom Extension at https://github.com/mustafadeel/auth0-ext-wellknown; it stays in the same Auth0 tenant and does not require an external proxy.

  1. Import auth0-ext-wellknown into the same tenant as a second Custom Extension. Keep its name as .well-known and useHashName as false.
  2. Set MCP_RESOURCE_URL to the displayed MCP URL, AUTH0_TENANT_ORIGIN to the canonical tenant issuer, and optionally set RESOURCE_NAME.
  3. Connect the client to the MCP URL from this extension, never the companion extension URL.

For an intentionally external proxy or custom domain, set PUBLIC_BASE_URL and AUTH0_AUDIENCE to the proxy's exact /mcp URL before provisioning.

Local development

Copy .env.example to .env.local, configure it, then run:

npm run dev

Connect the MCP Inspector to http://localhost:3000/mcp.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选