OpenFGA MCP 服务器
一个实验性的模型上下文协议(MCP) 服务器,使大型语言模型 (LLM) 能够读取、搜索和操作OpenFGA存储。它解锁了代理 AI 的授权,以及人类的细粒度氛围编码✨。
要求
Python 3.12+
Related MCP server: MCP TapData Server
特征
工具
店铺管理
create_store:创建一个新的商店。( create-store )list_stores:列出所有商店。( list-stores )get_store:获取商店详情。( get-store )delete_store:删除商店。( delete-store )get_store_id_by_name:通过商店名称获取商店的 ID。
授权模型管理
write_authorization_model:编写授权模型。( write-authorization-model )read_authorization_models:列出所有授权模型。( read-authorization-models )get_authorization_model:获取授权模型详细信息的特定版本。( get-authorization-model )
关系元组管理
write_relation_tuples:写入关系元组。( write-relation-tuples )read_relation_tuples:读取关系元组。( read-relation-tuples )
关系查询
check:检查用户是否与对象有关系。(检查)list_objects:列出与用户有关系的类型的对象。( list-objects )list_users:列出与给定对象具有给定关系的用户。( list-users )
资源
提示
用法
我们建议使用UVX运行服务器:
通过 Smithery 安装
要通过Smithery自动为 Claude Desktop 安装 OpenFGA MCP 服务器:
配置
服务器接受以下参数:
--openfga_url:OpenFGA 服务器的 URL--openfga_store:MCP 服务器将使用的 OpenFGA 存储的 ID--openfga_model:MCP 服务器将使用的 OpenFGA 授权模型的 ID
对于 API 令牌认证:
--openfga_token:用于 OpenFGA 服务器的 API 令牌
对于客户端凭证身份验证:
--openfga_client_id:用于 OpenFGA 服务器的客户端 ID--openfga_client_secret:用于 OpenFGA 服务器的客户端密钥--openfga_api_issuer:用于 OpenFGA 服务器的 API 发行者--openfga_api_audience:用于 OpenFGA 服务器的 API 受众
例如:
与 Claude Desktop 一起使用
要配置 Claude 使用服务器,请将以下内容添加到您的 Claude 配置中:
您可能需要指定
uvx可执行文件的完整路径。使用which uvx来查找。更新配置后必须重新启动 Claude。
与 Raycast 一起使用
与游标一起使用
与 Windsurf 一起使用
发展
要设置您的开发环境,请运行:
运行开发服务器:
要使用 MCP Inspector 运行开发服务器:
执照
Apache 2.0