mcp-graphql-schema
GraphQL スキーマ モデル コンテキスト プロトコル サーバー
Claudeのような大規模言語モデル(LLM)にGraphQLスキーマ情報を公開するモデルコンテキストプロトコル(MCP)サーバー。このサーバーにより、LLMは専用のツールセットを通じてGraphQLスキーマを探索・理解することができます。
特徴
コマンドライン引数で指定されたGraphQLスキーマファイルをロードします。
クエリ、ミューテーション、サブスクリプションのフィールドを調べる
詳細な型定義を調べる
パターンマッチングを使用してタイプとフィールドを検索する
型や引数を含む簡略化されたフィールド情報を取得します
よりクリーンな結果を得るために内部 GraphQL タイプを除外する
Related MCP server: mcp4gql
使用法
コマンドライン
特定のスキーマ ファイルを使用して MCP サーバーを実行します。
# Use the default schema.graphqls in current directory
npx -y mcp-graphql-schema
# Use a specific schema file (relative path)
npx -y mcp-graphql-schema ../schema.shopify.2025-01.graphqls
# Use a specific schema file (absolute path)
npx -y mcp-graphql-schema /absolute/path/to/schema.graphqls
# Show help
npx -y mcp-graphql-schema --helpクロードデスクトップ統合
この MCP サーバーを Claude Desktop で使用するには、 claude_desktop_config.json構成ファイルを編集します。
{
"mcpServers": {
"GraphQL Schema": {
"command": "npx",
"args": ["-y", "mcp-graphql-schema", "/ABSOLUTE/PATH/TO/schema.graphqls"]
}
}
}設定ファイルの場所:
macOS/Linux:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
$env:AppData\Claude\claude_desktop_config.json
クロード・コード統合
この MCP サーバーを Claude Code CLI で使用するには、次の手順に従います。
Claude CodeにGraphQLスキーマMCPサーバーを追加する
# Basic syntax claude mcp add graphql-schema npx -y mcp-graphql-schema # Example with specific schema claude mcp add shopify-graphql-schema npx -y mcp-graphql-schema ~/Projects/work/schema.shopify.2025-01.graphqlsMCPサーバーが登録されていることを確認する
# List all configured servers claude mcp list # Get details for your GraphQL schema server claude mcp get graphql-schema必要に応じてサーバーを削除する
claude mcp remove graphql-schemaClaude Codeのツールを使用する
設定が完了すると、GraphQL スキーマに関する質問をすることで、Claude Code セッションでツールを呼び出すことができます。
ヒント:
-sまたは--scopeフラグをproject(デフォルト)またはglobalとともに使用して、構成が保存される場所を指定します。異なる名前の異なるスキーマ(例:メイン API スキーマ、Shopify スキーマ)に複数の MCP サーバーを追加します。
MCPツール
サーバーは、LLM が GraphQL スキーマと対話するための次のツールを提供します。
list-query-fields: GraphQLクエリで利用可能なすべてのルートレベルフィールドを一覧表示しますget-query-field: 特定のクエリフィールドの詳細な定義をSDL形式で取得します。list-mutation-fields: GraphQL ミューテーションで利用可能なすべてのルートレベルフィールドを一覧表示しますget-mutation-field: 特定のミューテーションフィールドの詳細な定義をSDL形式で取得します。list-subscription-fields: GraphQL サブスクリプションで利用可能なすべてのルートレベルフィールドを一覧表示します (スキーマに存在する場合)get-subscription-field: 特定のサブスクリプション フィールドの詳細な定義を取得します (スキーマに存在する場合)list-types: GraphQLスキーマで定義されているすべての型を一覧表示します(内部型を除く)get-type: 特定の GraphQL タイプの詳細な定義を SDL 形式で取得します。get-type-fields: 特定のGraphQLオブジェクトタイプのフィールドとその型の簡略化されたリストを取得します。search-schema: スキーマ内の型またはフィールドを名前パターンで検索します(大文字と小文字を区別しない正規表現)
例
試してみるクエリの例:
What query fields are available in this GraphQL schema?
Show me the details of the "user" query field.
What mutation operations can I perform in this schema?
List all types defined in this schema.
Show me the definition of the "Product" type.
List all fields of the "Order" type.
Search for types and fields related to "customer".This server cannot be deployed
Maintenance
Related MCP Connectors
The Grafbase MCP server sits in front of a GraphQL API and exposes an MCP protocol-compliant interface that allows AI agents and LLMs to explore and query GraphQL APIs using natural language. It provides tools to search schemas, introspect types and fields, and execute GraphQL queries while minimizing context bloat by returning only relevant schema subsets, with built-in support for authentication, authorization, and configurable access control.
An MCP server that provides an API to LLMs to manage their JumpCloud resources.
Repository knowledge graph MCP server for codebase understanding and debugging.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceA MCP server that exposes OpenAPI schema information to LLMs like Claude. This server allows an LLM to explore and understand large OpenAPI schemas through a set of specialized tools, without needing to load the whole schema into the context48 npm49MIT
- AlicenseAqualityDmaintenanceGraphQL MCP Server that acts as a bridge allowing MCP clients (like Cursor or Claude Desktop) to interact with target GraphQL APIs through standard tools for schema introspection and operation execution.26 npm3MIT
- AlicenseAqualityDmaintenanceAn MCP server that provides tools for exploring large OpenAPI schemas without loading entire schemas into LLM context. Perfect for discovering and analyzing endpoints, data models, and API structure efficiently.914MIT
- AlicenseAqualityAmaintenanceA generic MCP (Model Context Protocol) server that bridges any GraphQL API to Claude Code. It introspects your GraphQL schema and exposes each query and mutation as an individual tool, letting Claude interact with your API directly.221 npm1MIT