mcp-graphql-schema
Сервер протокола контекста модели схемы GraphQL
Сервер Model Context Protocol (MCP), который предоставляет информацию о схеме GraphQL для больших языковых моделей (LLM), таких как Claude. Этот сервер позволяет 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Установка через Smithery
Чтобы автоматически установить схему GraphQL для Claude Desktop через Smithery :
npx -y @smithery/cli install @hannesj/mcp-graphql-schema --client claudeИнтеграция рабочего стола Клода
Чтобы использовать этот сервер 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, выполните следующие действия:
Добавьте сервер GraphQL Schema MCP в 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Убедитесь, что сервер MCP зарегистрирован
# List all configured servers claude mcp list # Get details for your GraphQL schema server claude mcp get graphql-schemaУдалите сервер, если необходимо.
claude mcp remove graphql-schemaИспользуйте инструмент в Claude Code
После настройки вы можете вызывать инструмент в сеансе Claude Code, задавая вопросы о схеме GraphQL.
Советы:
Используйте флаг
-sили--scopeсproject(по умолчанию) илиglobal, чтобы указать, где хранится конфигурация.Добавьте несколько серверов MCP для разных схем с разными именами (например, основная схема API, схема Shopify)
Инструменты МКП
Сервер предоставляет следующие инструменты для взаимодействия LLM со схемами GraphQL:
list-query-fields: список всех доступных полей корневого уровня для запросов GraphQLget-query-field: Получает подробное определение для определенного поля запроса в формате SDLlist-mutation-fields: список всех доступных полей корневого уровня для мутаций GraphQLget-mutation-field: Получает подробное определение для конкретного поля мутации в формате SDLlist-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