Skip to main content
Glama

mcp4gql - GraphQL MCP 서버

대장간 배지

mcp4gql

이 프로젝트는 모델 컨텍스트 프로토콜(MCP)을 구현하는 Node.js/TypeScript 서버입니다. MCP 클라이언트(예: Cursor)가 대상 GraphQL API와 상호 작용할 수 있도록 하는 브릿지 역할을 합니다.

특징

  • MCP 서버: @modelcontextprotocol/sdk 의 MCP Server 클래스를 구현합니다.

  • 표준 입출력 (Stdio Transport): 표준 입출력을 통해 클라이언트와 통신합니다.

  • GraphQL 클라이언트: axios 사용하여 구성된 GraphQL 엔드포인트에 요청을 보냅니다.

  • 일반 GraphQL 도구: 다음 도구를 MCP 클라이언트에 제공합니다.

    • introspectGraphQLSchema : 인트로스펙션을 사용하여 대상 GraphQL API 스키마를 가져옵니다.

    • executeGraphQLOperation : query , 선택적 variables , 선택적 operationName 입력으로 받아 대상 API에 대해 임의의 GraphQL 쿼리나 뮤테이션을 실행합니다.

Related MCP server: mcp-graphql

구성

서버에는 다음과 같은 환경 변수가 필요합니다.

  • GRAPHQL_ENDPOINT : 대상 GraphQL API의 URL입니다.

  • AUTH_TOKEN : GraphQL API 인증을 위한 선택적 Authorization: Bearer <token> 헤더에 대한 전달자 토큰입니다.

클라이언트 구성

Cursor나 Claude Desktop과 같은 클라이언트가 이 서버에서 제공하는 도구를 사용할 수 있게 하려면 npx 명령을 실행하도록 구성해야 합니다.

커서

  1. 커서 MCP 설정으로 이동하세요(커서 > 설정 > 커서 설정 > MCP)

    • 새로운 글로벌 MCP 서버 추가로 이동

  2. 커서 MCP 구성에 다음을 추가하세요.

    지엑스피1

클로드 데스크탑

  1. Claude Desktop 설정을 엽니다(Claude > 설정).

  2. 개발자 > 구성 편집으로 이동합니다.

  3. 구성에 추가:

    {
      "mcpServers": {
        "mcp4gql": {
          "command": "npx",
          "args": ["-y", "mcp4gql"],
          "env": {
            "GRAPHQL_ENDPOINT": "YOUR_GRAPHQL_ENDPOINT_URL",
            "AUTH_TOKEN": "YOUR_OPTIONAL_AUTH_TOKEN"
          }
        }
      }
    }

구성이 완료되면 MCP 클라이언트는 해당 서버에서 제공하는 introspectGraphQLSchema 및 executeGraphQLOperation 도구를 나열하고 호출할 수 있어야 합니다(해당하는 경우). 서버가 API에 연결할 수 있도록 구성에서 필수 환경 변수( GRAPHQL_ENDPOINT 및 선택적으로 AUTH_TOKEN )를 설정해야 합니다.

Available Tools

2 tools
executeGraphQLOperationA

Executes an arbitrary GraphQL query or mutation against the target API. Use introspectGraphQLSchema first to understand the available operations.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesThe GraphQL query string to execute.
variablesNoAn optional object containing variables for the query.
operationNameNoAn optional name for the operation, if the query contains multiple operations.

TDQS

A3.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. While it mentions executing 'query or mutation,' it lacks critical details such as authentication requirements, rate limits, error handling, or whether it's read-only or destructive. This is a significant gap for a tool that can perform mutations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is highly concise and front-loaded, consisting of only two sentences. The first sentence states the core purpose, and the second provides essential usage guidance. Every sentence earns its place without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (executing arbitrary GraphQL operations with potential mutations) and lack of annotations and output schema, the description is incomplete. It covers purpose and usage guidelines well but fails to address behavioral aspects like safety, permissions, or response format, which are crucial for such a flexible tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, so the schema already documents all three parameters (query, variables, operationName) with clear descriptions. The description does not add any parameter-specific details beyond what the schema provides, which aligns with the baseline score of 3 when schema coverage is high.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Executes an arbitrary GraphQL query or mutation against the target API.' It specifies the verb ('executes') and resource ('GraphQL query or mutation'), and distinguishes it from the sibling tool 'introspectGraphQLSchema' by mentioning it as a prerequisite for understanding available operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to use this tool: 'Use introspectGraphQLSchema first to understand the available operations.' This clearly indicates a prerequisite and distinguishes it from the sibling tool, offering a specific alternative for schema exploration.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

introspectGraphQLSchemaB

Fetches the schema of the target GraphQL API using introspection. Returns the schema in JSON format.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses the tool fetches schema via introspection and returns JSON, which is useful behavioral context. However, it lacks details on permissions, rate limits, error handling, or whether it's read-only/destructive, leaving gaps for a mutation-sensitive context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads key information (fetches schema, uses introspection, returns JSON) with no wasted words. It's appropriately sized for a simple tool with no parameters.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is adequate but minimal. It explains what the tool does and the return format, but lacks context on behavioral traits like safety or performance, which could be important for an API introspection tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately doesn't discuss parameters, focusing on the tool's purpose instead, which aligns with the baseline for zero parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('fetches') and resource ('schema of the target GraphQL API'), specifying it uses introspection and returns JSON format. It distinguishes from the sibling 'executeGraphQLOperation' by focusing on schema retrieval rather than operation execution, though it doesn't explicitly name the sibling for differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool versus alternatives is provided. The description implies usage for schema introspection, but it doesn't mention prerequisites, when not to use it, or reference the sibling tool for operational queries.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 2 tool updates
    • First observedexecuteGraphQLOperation
    • First observedintrospectGraphQLSchema

TDQS

A3.6/5.0

Scored across 2 tools

Disambiguation5/5

The two tools have clearly distinct purposes: introspectGraphQLSchema fetches the schema, while executeGraphQLOperation executes queries/mutations. There is no overlap or ambiguity between them, making it easy for an agent to select the correct tool.

Naming Consistency4/5

Both tools follow a verb_noun pattern (introspectGraphQLSchema, executeGraphQLOperation), but they use camelCase instead of snake_case. This is a minor deviation from a common convention, but the pattern is consistent and readable across the set.

Tool Count2/5

With only 2 tools, the server feels thin for a GraphQL client purpose. While the tools cover introspection and execution, typical GraphQL interactions might benefit from additional utilities like schema validation or query building, making this count borderline too few.

Completeness3/5

The tools cover core GraphQL operations (introspection and execution), but there are notable gaps. For example, there are no tools for schema exploration, query validation, or handling subscriptions, which could limit an agent's ability to fully interact with a GraphQL API.

Maintenance

ActivityInactive
ResponsivenessNo issues

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.

  • Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server

  • Hosted Amazon Seller and Vendor MCP server for Claude, ChatGPT, Cursor, Codex, Gemini, Copilot.

  • An MCP server that provides an API to LLMs to manage their JumpCloud resources.

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A MCP server that exposes GraphQL schema information to LLMs like Claude. This server allows an LLM to explore and understand large GraphQL schemas through a set of specialized tools, without needing to load the whole schema into the context
    83 npm
    46
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server that enables LLMs to interact with GraphQL APIs by providing schema introspection and query execution capabilities.
    826 npm
    3
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    This MCP server exposes approved GraphQL operations from an Apollo GraphQL API as AI-accessible tools. It sits between MCP clients and the GraphQL API, translating tool calls into GraphQL queries and returning results in MCP format.
    -