MCPServers
Hasura GraphQL - MCP server logo

Hasura GraphQL

8
0

Summary

This advanced Hasura GraphQL MCP server enables AI agents to interact with Hasura GraphQL endpoints through a rich set of tools. It provides capabilities for schema introspection, executing read-only queries and mutations, listing tables and their structures, previewing data samples, performing aggregations, and checking service health. The implementation handles authentication via admin secrets, performs basic security checks on operations, and exposes the complete GraphQL schema as a resource, making it ideal for AI assistants that need to dynamically discover and leverage database structures based on natural language requests.

Available Actions(9)

run_graphql_query

Executes a read-only GraphQL query against the Hasura endpoint. Use this for fetching data when a specific tool isn't available. Ensure the query does not modify data. Example: `query { users { id name } }`. Input: `{ query: string, variables?: object }`.

run_graphql_mutation

Executes a GraphQL mutation to insert, update, or delete data. Use with caution, ensure the operation is intended and safe. Example: `mutation { insert_users_one(object: {name: 'Test'}) { id } }`. Input: `{ mutation: string, variables?: object }`.

list_tables

Lists available data tables (or collections) managed by Hasura, organized by schema with descriptions. Input: `{ schemaName?: string }`.

describe_table

Shows the structure of a specific table including all its columns (fields) with their GraphQL types and descriptions. Input: `{ tableName: string, schemaName?: string }`.

list_root_fields

Lists the available top-level query, mutation, or subscription fields from the GraphQL schema. Input: `{ fieldType?: 'QUERY' | 'MUTATION' | 'SUBSCRIPTION' }`.

describe_graphql_type

Provides details about a specific GraphQL type (Object, Input, Scalar, Enum, Interface, Union) using schema introspection. Input: `{ typeName: string }`.

preview_table_data

Fetches a limited sample of rows (default 5) from a specified table to preview its data structure and content. Input: `{ tableName: string, limit?: number }`.

aggregate_data

Performs a simple aggregation (count, sum, avg, min, max) on a specified table, optionally applying a Hasura 'where' filter. Input: `{ tableName: string, aggregateFunction: 'count'|'sum'|'avg'|'min'|'max', field?: string, filter?: object }`.

health_check

Checks if the configured Hasura GraphQL endpoint is reachable and responding to a basic GraphQL query (`{ __typename }`). Input: `{ healthEndpointUrl?: string }`.

Last Updated: April 25, 2025

커뮤니티 리뷰

0.0
0 리뷰
5
0
4
0
3
0
2
0
1
0

아직 리뷰가 없습니다. 첫 번째 리뷰를 작성해 보세요!

대화에 참여하려면 로그인하세요

Coming soon to
HighlightHighlight AI

언어

TypeScript

카테고리

태그