Back to MCP directory
publicPublicdnsLocal runtime

openfga-mcp

OpenFGA MCP服务器是一个实验性的模型上下文协议服务,使大型语言模型能够读写OpenFGA授权存储,为AI代理和开发者提供细粒度权限管理能力。

article

README

🚀 OpenFGA MCP 服务器

一个实验性的 模型上下文协议 (MCP) 服务器,可让大型语言模型 (LLMs) 读取、搜索和操作 OpenFGA 存储。它能解锁代理式 AI 的授权,并为人类实现精细的 氛围编码 ✨。

🚀 快速开始

要运行服务器,可执行以下命令:

make run \
  OPENFGA_URL=http://127.0.0.1:8080 \
  STORE_ID=your-store-id \
  MODEL_ID=your-model-id

✨ 主要特性

工具

存储管理

  • create_store:创建新存储。 (create-store)
  • list_stores:列出所有存储。 (list-stores)
  • get_store:获取存储详细信息。 (get-store)
  • delete_store:删除存储。 (delete-store)
  • get_store_id_by_name:根据名称获取存储 ID。

授权模型管理

关系元组管理

查询

  • check_permission:检查权限。
  • list_objects:列出对象。
  • list_users_or_groups:列出用户或组。

📦 安装指南

要求

📚 详细文档

集成

与Claude集成

在配置文件中添加以下内容:

{
  "mcpInspectors": {
    "default": {
      "class": "OpenFGAInspector",
      "args": {
        "baseUrl": "http://localhost:8081"
      }
    }
  }
}

与Raycast集成

尚未提供具体说明。

与Cursor集成

尚未提供具体说明。

与Windsurf集成

尚未提供具体说明。

开发

设置开发环境:

make setup

运行开发服务器:

make run \
  OPENFGA_URL=http://127.0.0.1:8080 \
  STORE_ID=your-store-id \
  MODEL_ID=your-model-id

📄 许可证

本项目采用 Apache 2.0 许可证。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client