HM

hannesj/mcp-graphql-schema

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

46 stars 10 forks Качество 63 Тренд 0MIT

hannesj/mcp-graphql-schema - кандидат на сервер MCP, импортированный из https://github.com/hannesj/mcp-graphql-schema.

Обзор

hannesj/mcp-graphql-schema - кандидат на сервер MCP, импортированный из https://github.com/hannesj/mcp-graphql-schema.

Обзор (машинный перевод)

Сервер Model Context Protocol (MCP), который предоставляет информацию о схеме GraphQL крупным языковым моделям (LLM), таким как Claude. Этот сервер позволяет LLM исследовать и понимать схемы GraphQL с помощью набора специализированных инструментов.

Особенности

Загрузите любой файл схемы GraphQL, указанный через аргумент командной строки Исследуйте запросы, мутации и поля подписки Посмотрите подробные определения типов

  • Поиск типов и полей с использованием сопоставления шаблонов Получите упрощенную информацию о поле, включая типы и аргументы Отфильтровать внутренние типы GraphQL для более чистых результатов

Использование

Командная строка

Запустите MCP-сервер с определенным файлом схемы:

###Установка через Smithery

Установить GraphQL Schema для Claude Desktop автоматически через Smithery:

###Интеграция рабочего стола

Чтобы использовать этот MCP-сервер с Claude Desktop, отредактируйте файл конфигурации claude_desktop_config.json:

Расположение файла конфигурации:

macOS/Linux: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: $env:AppData\Claude\claude_desktop_config.json

###Интеграция кода

Чтобы использовать этот MCP-сервер с Claude Code CLI, выполните следующие действия:

Эта страница переведена автоматически. Технические детали смотрите в оригинале.

README

Показан фрагмент оригинального README. Открыть оригинал.

GraphQL Schema Model Context Protocol Server

A Model Context Protocol (MCP) server that exposes GraphQL schema information to Large Language Models (LLMs) like Claude. This server allows an LLM to explore and understand GraphQL schemas through a set of specialized tools.

Features

  • Load any GraphQL schema file specified via command line argument
  • Explore query, mutation, and subscription fields
  • Look up detailed type definitions
  • Search for types and fields using pattern matching
  • Get simplified field information including types and arguments
  • Filter out internal GraphQL types for cleaner results

Usage

Command Line

Run the MCP server with a specific schema file:

# 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

Installing via Smithery

To install GraphQL Schema for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @hannesj/mcp-graphql-schema --client claude

Claude Desktop Integration

To use this MCP server with Claude Desktop, edit your claude_desktop_config.json configuration file:

{
  "mcpServers": {
    "GraphQL Schema": {
      "command": "npx",
      "args": ["-y", "mcp-graphql-schema", "/ABSOLUTE/PATH/TO/schema.graphqls"]
    }
  }
}

Location of the configuration file:

  • macOS/Linux: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: $env:AppData\Claude\claude_desktop_config.json

Claude Code Integration

To use this MCP server with Claude Code CLI, follow these steps:

  1. Add the GraphQL Schema MCP server to Claude Code

    # 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. Verify the MCP server is registered

    # List all configured servers
    claude mcp list
    
    # Get details for your GraphQL schema server
    claude mcp get graphql-schema
    
  3. Remove the server if needed

    claude mcp remove graphql-schema
    
  4. Use the tool in Claude Code

    Once configured, you can invoke the tool in your Claude Code session by asking questions about the GraphQL schema.

Tips:

  • Use the -s or --scope flag with project (default) or global to specify where the configuration is stored
  • Add multiple MCP servers for different schemas with different names (e.g., main API schema, Shopify schema)
Открыть полный README на GitHub

Установка

npx -y mcp-graphql-schema /ABSOLUTE/PATH/TO/schema.graphqls
Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { "GraphQL Schema": { "command": "npx", "args": ["-y", "mcp-graphql-schema", "/ABSOLUTE/PATH/TO/schema.graphqls"] } } }