Skip to content

Commit 3f252a8

Browse files
committed
chore: updated readme
1 parent c21e9ad commit 3f252a8

File tree

1 file changed

+21
-10
lines changed

1 file changed

+21
-10
lines changed

auth-for-mcp/fastmcp-mcp-fga-js/README.md

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,28 @@
11
# Example FastMCP MCP Server with Auth0 and Auth0 FGA Integration
22

33
This is a practical example of securing a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/docs) server
4-
with Auth0 using the [FastMCP](https://github.com/punkpeye/fastmcp) TypeScript framework. It demonstrates
5-
real-world OAuth 2.0 and OIDC integration with JWT token verification, and how to implement fine grained authorization for MCPs.
4+
with Auth0 using the [FastMCP](https://github.com/punkpeye/fastmcp) TypeScript framework.
65

6+
This repository shows a minimal but realistic integration with:
7+
- OAuth 2.0 / OIDC via Auth0 for authentication and token verification
8+
- Auth0 FGA (OpenFGA) for fine-grained Resource Authorization
9+
- FastMCP for exposing tools as MCP endpoints
10+
11+
This example uses an authorization model defined in [`fga/model.fga`](./fga/model.fga) that supports:
12+
13+
- **Public Tools**: Accessible to all authenticated users (e.g., `get_datetime`)
14+
- **Role-Based Access**: Tools assigned to specific roles
15+
- **Group Membership**: Users inherit permissions through group membership
16+
- **Temporal Access**: Time-limited tool access with automatic expiration
17+
- **Resource-Specific Permissions**: Fine-grained access (e.g., viewing private documents)
18+
19+
## Prerequisites
20+
21+
- Node.js 18+
22+
- npm (or a compatible package manager)
23+
- An Auth0 tenant (for OAuth and token verification)
24+
- An Auth0 FGA account (OpenFGA / fga.dev) for authorization model and tuples
25+
- `fga` CLI (optional, for bootstrapping the model and tuples)
726

827
## Available Tools
928

@@ -26,7 +45,6 @@ npm install
2645

2746
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-samples/auth0-ai-samples/tree/main/auth-for-mcp/fastmcp-mcp-js/README.md#auth0-tenant-setup) in the FastMCP example.
2847

29-
3048
## Auth0 FGA Setup
3149

3250
Auth0 FGA provides fine-grained authorization using [Relationship-Based Access Control (ReBAC)](https://docs.fga.dev/concepts#what-is-relationship-based-access-control-rebac). It's built on [OpenFGA](https://openfga.dev), a CNCF incubation project, and offers more flexible authorization patterns than traditional RBAC.
@@ -59,13 +77,6 @@ After creating your FGA credentials, export the following (provided during crede
5977

6078
### Authorization Model
6179

62-
This example uses an authorization model defined in [`fga/model.fga`](./fga/model.fga) that supports:
63-
64-
- **Public Tools**: Accessible to all authenticated users (e.g., `get_datetime`)
65-
- **Role-Based Access**: Tools assigned to specific roles
66-
- **Group Membership**: Users inherit permissions through group membership
67-
- **Temporal Access**: Time-limited tool access with automatic expiration
68-
- **Resource-Specific Permissions**: Fine-grained access (e.g., viewing private documents)
6980

7081
### Initial Setup
7182

0 commit comments

Comments
 (0)