FG

fotoetienne/gqai

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

23 stars 6 forks 품질 58 트렌드 10MIT

GraphQL 엔드포인트를 MCP 도구 세트로 변환

개요

claude, Cursor 및 ChatGPT와 같은 AI에 대한 Model Context Protocol (MCP) 도구로 GraphQL 작업을 노출하는 경량 프록시입니다. GraphQL 백엔드에 대한 일반 GraphQL 쿼리 / mutations를 사용하여 도구를 정의하고 gqai는 MCP 서버를 자동으로 생성합니다. .graphqlrc.yml + 일반 .graphql 파일에 의해 구동 GraphQL 백엔드에 의해 구동 - GraphQL 작업을 사용하여 De Define 도구 - .graphqlrc.yml의 자동 발견 작업 - OpenAI 기능 호출 / MCP와 호환되는 도구 메타 데이터 이 파일은 GraphQL 스키마 및 운영을 찾는 gqai를 말합니다. 참고 : schema 매개 변수는 작업을 실행하는 gqai를 말합니다. 이것은 정적 스키마 파일보다 오히려 라이브 서버이어야한다. 그게 다야! 이제 AI 모델은 get all films 도구를 호출 할 수 있습니다. graphql config 파일은 GraphQL 엔드포인트를 정의하는 YAML 파일이며 도구로 노출하려는 작업입니다. 그것은 .graphqlrc.yml 이름을 지정하고 프로젝트의 루트에 배치해야합니다.

개요(AI 번역)

그래픽 → ai

** gqai ** GraphQL 작업을 노출하는 경량 프록시입니다. 모형 Context 의정서 (MCP) AI를 위한 공구는 좋아합니다 Claude, 커서 및 ChatGPT. GraphQL 백엔드에 대한 일반 GraphQL 쿼리 / mutations를 사용하여 도구를 정의하고, gqai는 자동으로 MCP 서버를 생성합니다.

GraphQL 백엔드의 구동 .graphqlrc.yml] + 일반 [T1]] 파일


✨ 특징

  • GraphQL 작업을 사용하여 De Define 도구
  • .graphqlrc.yml]에서 자동 발견 작업
  • OpenAI 함수 호출 / MCP와 호환되는 도구 메타데이터

672️ 설치

⭐ 빠른 시작

  1. .graphqlrc.yml 만들기:

이 파일은 GraphQL 스키마 및 운영을 찾는 gqai를 말합니다.

Note: schema 매개변수는 Gqai가 동작을 실행하는 것을 말합니다. 이것은 정적 스키마 파일보다 오히려 라이브 서버이어야한다

  1. GraphQL 가동 추가

get_all_films.graphql:

  1. mcp.json 파일에 gqai를 추가하십시오:

그게 다야! AI 모델은 이제 get_all_films 툴을 호출할 수 있습니다.

사용법

윤곽

GraphQL 구성

graphql 설정 파일은 GraphQL 엔드포인트와 작업 정의 YAML 파일입니다. 도구로 노출 하시겠습니까.

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 README의 일부입니다. 원문 보기.

gqai

graphql → ai

gqai is a lightweight proxy that exposes GraphQL operations as Model Context Protocol (MCP) tools for AI like Claude, Cursor, and ChatGPT.
Define tools using regular GraphQL queries/mutations against your GraphQL backend, and gqai automatically generates an MCP server for you.

🔌 Powered by your GraphQL backend
⚙️ Driven by .graphqlrc.yml + plain .graphql files


✨ Features

  • 🧰 Define tools using GraphQL operations
  • 🗂 Automatically discover operations from .graphqlrc.yml
  • 🧾 Tool metadata compatible with OpenAI function calling / MCP

🛠️ Installation

go install github.com/fotoetienne/gqai@latest

🚀 Quick Start

  1. Create a .graphqlrc.yml:
schema: https://graphql.org/graphql/
documents: .

This file tells gqai where to find your GraphQL schema and operations.

Note: The schema parameter tells gqai where to execute the operations. This must be a live server rather than a static schema file

  1. Add a GraphQL operation

get_all_films.graphql:

# Get all Star Wars films
query get_all_films {
  allFilms {
    films {
      title
      episodeID
    }
  }
}
  1. Add gqai to your mcp.json file:
  "gqai": {
    "command": "gqai",
    "args": [
      "run",
      "--config"
      ".graphqlrc.yml"
    ]
  }

That’s it! Your AI model can now call the get_all_films tool.

Usage

Configuration

GraphQL Config

The graphql config file is a YAML file that defines the GraphQL endpoint and the operations you want to expose as tools. It should be named .graphqlrc.yml and placed in the root of your project.

schema: https://graphql.org/graphql/
documents: operations

The schema field specifies the GraphQL endpoint, and the documents field specifies the directory where your GraphQL operations are located.

In this example, the operations directory contains all the GraphQL operations you want to expose as tools. Operations are defined in .graphql files, and gqai will automatically discover them.

Headers

You can also specify headers to be sent with each request to the GraphQL endpoint. This is useful for authentication or other custom headers.

schema:
  - https://graphql.org/graphql/:
      headers:
        Authorization: Bearer YOUR_TOKEN
        X-Custom-Header: CustomValue
documents: .
Using Environment Variables in Headers

You can reference environment variables in header values using the ${VARNAME} syntax. For example:

schema:
  - https://graphql.org/graphql/:
      headers:
        Authorization: Bearer ${MY_AUTH_TOKEN}
documents: .

You can also provide a default value using the ${VARNAME:-default} syntax:

schema:
  - https://graphql.org/graphql/:
      headers:
        Authorization: Bearer ${MY_AUTH_TOKEN:-default-token}
documents: .
GitHub에서 전체 README 보기

설치

This server does not publish a one-line install command.

Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →