Skip to main content
Glama
hasura-mcp-server

hasura-mcp-server

hasura-mcp-server

MCP server for Hasura GraphQL, runnable via npx hasura-mcp-server.

Requirements

  • Node.js 18+

  • Hasura GraphQL endpoint + admin secret

Related MCP server: PostgreSQL MCP Server

Usage

export HASURA_GRAPHQL_ENDPOINT="https://your-hasura/v1/graphql"
 
npx hasura-mcp-server --x-hasura-admin-secret=your-admin-secret

You can also pass values directly:

npx hasura-mcp-server --endpoint https://your-hasura/v1/graphql --x-hasura-admin-secret your-admin-secret

Any other --key value or --key=value args are forwarded as headers:

npx hasura-mcp-server --endpoint https://your-hasura/v1/graphql \\
  --x-hasura-admin-secret=secret \\
  --x-hasura-role=readonly \\
  --authorization="Bearer token"

Tools

  • health_check

  • list_tables

  • describe_table

  • list_root_fields

  • describe_graphql_type

  • preview_table_data

  • aggregate_data

  • run_graphql_query

Note: mutation operations are not allowed.

Resource

  • hasura://schema (GraphQL introspection schema)

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      Not graded
      maintenance
      Enables read-only access to PostgreSQL databases with multi-tenant support, allowing users to query data, explore schemas, inspect table structures, and view function definitions across different tenant schemas safely.
      55 npm
      1
      -
    • F
      license
      Not graded
      quality
      D
      maintenance
      Provides read-only access to PostgreSQL databases with schema inspection, query execution in multiple formats (JSON, CSV, Markdown), and query history tracking with built-in security features.
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides secure, read-only access to PostgreSQL databases for schema inspection and data querying. It enables users to list tables, describe structures, and execute SELECT statements while strictly blocking destructive operations.
      7 npm
      1
      MIT