一个实验性的 模型上下文协议 (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。write_authorization_model
:写入授权模型。 (write-authorization-model)read_authorization_models
:列出所有授权模型。 (read-authorization-models)get_authorization_model
:获取授权模型。 (get-authorization-model)batch_get_triples
:批量获取关系元组。 (batch-get-triples)get_triple
:获取单个关系元组。 (get-triple)upsert_triple
:插入或更新关系元组。 (upsert-triple)delete_triples
:删除关系元组。 (delete-triples)check_permission
:检查权限。list_objects
:列出对象。list_users_or_groups
:列出用户或组。在配置文件中添加以下内容:
{
"mcpInspectors": {
"default": {
"class": "OpenFGAInspector",
"args": {
"baseUrl": "http://localhost:8081"
}
}
}
}
尚未提供具体说明。
尚未提供具体说明。
尚未提供具体说明。
设置开发环境:
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 许可证。