OpenFGA (Fine-Grained Auth) MCP Server for Mastra AIGive Mastra AI instant access to 16 tools to Batch Check Relations, Check Relation, Create Store, and more
Mastra AI is a TypeScript-native agent framework built for modern web stacks. Connect OpenFGA (Fine-Grained Auth) through Vinkius and Mastra agents discover all tools automatically. type-safe, streaming-ready, and deployable anywhere Node.js runs.
Ask AI about this MCP Server for Mastra AI
The OpenFGA (Fine-Grained Auth) MCP Server for Mastra AI is a standout in the Developer Tools category — giving your AI agent 16 tools to work with, ready to go from day one.
Vinkius delivers Streamable HTTP and SSE to any MCP client
import { Agent } from "@mastra/core/agent";
import { createMCPClient } from "@mastra/mcp";
import { openai } from "@ai-sdk/openai";
async function main() {
// Your Vinkius token. get it at cloud.vinkius.com
const mcpClient = await createMCPClient({
servers: {
"openfga-fine-grained-auth": {
url: "https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp",
},
},
});
const tools = await mcpClient.getTools();
const agent = new Agent({
name: "OpenFGA (Fine-Grained Auth) Agent",
instructions:
"You help users interact with OpenFGA (Fine-Grained Auth) " +
"using 16 tools.",
model: openai("gpt-4o"),
tools,
});
const result = await agent.generate(
"What can I do with OpenFGA (Fine-Grained Auth)?"
);
console.log(result.text);
}
main();
* Every MCP server runs on Vinkius-managed infrastructure inside AWS - a purpose-built runtime with per-request V8 isolates, Ed25519 signed audit chains, and sub-40ms cold starts optimized for native MCP execution. See our infrastructure
About OpenFGA (Fine-Grained Auth) MCP Server
Connect your OpenFGA instance to any AI agent to manage Relationship-Based Access Control (ReBAC) through natural conversation. OpenFGA is an open-source fine-grained authorization solution inspired by Google's Zanzibar.
Mastra's agent abstraction provides a clean separation between LLM logic and OpenFGA (Fine-Grained Auth) tool infrastructure. Connect 16 tools through Vinkius and use Mastra's built-in workflow engine to chain tool calls with conditional logic, retries, and parallel execution. deployable to any Node.js host in one command.
What you can do
- Store Management — Create, list, and delete isolated stores to manage authorization data for different environments or applications.
- Authorization Modeling — Define and retrieve complex authorization models using types and relations to represent your system's permissions.
- Tuple Management — Write, read, and track changes to relationship tuples that define which users have which relations to specific objects.
- Relationship Checks — Instantly evaluate whether a user has a specific relation to an object (e.g., 'can user:anne view document:1?').
- Health Monitoring — Quickly check the status of your OpenFGA instance to ensure high availability.
The OpenFGA (Fine-Grained Auth) MCP Server exposes 16 tools through the Vinkius. Connect it to Mastra AI in under two minutes — credentials fully managed, no infrastructure to provision, no vendor lock-in. Your configuration, your data, your control.
All 16 OpenFGA (Fine-Grained Auth) tools available for Mastra AI
When Mastra AI connects to OpenFGA (Fine-Grained Auth) through Vinkius, your AI agent gets direct access to every tool listed below — spanning authorization, rebac, access-control, and more. Every call runs in a secure, isolated environment with full audit visibility. Beyond a simple connection, you get real-time monitoring of agent activity, enterprise governance, and optimized token usage.
Batch check relations on OpenFGA (Fine-Grained Auth)
Perform multiple checks in one request
Check relation on OpenFGA (Fine-Grained Auth)
Check if a user has a relation to an object
Create store on OpenFGA (Fine-Grained Auth)
Create a new OpenFGA store
Delete store on OpenFGA (Fine-Grained Auth)
Delete an OpenFGA store
Expand relation on OpenFGA (Fine-Grained Auth)
Expand a relation into a tree
Get authorization model on OpenFGA (Fine-Grained Auth)
Get a specific authorization model
Get store on OpenFGA (Fine-Grained Auth)
Get OpenFGA store details
Health check on OpenFGA (Fine-Grained Auth)
Check OpenFGA server health
List authorization models on OpenFGA (Fine-Grained Auth)
List authorization models
List objects on OpenFGA (Fine-Grained Auth)
List all objects a user can access
List stores on OpenFGA (Fine-Grained Auth)
List all OpenFGA stores
List users on OpenFGA (Fine-Grained Auth)
List all users who have a relation to an object
Read changes on OpenFGA (Fine-Grained Auth)
Read changes to relationship tuples
Read tuples on OpenFGA (Fine-Grained Auth)
Query stored relationship tuples
Write authorization model on OpenFGA (Fine-Grained Auth)
Write a new authorization model
Write tuples on OpenFGA (Fine-Grained Auth)
Add or delete relationship tuples
Connect OpenFGA (Fine-Grained Auth) to Mastra AI via MCP
Follow these steps to wire OpenFGA (Fine-Grained Auth) into Mastra AI. The entire setup takes under two minutes — your credentials stay safe behind Vinkius.
Install dependencies
npm install @mastra/core @mastra/mcp @ai-sdk/openaiReplace the token
[YOUR_TOKEN_HERE] with your Vinkius tokenRun the agent
agent.ts and run with npx tsx agent.tsExplore tools
Why Use Mastra AI with the OpenFGA (Fine-Grained Auth) MCP Server
Mastra AI provides unique advantages when paired with OpenFGA (Fine-Grained Auth) through the Model Context Protocol.
Mastra's agent abstraction provides a clean separation between LLM logic and tool infrastructure. add OpenFGA (Fine-Grained Auth) without touching business code
Built-in workflow engine chains MCP tool calls with conditional logic, retries, and parallel execution for complex automation
TypeScript-native: full type inference for every OpenFGA (Fine-Grained Auth) tool response with IDE autocomplete and compile-time checks
One-command deployment to any Node.js host. Vercel, Railway, Fly.io, or your own infrastructure
OpenFGA (Fine-Grained Auth) + Mastra AI Use Cases
Practical scenarios where Mastra AI combined with the OpenFGA (Fine-Grained Auth) MCP Server delivers measurable value.
Automated workflows: build multi-step agents that query OpenFGA (Fine-Grained Auth), process results, and trigger downstream actions in a typed pipeline
SaaS integrations: embed OpenFGA (Fine-Grained Auth) as a first-class tool in your product's AI features with Mastra's clean agent API
Background jobs: schedule Mastra agents to query OpenFGA (Fine-Grained Auth) on a cron and store results in your database automatically
Multi-agent systems: create specialist agents that collaborate using OpenFGA (Fine-Grained Auth) tools alongside other MCP servers
Example Prompts for OpenFGA (Fine-Grained Auth) in Mastra AI
Ready-to-use prompts you can give your Mastra AI agent to start working with OpenFGA (Fine-Grained Auth) immediately.
"List all my OpenFGA stores."
"Check if user 'anne' has the 'viewer' relation to 'document:doc1' in store 01H1..."
"Create a new OpenFGA store named 'Security-Audit-Logs'."
Troubleshooting OpenFGA (Fine-Grained Auth) MCP Server with Mastra AI
Common issues when connecting OpenFGA (Fine-Grained Auth) to Mastra AI through Vinkius, and how to resolve them.
createMCPClient not exported
npm install @mastra/mcpOpenFGA (Fine-Grained Auth) + Mastra AI FAQ
Common questions about integrating OpenFGA (Fine-Grained Auth) MCP Server with Mastra AI.
How does Mastra AI connect to MCP servers?
MCPClient with the server URL and pass it to your agent. Mastra discovers all tools and makes them available with full TypeScript types.Can Mastra agents use tools from multiple servers?
Does Mastra support workflow orchestration?
Explore More MCP Servers
View all →
World Bank Economy
4 toolsInstantly query GDP, inflation, economic growth, and financial sector indicators from the World Bank. Zero auth required.

Common Room
12 toolsUnify community signals from Slack, Discord, GitHub, and social media to identify your most engaged users and advocates.

AppGallery Connect
11 toolsManage your AppGallery Connect apps via AI — check stats, submit builds for review, monitor ratings, and reply to user comments.

NetBird
89 toolsAutomate Zero Trust networking via NetBird — manage accounts, users, and access controls directly from any AI agent.
