
husamabusafa/hasura_mcp
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
このモデルコンテキストプロトコル(MCP)サーバーは、Hasura GraphQLエンドポイントとやり取りするために、AIエージェント(CursorやClaude Desktopのような)の高度なインターフェイスを提供します.
概要
このモデルコンテキストプロトコル(MCP)サーバーは、Hasura GraphQLエンドポイントとやり取りするために、AIエージェント(CursorやClaude Desktopのような)の高度なインターフェイスを提供します。 エージェントは、API構造を発見し、読み取り専用クエリとミューテーション(注意)、プレビューデータ、集計を実行し、サービス健康をチェックすることができます。 このサーバーは、自然言語のリクエストに基づいて、ハスラ API を動的に活用できるようにすることで、LM の機能を強化します。 このサーバは、次のMCP機能を公開します。 * 標準的なイントロスペクションによって得られる全グラフQLのスキーマの定義を提供します。 * application/json * エージェントは、タイプ、フィールド、引数、ディレクティブなどの API の完全な構造を理解するためにこのリソースを読み込みます。 * Hasura エンドポイントに対する読み取り専用の GraphQL クエリを実行します。 特定のツールが利用できない場合は、データを取得するために使用します。 クエリがデータを変更しないことを確認してください.
概要(AI 翻訳)
バージョン: 1.1.0
このモデルコンテキストプロトコル(MCP)サーバーは、Hasura GraphQLエンドポイントとやり取りするために、AIエージェント(CursorやClaude Desktopのような)の高度なインターフェイスを提供します。 エージェントは、API構造を発見し、読み取り専用クエリとミューテーション(注意)、プレビューデータ、集計を実行し、サービス健康をチェックすることができます。
このサーバーは、自然言語のリクエストに基づいて、ハスラ API を動的に活用できるようにすることで、LM の機能を強化します。
##特徴
このサーバは、次のMCP機能を公開します。
リソース:
Hasura GraphQL スキーマ (hasura:/schema)
標準のイントロスペクションで得られる全グラフQLスキーマ定義を提供します。
※MIMEタイプ: [[T1]
- エージェントは、タイプ、フィールド、引数、ディレクティブなどの API の完全な構造を理解するためにこのリソースを読み込みます。
ツール:
※[run_graphql_query**
*** 説明:** Hasura エンドポイントに対する読み取り専用の GraphQL クエリを実行します。 特定のツールが利用できない場合は、データを取得するために使用します。 クエリがデータを変更しないことを確認してください。 ※例:[query { users { id name } }*
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
Advanced Hasura GraphQL MCP Server
Version: 1.1.0
This Model Context Protocol (MCP) server provides an advanced interface for AI agents (like those in Cursor or Claude Desktop) to interact with a Hasura GraphQL endpoint. It enables agents to discover the API structure, execute both read-only queries and mutations (with caution), preview data, perform aggregations, and check service health.
This server enhances LLM capabilities by allowing them to leverage your Hasura API dynamically based on natural language requests.
Features
This server exposes the following MCP capabilities:
Resources:
- Hasura GraphQL Schema (
hasura:/schema)- Provides the full GraphQL schema definition obtained via standard introspection.
- MIME Type:
application/json - Agents can read this resource to understand the complete structure of the API, including types, fields, arguments, directives, etc.
Tools:
-
run_graphql_query- Description: 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 } - Note: Performs a basic check to prevent execution of strings starting with
mutation. Primarily relies on the query itself being read-only.
- Description: 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:
-
run_graphql_mutation- Description: Executes a GraphQL mutation to insert, update, or delete data. Use with caution, ensure the operation is intended and safe. Relies on Hasura permissions configured for the provided Admin Secret or default role. Example:
mutation { insert_users_one(object: {name: "Test"}) { id } } - Input:
{ mutation: string, variables?: object } - Security: Allows any mutation permitted by the Hasura role. Ensure appropriate Hasura permissions are configured.
- Description: Executes a GraphQL mutation to insert, update, or delete data. Use with caution, ensure the operation is intended and safe. Relies on Hasura permissions configured for the provided Admin Secret or default role. Example:
-
list_tables- Description: Lists available data tables (or collections) managed by Hasura, organized by schema with descriptions, based on introspection heuristics (looks for object types with an ‘id’ field, excluding internal/aggregate types). Useful for discovering available data sources.
- Input:
{ schemaName?: string }(Optional schema name, attempts to infer from field descriptions if possible, defaults to ‘public’ conceptually)
-
describe_table- Description: 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- Description: Lists the available top-level query, mutation, or subscription fields from the GraphQL schema. Useful for understanding the primary entry points for operations.
- Input:
{ fieldType?: 'QUERY' | 'MUTATION' | 'SUBSCRIPTION' }(Optional filter)
インストール
This server does not publish a one-line install command.
Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →設定
{
"mcpServers": {
// ... other servers ...
"hasura-advanced": { // Key used internally by Claude
"command": "/path/to/your/node", // <<< Absolute path from 'which node'
"args": [
"/absolute/path/to/mcp-hasura-advanced/dist/index.js", // <<< Absolute path to compiled script
"https://YOUR_HASURA_ENDPOINT.com/v1/graphql", // <<< Your endpoint
"YOUR_ADMIN_SECRET" // <<< Your secret (REMOVE if no secret)
],
// Optional:
// "cwd": "/absolute/path/to/mcp-hasura-advanced"
}
}
}