Skip to main content
Glama

mcp-graphql-schema

by hannesj

GraphQL スキーマ モデル コンテキスト プロトコル サーバー

Claudeのような大規模言語モデル(LLM)にGraphQLスキーマ情報を公開するモデルコンテキストプロトコル(MCP)サーバー。このサーバーにより、LLMは専用のツールセットを通じてGraphQLスキーマを探索・理解することができます。

特徴

  • コマンドライン引数で指定されたGraphQLスキーマファイルをロードします。
  • クエリ、ミューテーション、サブスクリプションのフィールドを調べる
  • 詳細な型定義を調べる
  • パターンマッチングを使用してタイプとフィールドを検索する
  • 型や引数を含む簡略化されたフィールド情報を取得します
  • よりクリーンな結果を得るために内部 GraphQL タイプを除外する

使用法

コマンドライン

特定のスキーマ ファイルを使用して 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.json
  • Windows: $env:AppData\Claude\claude_desktop_config.json

クロード・コード統合

この MCP サーバーを Claude Code CLI で使用するには、次の手順に従います。

  1. 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.graphqls
  2. MCPサーバーが登録されていることを確認する
    # List all configured servers claude mcp list # Get details for your GraphQL schema server claude mcp get graphql-schema
  3. 必要に応じてサーバーを削除する
    claude mcp remove graphql-schema
  4. Claude 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".
-
security - not tested
A
license - permissive license
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

ClaudeのようなLLMにGraphQLスキーマ情報を提供するMCPサーバー。このサーバーにより、LLMはコンテキストにスキーマ全体をロードすることなく、専用のツールセットを通じて大規模なGraphQLスキーマを探索・理解することができます。

  1. 特徴
    1. 使用法
      1. コマンドライン
      2. クロードデスクトップ統合
      3. クロード・コード統合
    2. MCPツール

        Related MCP Servers

        • A
          security
          A
          license
          A
          quality
          MCP for working with GraphQL servers.
          Last updated -
          2
          733
          170
          TypeScript
          MIT License
          • Apple
        • -
          security
          F
          license
          -
          quality
          A 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 context
          Last updated -
          37
          5
          JavaScript
          • Apple
          • Linux
        • -
          security
          A
          license
          -
          quality
          A Model Context Protocol server that enables LLMs to interact with GraphQL APIs by providing schema introspection and query execution capabilities.
          Last updated -
          733
          1
          MIT License
          • Apple
        • -
          security
          F
          license
          -
          quality
          A Model Context Protocol server that enables LLMs to interact with GraphQL APIs by providing schema introspection and query execution capabilities.
          Last updated -
          9
          TypeScript
          • Apple
          • Linux

        View all related MCP servers

        MCP directory API

        We provide all the information about MCP servers via our MCP API.

        curl -X GET 'https://glama.ai/api/mcp/v1/servers/hannesj/mcp-graphql-schema'

        If you have feedback or need assistance with the MCP directory API, please join our Discord server