You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -55,7 +55,7 @@ auth0 api post clients --data '{
55
55
56
56
The output of the command will be a JSON object with the `client_id` and `client_secret` of the newly created client, which will be used in the next steps to configure the MCP server environment.
57
57
58
-
Next, we need to indicate Auth0 that the client can use Custom Token Exchange.
58
+
Next, we need to indicate to Auth0 that the client can use Custom Token Exchange.
@@ -84,7 +84,7 @@ auth0 api post resource-servers --data '{
84
84
}'| jq -r '"Audience: " + .identifier'
85
85
```
86
86
87
-
Save the `Audience` from the command output, you'll need it on a later step.
87
+
Save the `Audience` from the command output; you'll need it in a later step.
88
88
89
89
90
90
<Tabs>
@@ -124,7 +124,7 @@ npm install
124
124
125
125
## Create your environment file
126
126
127
-
In the `fastmcp-mcp-customtokenexchange-js` directory, run the following commnd to create a new `.env` file populated with all the required environment variables:
127
+
In the `fastmcp-mcp-customtokenexchange-js` directory, run the following command to create a new `.env` file populated with all the required environment variables:
@@ -152,15 +152,15 @@ To get your Auth0 application’s `AUTH0_DOMAIN`, run the following command:
152
152
auth0 tenants list
153
153
```
154
154
155
-
Copy the domain under `TENANT` from the output and update the corresponding variable on the `.env`.
155
+
Copy the domain under `TENANT` from the output and update the corresponding variable in the `.env` file.
156
156
157
-
For `MCP_AUTH0_CLIENT_ID` and `MCP_AUTH0_CLIENT_SECRET` you will use the values obtained on the [Create an Application for your MCP server](./call-your-apis-on-users-behalf#create-an-application-for-your-mcp-server) step.
157
+
For `MCP_AUTH0_CLIENT_ID` and `MCP_AUTH0_CLIENT_SECRET` you will use the values obtained from the [Create an Application for your MCP server](./call-your-apis-on-users-behalf#create-an-application-for-your-mcp-server) step.
158
158
159
159
## Use Custom Token Exchange Action
160
160
161
161
This Action is the server-side logic Auth0 executes to perform the token exchange. It is necessary because the MCP server receives an access token from the client (with the MCP server as its audience) and must exchange it for a new token (with the upstream API as the audience). This Action validates the original token and mints the new one.
162
162
163
-
The Custom Token Exchange Action, available as a part of Custom Token Exchange Early Access. Navigate to [the On-behalf-of token exchange for first-party apps template available here](https://manage.auth0.com/#/actions/library/templates/templates/daeda4e8-8da2-4abb-afb5-ac09df0ebb2a) and click on **Use This Template**.
163
+
The Custom Token Exchange Action is available as part of Custom Token Exchange Early Access. Navigate to [the On-behalf-of token exchange for first-party apps template available here](https://manage.auth0.com/#/actions/library/templates/templates/daeda4e8-8da2-4abb-afb5-ac09df0ebb2a) and click on **Use This Template**.
164
164
165
165
<Frame>
166
166
<img
@@ -179,9 +179,9 @@ This will open a modal for you to name the action:
179
179
/>
180
180
</Frame>
181
181
182
-
Once the action is created you can **Deploy** it. When you deploy the Action, Auth0 assigns it an Action ID. You still need to add your custom logic to the Action, but first, get the Action ID to create the Custom Token Exchange Profile.
182
+
Once the action is created, you can **Deploy** it. When you deploy the Action, Auth0 assigns it an Action ID. You still need to add your custom logic to the Action, but first, get the Action ID to create the Custom Token Exchange Profile.
Copy file name to clipboardExpand all lines: auth4genai/mcp/guides/registering-your-mcp-client-application.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ You can register your client in two ways: statically or dynamically. For most sc
17
17
This method is recommended because it offers several key advantages:
18
18
19
19
***Enhanced Security**: You explicitly approve every client, preventing unauthorized or malicious applications from registering themselves and accessing your system.
20
-
***Predictable Configuration**: The client_id and other settings are known in advance, simplifying deployment and configuration management.
20
+
***Predictable Configuration**: The `client_id` and other settings are known in advance, simplifying deployment and configuration management.
21
21
***Clear Auditing**: There is a clear, auditable trail for every client created, linking it to a specific developer or team.
22
22
***Principle of Least Privilege**: You can precisely configure the exact permissions (scopes) and settings for each client from the outset.
23
23
@@ -113,7 +113,7 @@ For a client to interact with your server, the MCP specification requires you to
113
113
114
114
1.**Use the `WWW-Authenticate` Header for 401 Errors**
115
115
116
-
When a client makes a request without a valid token, your server must return a `401 Unauthorized` status. Crucially, this response must include the `WWW-Authenticate` header, pointing to the metadata URL you configured above. This signals to the client that authentication is required and tells it exactly.
116
+
When a client makes a request without a valid token, your server must return a `401 Unauthorized` status. Crucially, this response must include the `WWW-Authenticate` header, pointing to the metadata URL you configured above. This signals to the client that authentication is required and tells it exactly where to obtain the authorization metadata.
117
117
118
118
2.**Announce Your Auth Server with Protected Resource Metadata ([RFC 9728](https://datatracker.ietf.org/doc/html/rfc9728))**
Copy file name to clipboardExpand all lines: auth4genai/mcp/guides/resource-param-compatibility-profile.mdx
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,9 +44,9 @@ Once the **Resource Parameter Compatibility Profile** is enabled, Auth0 will use
44
44
/>
45
45
</Frame>
46
46
47
-
If both the `resource` and `audience` are available, the `audience` will still be used. Auth0 will not forward the `resource` to upstream Identity Providers (IdPs), [learn more](./resource-param-compatibility-profile#resource-parameter-forwarding-to-upstream-identity-provider-idp).
47
+
If both the `resource` and `audience` are available, the `audience` will still be used. Auth0 will not forward the `resource` to upstream Identity Providers (IdPs). [Learn more](./resource-param-compatibility-profile#resource-parameter-forwarding-to-upstream-identity-provider-idp).
48
48
49
-
*RFC 8707 requires the `resource` parameter to [be an absolute URI](https://www.rfc-editor.org/rfc/rfc8707.html#name-resource-parameter), to conform with RFC 8707 we recommend defining your resource server identifiers (API identifiers) in [URI format](https://datatracker.ietf.org/doc/html/rfc3986). Using an absolute URI as the identifier of your MCP Server is also a requirement from the MCP Authorization specification.*
49
+
*RFC 8707 requires the `resource` parameter to [be an absolute URI](https://www.rfc-editor.org/rfc/rfc8707.html#name-resource-parameter), to conform with RFC 8707, we recommend defining your resource server identifiers (API identifiers) in [URI format](https://datatracker.ietf.org/doc/html/rfc3986). Using an absolute URI as the identifier of your MCP Server is also a requirement from the MCP Authorization specification.*
50
50
51
51
## Supported flows
52
52
@@ -62,11 +62,11 @@ The `resource` parameter is supported in the following flows:
62
62
63
63
When federating to an upstream IdP, Auth0 provides a way for initiating clients to [forward parameters](https://auth0.com/docs/authenticate/identity-providers/pass-parameters-to-idps). In the documentation, notice that `resource` is one of the parameters [available for forwarding to upstream IdPs](https://auth0.com/docs/authenticate/identity-providers/pass-parameters-to-idps#available-fields).
64
64
65
-
To avoid leaking access token details, Auth0 will not forward the resource parameter to upstream IdPs while the Resource Parameter Compatibility Profile is enabled.
65
+
RFC 8707 requires the `resource` parameter to be an absolute URI. To conform with RFC 8707, we recommend defining your resource server identifiers (API identifiers) in URI format. To avoid leaking access token details, Auth0 will not forward the resource parameter to upstream IdPs while the Resource Parameter Compatibility Profile is enabled.
Copy file name to clipboardExpand all lines: auth4genai/mcp/guides/test-your-mcp-server-with-mcp-inspector.mdx
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ First, make sure your MCP server is running in a separate terminal. Then, open a
18
18
npx @modelcontextprotocol/inspector@latest
19
19
```
20
20
21
-
This will open the MCP Inspector interface on your default browser.
21
+
This will open the MCP Inspector interface in your default browser.
22
22
23
23
<Frame>
24
24
<img
@@ -34,15 +34,15 @@ Once the Inspector is open, you need to configure it to connect to your local MC
34
34
1. Set the **Transport Type** to `Streamable HTTP`.
35
35
2. Enter your server's URL, which is typically `http://localhost:3001/mcp`.
36
36
37
-
In order for the MCP Inspector connect to your MCP server you can either do static client registration (recommended) or Dynamic Client Registration (DCR). Pick your preferred method below and follow the instructions.
37
+
In order for the MCP Inspector to connect to your MCP server you can either do static client registration (recommended) or Dynamic Client Registration (DCR). Pick your preferred method below and follow the instructions.
38
38
39
39
<StaticClientRegOrDCR />
40
40
41
41
3. Click **Connect**.
42
42
43
43
You'll be redirected to a login and consent screen. Sign in with a user account that has been granted the necessary permissions for the tools.
44
44
45
-
When you connect to the server for the first time you will be guided through the authentication process using the [Auth0 Universal Login](https://auth0.com/features/universal-login). You’ll see the consent screen where you can check the tools you have access:
45
+
When you connect to the server for the first time, you will be guided through the authentication process using the [Auth0 Universal Login](https://auth0.com/features/universal-login). You'll see the consent screen where you can check the tools you have access to:
46
46
47
47
<Frame>
48
48
<img
@@ -68,7 +68,7 @@ After authenticating, you can run the tools the MCP server exposes for your user
68
68
<Framecaption="List of tools available in the MCP Server">
Copy file name to clipboardExpand all lines: auth4genai/mcp/intro/overview.mdx
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,20 +52,20 @@ Register MCP clients and servers using standards-aligned discovery and registrat
52
52
horizontal
53
53
iconType="solid" />
54
54
55
-
### Call your APIs on user’s behalf
55
+
### Call your APIs on a user's behalf
56
56
57
57
When an **AI agent** connects to your **MCP server**, the server may need to call your internal APIs to read data or trigger workflows. Those APIs need tokens that reflect who the user is and what the server is allowed to do.
58
58
59
59
**Auth0 Custom Token Exchange** enables that delegation. The MCP server exchanges the token it received from the client for a new, short-lived access token scoped to the internal API. This lets **MCP servers** call internal APIs on behalf of users while **Auth0** issues and governs access centrally.
60
60
61
61
<Card
62
-
title="Use this quickstart to call your APIs on user's behalf from your MCP server"
62
+
title="Use this quickstart to call your APIs on a user's behalf from your MCP server"
MCP Servers often connect AI Agents to third-party services such as Google, Microsoft, Jira, or Notion. Auth0’s **Token Vault** handles these integrations by managing token issuance, storage, rotation, and revocation for external APIs. Token Vault eliminates manual credential handling and makes it easy to extend MCP connectivity across the modern SaaS ecosystem.
71
71
@@ -85,7 +85,7 @@ To begin using Auth for MCP in your MCP server, refer to the following resources
@@ -183,5 +183,5 @@ Auth for MCP delivers a more secure and scalable authentication and authorizatio
183
183
cta="Request to join the Early Access Program"
184
184
vertical>
185
185
186
-
Auth for MCP is currently available in Early Access. To join the Early Access program, please complete this form and we'll reach out to you when your request is processed.
186
+
Auth for MCP is currently available in Early Access. To join the Early Access program, please complete this form, and we'll reach out to you when your request is processed.
0 commit comments