Model Context Protocol (MCP) server for OpenFGA
Project description
OpenFGA MCP Server
An experimental Model Context Protocol (MCP) server that enables Large Language Models (LLMs) to read, search, and manipulate OpenFGA stores. Unlocks authorization for agentic AI, and fine-grained vibe coding✨ for humans.
Requirements
- Python 3.12+
- An OpenFGA server
Features
Tools
check: Check if a user has a relation to an objectlist_objects: List objects of a type that a user has a relation tolist_relations: List relations for which a user has a relation to an objectlist_users: List users that have a given relationship with a given object
Resources
Prompts
Usage
We recommend running the server using UVX:
uvx openfga-mcp@latest
Configuration
The server accepts the following arguments:
--openfga_url: URL of your OpenFGA server--openfga_store: ID of the OpenFGA store the MCP server will use--openfga_model: ID of the OpenFGA authorization model the MCP server will use
For API token authentication:
--openfga_token: API token for use with your OpenFGA server
For Client Credentials authentication:
--openfga_client_id: Client ID for use with your OpenFGA server--openfga_client_secret: Client secret for use with your OpenFGA server--openfga_api_issuer: API issuer for use with your OpenFGA server--openfga_api_audience: API audience for use with your OpenFGA server
For example:
uvx openfga-mcp@latest \
--openfga_url="http://127.0.0.1:8000" \
--openfga_store="your-store-id" \
--openfga_model="your-model-id"
Using with Claude Desktop
To configure Claude to use this server, add the following to your Claude config:
{
"mcpServers": {
"openfga-mcp": {
"command": "uvx",
"args": [
"openfga-mcp@latest",
]
}
}
}
- You may need to specify the full path to your
uvxexecutable. Usewhich uvxto find it. - You must restart Claude after updating the configuration.
Using with Raycast
Using with Cursor
Using with Windsurf
Development
To setup your development environment, run:
uv sync
To run the development server:
uv run openfga-mcp
License
Apache 2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file openfga_mcp-0.1.0.tar.gz.
File metadata
- Download URL: openfga_mcp-0.1.0.tar.gz
- Upload date:
- Size: 90.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a3b39b6ec6c3a6e4dce3135fc3849815791dfc443c2b449be9b6e7cf9a8bf70
|
|
| MD5 |
790bad4ff0b94719031f49470ae32ddf
|
|
| BLAKE2b-256 |
5f275bf51f0dd8e5a042bf5422ec301ad7856820a6a56444b78a2c8b4517f479
|
File details
Details for the file openfga_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: openfga_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27d2f7b4d14f5a4859af7af9e675be34d10bcce68f741f9ae4b80b2ffb26b50c
|
|
| MD5 |
e4d2a9877576ecf21df7579399eff47c
|
|
| BLAKE2b-256 |
1b54eda4b474b18e42e82de1f407c04d75c3b6747a34447c920386c369c3b9b5
|