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
# Example FastMCP MCP Server with Auth0 Integration
2
+
3
+
This example demonstrates how to create a FastMCP MCP server that uses Auth0 for authentication using the `auth0-api-python` library.
4
+
5
+
## Install dependencies
6
+
7
+
```
8
+
poetry install
9
+
```
10
+
11
+
## Auth0 Tenant Setup
12
+
13
+
For detailed instructions on setting up your Auth0 tenant for MCP server integration, please refer to the [Auth0 Tenant Setup guide](https://github.com/auth0/auth0-auth-js/blob/main/examples/example-fastmcp-mcp/README.md#auth0-tenant-setup).
14
+
15
+
## Configuration
16
+
17
+
Rename `.env.example` to `.env` and configure the domain and audience:
18
+
19
+
```
20
+
# Auth0 tenant domain
21
+
AUTH0_DOMAIN=example-tenant.us.auth0.com
22
+
23
+
# Auth0 API Identifier
24
+
AUTH0_AUDIENCE=http://localhost:3001
25
+
```
26
+
27
+
With the configuration in place, the example can be started by running:
28
+
29
+
```bash
30
+
poetry run python -m src.server
31
+
```
32
+
33
+
## Testing
34
+
35
+
Use an MCP client like [MCP Inspector](https://github.com/modelcontextprotocol/inspector) to test your server interactively:
36
+
37
+
```bash
38
+
npx @modelcontextprotocol/inspector
39
+
```
40
+
41
+
The server will start up and the UI will be accessible at http://localhost:6274.
42
+
43
+
In the MCP Inspector, select `Streamable HTTP` as the `Transport Type` and enter `http://localhost:3001/mcp` as the URL.
0 commit comments