# auth0/auth0-mcp-server architecture

> Architecture diagram of the GitHub repository auth0/auth0-mcp-server, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/auth0/auth0-mcp-server
- Repository: https://github.com/auth0/auth0-mcp-server

## Overview

This is the Auth0 MCP Server: AI clients invoke MCP tools to manage an Auth0 tenant. The principal flow is client setup and device authorization, followed by launching the server, selecting and dispatching tools, and performing tenant operations. A guided onboarding branch creates an application, writes project credentials, and supplies framework-specific quickstart guidance. The graph includes the documented management capabilities; several tool modules were not sampled, so their internal call details are not inferred.

Main entry points: [`src/tools/index.ts`](https://github.com/auth0/auth0-mcp-server/blob/main/src/tools/index.ts) (Tool registry), [`src/server.ts`](https://github.com/auth0/auth0-mcp-server/blob/main/src/server.ts) (MCP server), [`src/tools/onboarding.ts`](https://github.com/auth0/auth0-mcp-server/blob/main/src/tools/onboarding.ts) (Onboarding tools), [`src/tools/quickstarts.ts`](https://github.com/auth0/auth0-mcp-server/blob/main/src/tools/quickstarts.ts) (Quickstart tools)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_setup["Setup and authentication"]
  node_init["Init command<br/>[init.ts]"]
  node_device_auth["Device authorization"]
  node_keychain[("Credential keychain<br/>[keychain.ts]")]
  node_client_config["MCP client configuration<br/>[base.ts]"]
  node_client_adapters["Client adapters"]
end

subgraph group_runtime["MCP runtime"]
  node_run["Run command<br/>[run.ts]"]
  node_server["MCP server<br/>[server.ts]"]
  node_tool_filter["Tool selection<br/>[tools.ts]"]
  node_tool_registry["Tool registry<br/>[index.ts]"]
  node_config["Auth configuration<br/>[config.ts]"]
end

subgraph group_management["Tenant management"]
  node_applications["Applications<br/>[applications.ts]"]
  node_actions["Actions<br/>[actions.ts]"]
  node_forms["Forms<br/>[forms.ts]"]
  node_logs["Logs<br/>[logs.ts]"]
  node_resource_servers["Resource servers"]
  node_grants["Application grants"]
end

subgraph group_onboarding["Project onboarding"]
  node_onboarding["Onboarding tools<br/>[onboarding.ts]"]
  node_quickstarts["Quickstart tools<br/>[quickstarts.ts]"]
  node_project_guidance["Quickstart guidance<br/>[quickstarts.ts]"]
  node_credential_setup["Project credentials<br/>[onboarding.ts]"]
end

node_developer(("Developer"))
node_ai_client(("AI client"))
node_auth0{{"Auth0 tenant"}}

node_developer -->|"configures"| node_init
node_init -->|"starts authorization"| node_device_auth
node_device_auth -->|"stores credentials"| node_keychain
node_init -->|"selects client"| node_client_adapters
node_client_adapters -->|"updates configuration"| node_client_config
node_ai_client -->|"calls tools"| node_server
node_run -->|"starts"| node_server
node_run -->|"reads credentials"| node_keychain
node_server -->|"loads and validates"| node_config
node_server -->|"filters tools"| node_tool_filter
node_server -->|"dispatches tools"| node_tool_registry
node_tool_filter -->|"filters registry"| node_tool_registry
node_tool_registry -->|"registers handlers"| node_applications
node_tool_registry -->|"registers handlers"| node_actions
node_tool_registry -->|"registers handlers"| node_forms
node_tool_registry -->|"registers handlers"| node_logs
node_tool_registry -->|"registers handlers"| node_resource_servers
node_tool_registry -->|"registers handlers"| node_grants
node_tool_registry -->|"registers handlers"| node_onboarding
node_tool_registry -->|"registers handlers"| node_quickstarts
node_applications -->|"manages tenant apps"| node_auth0
node_actions -->|"manages actions"| node_auth0
node_forms -->|"manages forms"| node_auth0
node_logs -.->|"queries logs"| node_auth0
node_resource_servers -->|"manages APIs"| node_auth0
node_grants -.->|"manages grants"| node_auth0
node_onboarding -->|"creates application"| node_applications
node_onboarding -->|"writes credentials"| node_credential_setup
node_onboarding -->|"hands off"| node_quickstarts
node_quickstarts -->|"resolves guidance"| node_project_guidance
node_quickstarts -->|"updates application"| node_applications

click node_init "https://github.com/auth0/auth0-mcp-server/blob/main/src/commands/init.ts"
click node_device_auth "https://github.com/auth0/auth0-mcp-server/blob/main/src/auth/device-auth-flow.ts"
click node_keychain "https://github.com/auth0/auth0-mcp-server/blob/main/src/utils/keychain.ts"
click node_client_config "https://github.com/auth0/auth0-mcp-server/blob/main/src/clients/base.ts"
click node_client_adapters "https://github.com/auth0/auth0-mcp-server/tree/main/src/clients"
click node_run "https://github.com/auth0/auth0-mcp-server/blob/main/src/commands/run.ts"
click node_server "https://github.com/auth0/auth0-mcp-server/blob/main/src/server.ts"
click node_tool_filter "https://github.com/auth0/auth0-mcp-server/blob/main/src/utils/tools.ts"
click node_tool_registry "https://github.com/auth0/auth0-mcp-server/blob/main/src/tools/index.ts"
click node_config "https://github.com/auth0/auth0-mcp-server/blob/main/src/utils/config.ts"
click node_applications "https://github.com/auth0/auth0-mcp-server/blob/main/src/tools/applications.ts"
click node_actions "https://github.com/auth0/auth0-mcp-server/blob/main/src/tools/actions.ts"
click node_forms "https://github.com/auth0/auth0-mcp-server/blob/main/src/tools/forms.ts"
click node_logs "https://github.com/auth0/auth0-mcp-server/blob/main/src/tools/logs.ts"
click node_resource_servers "https://github.com/auth0/auth0-mcp-server/blob/main/src/tools/resource-servers.ts"
click node_grants "https://github.com/auth0/auth0-mcp-server/blob/main/src/tools/application-grants.ts"
click node_onboarding "https://github.com/auth0/auth0-mcp-server/blob/main/src/tools/onboarding.ts"
click node_quickstarts "https://github.com/auth0/auth0-mcp-server/blob/main/src/tools/quickstarts.ts"
click node_project_guidance "https://github.com/auth0/auth0-mcp-server/blob/main/src/utils/quickstarts.ts"
click node_credential_setup "https://github.com/auth0/auth0-mcp-server/blob/main/src/utils/onboarding.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_init,node_device_auth,node_keychain,node_client_config,node_client_adapters,node_ai_client toneBlue
class node_run,node_server,node_tool_filter,node_tool_registry,node_config toneAmber
class node_applications,node_actions,node_forms,node_logs,node_resource_servers,node_grants toneMint
class node_onboarding,node_quickstarts,node_project_guidance,node_credential_setup toneRose
class node_developer,node_auth0 toneIndigo
```

## Components

### Setup and authentication

- [Init command](https://github.com/auth0/auth0-mcp-server/blob/main/src/commands/init.ts): `src/commands/init.ts`
- [Device authorization](https://github.com/auth0/auth0-mcp-server/blob/main/src/auth/device-auth-flow.ts): `src/auth/device-auth-flow.ts`
- [Credential keychain](https://github.com/auth0/auth0-mcp-server/blob/main/src/utils/keychain.ts): `src/utils/keychain.ts`
- [MCP client configuration](https://github.com/auth0/auth0-mcp-server/blob/main/src/clients/base.ts): `src/clients/base.ts`
- [Client adapters](https://github.com/auth0/auth0-mcp-server/tree/main/src/clients): `src/clients`

### MCP runtime

- [Run command](https://github.com/auth0/auth0-mcp-server/blob/main/src/commands/run.ts): `src/commands/run.ts`
- [MCP server](https://github.com/auth0/auth0-mcp-server/blob/main/src/server.ts): `src/server.ts`
- [Tool selection](https://github.com/auth0/auth0-mcp-server/blob/main/src/utils/tools.ts): `src/utils/tools.ts`
- [Tool registry](https://github.com/auth0/auth0-mcp-server/blob/main/src/tools/index.ts): `src/tools/index.ts`
- [Auth configuration](https://github.com/auth0/auth0-mcp-server/blob/main/src/utils/config.ts): `src/utils/config.ts`

### Tenant management

- [Applications](https://github.com/auth0/auth0-mcp-server/blob/main/src/tools/applications.ts): `src/tools/applications.ts`
- [Actions](https://github.com/auth0/auth0-mcp-server/blob/main/src/tools/actions.ts): `src/tools/actions.ts`
- [Forms](https://github.com/auth0/auth0-mcp-server/blob/main/src/tools/forms.ts): `src/tools/forms.ts`
- [Logs](https://github.com/auth0/auth0-mcp-server/blob/main/src/tools/logs.ts): `src/tools/logs.ts`
- [Resource servers](https://github.com/auth0/auth0-mcp-server/blob/main/src/tools/resource-servers.ts): `src/tools/resource-servers.ts`
- [Application grants](https://github.com/auth0/auth0-mcp-server/blob/main/src/tools/application-grants.ts): `src/tools/application-grants.ts`

### Project onboarding

- [Onboarding tools](https://github.com/auth0/auth0-mcp-server/blob/main/src/tools/onboarding.ts): `src/tools/onboarding.ts`
- [Quickstart tools](https://github.com/auth0/auth0-mcp-server/blob/main/src/tools/quickstarts.ts): `src/tools/quickstarts.ts`
- [Quickstart guidance](https://github.com/auth0/auth0-mcp-server/blob/main/src/utils/quickstarts.ts): `src/utils/quickstarts.ts`
- [Project credentials](https://github.com/auth0/auth0-mcp-server/blob/main/src/utils/onboarding.ts): `src/utils/onboarding.ts`

### Other components

- **Developer**
- **AI client**
- **Auth0 tenant**

## Connections

- Developer → Init command: configures (evidence: `README.md`)
- Init command → Device authorization: starts authorization (evidence: `src/commands/init.ts`)
- Device authorization → Credential keychain: stores credentials (evidence: `src/auth/device-auth-flow.ts`)
- Init command → Client adapters: selects client (evidence: `src/commands/init.ts`)
- Client adapters → MCP client configuration: updates configuration (evidence: `src/clients/claude-code.ts`)
- AI client → MCP server: calls tools (evidence: `README.md`)
- Run command → MCP server: starts (evidence: `src/commands/run.ts`)
- Run command → Credential keychain: reads credentials (evidence: `src/commands/run.ts`)
- MCP server → Auth configuration: loads and validates (evidence: `src/server.ts`)
- MCP server → Tool selection: filters tools (evidence: `src/server.ts`)
- MCP server → Tool registry: dispatches tools (evidence: `src/server.ts`)
- Tool selection → Tool registry: filters registry (evidence: `src/utils/tools.ts`)
- Tool registry → Applications: registers handlers (evidence: `src/tools/index.ts`)
- Tool registry → Actions: registers handlers (evidence: `src/tools/index.ts`)
- Tool registry → Forms: registers handlers (evidence: `src/tools/index.ts`)
- Tool registry → Logs: registers handlers (evidence: `src/tools/index.ts`)
- Tool registry → Resource servers: registers handlers (evidence: `src/tools/index.ts`)
- Tool registry → Application grants: registers handlers (evidence: `src/tools/index.ts`)
- Tool registry → Onboarding tools: registers handlers (evidence: `src/tools/index.ts`)
- Tool registry → Quickstart tools: registers handlers (evidence: `src/tools/index.ts`)
- Applications → Auth0 tenant: manages tenant apps (evidence: `src/tools/applications.ts`)
- Actions → Auth0 tenant: manages actions (evidence: `src/tools/actions.ts`)
- Forms → Auth0 tenant: manages forms (evidence: `src/tools/forms.ts`)
- Logs → Auth0 tenant: queries logs (evidence: `README.md`)
- Resource servers → Auth0 tenant: manages APIs (evidence: `src/tools/resource-servers.ts`)
- Application grants → Auth0 tenant: manages grants
- Onboarding tools → Applications: creates application (evidence: `README.md`)
- Onboarding tools → Project credentials: writes credentials (evidence: `README.md`)
- Onboarding tools → Quickstart tools: hands off (evidence: `README.md`)
- Quickstart tools → Quickstart guidance: resolves guidance (evidence: `src/tools/quickstarts.ts`)
- Quickstart tools → Applications: updates application (evidence: `README.md`)
