• SYNC
  • ACCESS
  • AUDIT
  • REVIEW

How to manage Hasura metadata and permissions with your AI

Connect your agent to your Hasura instance to automate schema tracking and permission logic. Once connected, your agent handles the heavy lifting of metadata management.

Ask AI about this page

Short answer

How can I automate Hasura metadata and permission updates?

Your agent uses the execute_metadata tool to push configuration changes and permission sets directly to your engine. This allows you to sync schema updates and access controls without manual API calls. You get a direct line from your chat interface to your Hasura configuration.

The results of your requests.

What your agent accomplishes.

The agent handles the technical execution of metadata changes.

SYNC

Schema alignment

The agent pushes metadata updates to keep your GraphQL engine in sync with your local schema definitions.

ACCESS

Permission control

Your agent applies new permission rules to tables and views, ensuring user access stays current.

AUDIT

Metadata tracking

The agent can inspect your current metadata state to identify discrepancies or outdated permission sets.

REVIEW

Human oversight

You review the proposed metadata changes before the agent executes them to prevent breaking production schemas.

The workflow

What your AI does when the request arrives.

The agent translates your natural language instructions into specific metadata operations.

  1. Analyze schema

    The agent looks at your current Hasura configuration to understand existing tables and permission rules.

    execute_metadata
  2. Draft updates

    The agent prepares the specific metadata objects needed to add a new permission or update a table.

    execute_metadata
  3. Apply changes

    The agent sends the prepared metadata payload to your Hasura engine to commit the changes.

    execute_metadata
  4. Verify state

    The agent checks that the metadata was applied correctly and that the engine is running the new config.

    execute_metadata

Try it

Copy these to start.

Use these prompts to trigger metadata actions immediately.

Starting points

Replace the bracketed text with your specific table names or role requirements.

Hasura Connector

You're all set. Choose your MCP client and follow the setup instructions.

Connector linkhttps://edge.vinkius.com/vk_preview_Q19k5WrSMOV2zDZs6DlIbmRJGyWfSnbLHJlhJLmt/mcp

Claude Desktop

Follow the steps below to connect in seconds.

  1. 1In Claude Desktop, open Settings → Connectors.
  2. 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
  3. 3Click Add and start a new chat — Hasura capabilities are ready to use.
Configuration · claude_desktop_config.jsonCopy
{
  "mcpServers": {
    "hasura-instant-graphql-rest-engine-mcp": {
      "url": "https://edge.vinkius.com/vk_preview_Q19k5WrSMOV2zDZs6DlIbmRJGyWfSnbLHJlhJLmt/mcp"
    }
  }
}
Copy into chat04
  • Update the permissions for the 'users' table so the 'admin' role can delete rows.

  • Add a new metadata configuration to include the 'orders' table in the schema.

  • Check the current permission settings for the 'profiles' table.

  • Apply a new permission rule that allows 'authenticated' users to read all columns in 'posts'.

  • Claude
  • ChatGPT
  • Cursor
  • VS Code
  • Windsurf
  • Claude Code
  • JetBrains
  • Cline

Start here

Connect Hasura once, then ask.

Enter your Hasura endpoint and admin secret. Your credentials stay encrypted and secure while your agent gains the ability to manage your engine.

Connect Hasura to your AI

FAQ

How this task behaves.

  • 01

    Can the AI delete my entire database?

    No. The agent only interacts with the Metadata API. It cannot perform raw SQL deletions or drop tables directly.

  • 02

    Does the agent need admin permissions?

    Yes. To execute metadata changes, the agent requires an admin secret that has permission to modify the engine configuration.

  • 03

    Can it manage remote schemas too?

    Yes, if the metadata for those remote schemas is part of the engine's metadata configuration.

  • 04

    Will it automatically fix broken permissions?

    No. The agent only applies the specific changes you ask for. It won't autonomously attempt to repair your security model without a prompt.

  • 05

    Can the agent see my actual data?

    No. The agent uses the metadata tools to manage configuration, not to query the data stored within your tables.

  • More questions about Hasura? The Connector page answers them. See everything the Hasura Connector can do

Connect Hasura to Claude, Cursor, ChatGPT & more