Skip to main content
Glama

지카이

graphql → ai

gqai는 Claude, Cursor, ChatGPT와 같은 AI를 위한 MCP(Model Context Protocol) 도구로 GraphQL 작업을 제공하는 가벼운 프록시입니다.
GraphQL 백엔드에 대한 일반 GraphQL 쿼리/변이를 사용하여 도구를 정의하면 gqai가 자동으로 MCP 서버를 생성합니다.

🔌 GraphQL 백엔드로 구동됨
⚙️ .graphqlrc.yml + 일반 .graphql 파일로 구동됨


✨ 특징

  • 🧰 GraphQL 작업을 사용하여 도구 정의

  • 🗂 .graphqlrc.yml 에서 자동으로 작업을 검색합니다.

  • 🧾 OpenAI 함수 호출/MCP와 호환되는 도구 메타데이터


🛠️ 설치

지엑스피1

🚀 빠른 시작

  1. .graphqlrc.yml을 만듭니다.

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

이 파일은 gqai에 GraphQL 스키마와 작업을 찾을 수 있는 위치를 알려줍니다.

참고:

  1. GraphQL 작업 추가

get_all_films.graphql :

# Get all Star Wars films query get_all_films { allFilms { films { title episodeID } } }
  1. mcp.json 파일에 gqai를 추가합니다.

"gqai": { "command": "gqai", "args": [ "run", "--config" ".graphqlrc.yml" ] }

이제 AI 모델이 get_all_films 도구를 호출할 수 있습니다.

용법

구성

GraphQL 구성

graphql 설정 파일은 GraphQL 엔드포인트와 도구로 노출할 작업을 정의하는 YAML 파일입니다. 파일 이름은 .graphqlrc.yml 이고 프로젝트 루트에 저장해야 합니다.

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

schema 필드는 GraphQL 엔드포인트를 지정하고, documents 필드는 GraphQL 작업이 있는 디렉토리를 지정합니다.

이 예에서 operations 디렉터리에는 도구로 노출하려는 모든 GraphQL 작업이 포함되어 있습니다. 작업은 .graphql 파일에 정의되어 있으며, gqai가 자동으로 이를 감지합니다.

헤더

GraphQL 엔드포인트에 대한 각 요청과 함께 전송될 헤더를 지정할 수도 있습니다. 이는 인증이나 기타 사용자 지정 헤더에 유용합니다.

schema: - https://graphql.org/graphql/: headers: Authorization: Bearer YOUR_TOKEN X-Custom-Header: CustomValue documents: .

MCP 구성

클로드 데스크탑

Claude Desktop과 함께 gqai를 사용하려면 mcp.json 파일에 다음 구성을 추가해야 합니다.

{ "gqai": { "command": "gqai", "args": [ "run", "--config", ".graphqlrc.yml" ] } }

🧪 CLI 테스트

CLI를 통해 도구를 호출하여 테스트합니다.

gqai tools/call get_all_films

이렇게 하면 get_all_films 도구가 실행되고 결과가 인쇄됩니다.

{ "data": { "allFilms": { "films": [ { "id": 4, "title": "A New Hope" }, { "id": 5, "title": "The Empire Strikes Back" }, { "id": 6, "title": "Return of the Jedi" }, ... ] } } }

인수를 사용하여 도구를 호출합니다.

인수를 받는 GraphQL 작업을 생성하면 이것이 도구 입력이 됩니다.

get_film_by_id.graphql :

query get_film_by_id($id: ID!) { film(filmID: $id) { episodeID title director releaseDate } }

인수를 사용하여 도구를 호출합니다.

gqai tools/call get_film_by_id '{"id": "1"}'

이렇게 하면 제공된 인수로 get_film_by_id 도구가 실행됩니다.

{ "data": { "film": { "episodeID": 1, "title": "A New Hope", "director": "George Lucas", "releaseDate": "1977-05-25" } } }

개발

필수 조건

  • 1.20+로 이동

짓다

go build -o gqai main.go

시험

go test ./...

체재

go fmt ./...

MCP 서버 실행

./gqai run --config .graphqlrc.yml

CLI 실행

./gqai tools/call get_all_films

GQAI 소개

🤖 왜 gqai인가요?

gqai를 사용하면 GraphQL 백엔드를 모델 기반 도구 계층으로 쉽게 전환할 수 있습니다. 코드나 추가 인프라가 필요 없습니다. 작업을 정의하고 AI가 호출하도록 하세요.

📜 라이센스

MIT - 포크하고, 그걸 기반으로 구축하고, 모든 것을 다 하세요.

👋 저자

Stephen Spalding && <your-name-here> 가 ❤️와 🤖분위기를 담아 만들었습니다.

-
security - not tested
A
license - permissive license
-
quality - not tested

Related MCP Servers

  • A
    security
    A
    license
    A
    quality
    Kagi search API integration
    Last updated -
    1
    41
    MIT License
    • Apple
  • A
    security
    A
    license
    A
    quality
    Enables AI models to search, retrieve, and utilize GIFs from Giphy with features like content filtering, multiple search methods, and comprehensive metadata.
    Last updated -
    3
    18
    23
    MIT License
  • -
    security
    A
    license
    -
    quality
    Algolia
    Last updated -
    25
    MIT License
    • Apple

View all related MCP servers

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/fotoetienne/gqai'

If you have feedback or need assistance with the MCP directory API, please join our Discord server