Skip to main content
Glama

OpenFGA MCP 服务器

铁匠徽章

一个实验性的模型上下文协议(MCP) 服务器,使大型语言模型 (LLM) 能够读取、搜索和操作OpenFGA存储。它解锁了代理 AI 的授权,以及人类的细粒度氛围编码✨。

要求

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。

授权模型管理

关系元组管理

关系查询

  • check :检查用户是否与对象有关系。(检查

  • list_objects :列出与用户有关系的类型的对象。( list-objects

  • list_users :列出与给定对象具有给定关系的用户。( list-users

资源

提示

用法

我们建议使用UVX运行服务器:

uvx openfga-mcp@latest

通过 Smithery 安装

要通过Smithery自动为 Claude Desktop 安装 OpenFGA MCP 服务器:

npx -y @smithery/cli install @evansims/openfga-mcp --client claude

配置

服务器接受以下参数:

  • --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 受众

例如:

uvx openfga-mcp@latest \ --openfga_url="http://127.0.0.1:8080" \ --openfga_store="your-store-id" \ --openfga_model="your-model-id"

与 Claude Desktop 一起使用

要配置 Claude 使用服务器,请将以下内容添加到您的 Claude 配置中:

{ "mcpServers": { "openfga-mcp": { "command": "uvx", "args": ["openfga-mcp@latest"] } } }
  • 您可能需要指定uvx可执行文件的完整路径。使用which uvx来查找。

  • 更新配置后必须重新启动 Claude。

与 Raycast 一起使用

与游标一起使用

与 Windsurf 一起使用

发展

要设置您的开发环境,请运行:

make setup

运行开发服务器:

make run \ --openfga_url="http://127.0.0.1:8080" \ --openfga_store="your-store-id" \ --openfga_model="your-model-id"

要使用 MCP Inspector 运行开发服务器:

make dev

执照

Apache 2.0

-
security - not tested
A
license - permissive license
-
quality - not tested

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/evansims/openfga-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server