mcp-graphql-schema

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

Integrations

  • Exposes GraphQL schema information to explore query, mutation, and subscription fields, look up type definitions, search for types and fields, and get simplified field information.

  • Supports loading Shopify GraphQL schemas, allowing exploration of Shopify's API structure through the MCP server.

GraphQL 스키마 모델 컨텍스트 프로토콜 서버

Claude와 같은 대규모 언어 모델(LLM)에 GraphQL 스키마 정보를 제공하는 모델 컨텍스트 프로토콜(MCP) 서버입니다. 이 서버를 통해 LLM은 특수 도구 세트를 통해 GraphQL 스키마를 탐색하고 이해할 수 있습니다.

특징

  • 명령줄 인수를 통해 지정된 GraphQL 스키마 파일을 로드합니다.
  • 쿼리, 뮤테이션 및 구독 필드 탐색
  • 자세한 유형 정의를 찾아보세요
  • 패턴 매칭을 사용하여 유형 및 필드 검색
  • 유형 및 인수를 포함한 단순화된 필드 정보 가져오기
  • 더 깨끗한 결과를 위해 내부 GraphQL 유형을 필터링합니다.

용법

명령줄

특정 스키마 파일로 MCP 서버를 실행합니다.

지엑스피1

Claude 데스크톱 통합

Claude Desktop과 함께 이 MCP 서버를 사용하려면 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

클로드 코드 통합

Claude Code CLI와 함께 이 MCP 서버를 사용하려면 다음 단계를 따르세요.

  1. Claude Code에 GraphQL Schema 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 세션에서 도구를 호출할 수 있습니다.

팁:

  • 구성이 저장되는 위치를 지정하려면 project (기본값) 또는 global 과 함께 -s 또는 --scope 플래그를 사용합니다.
  • 다양한 이름을 가진 여러 스키마에 대해 여러 MCP 서버를 추가합니다(예: 기본 API 스키마, Shopify 스키마)

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 : SDL 형식으로 특정 GraphQL 유형에 대한 자세한 정의를 가져옵니다.
  • 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
F
license - not found
-
quality - not tested

Claude와 같은 LLM에게 GraphQL 스키마 정보를 제공하는 MCP 서버입니다. 이 서버를 통해 LLM은 전체 스키마를 컨텍스트에 로드하지 않고도 특수 도구 세트를 통해 대규모 GraphQL 스키마를 탐색하고 이해할 수 있습니다.

  1. Features
    1. Usage
      1. Command Line
      2. Claude Desktop Integration
      3. Claude Code Integration
    2. MCP Tools
      1. Examples
        ID: 544atbdic7