fotoetienne

gqai

Community fotoetienne
Updated

Turn any GraphQL endpoint into a set of MCP tools

gqai

graphql β†’ ai

gqai is a lightweight proxy that exposes GraphQL operations as Model Context Protocol (MCP) tools for AI models like ChatGPT. It lets you define tools using regular GraphQL queries/mutations and run them locally or expose them over HTTP.

πŸ”Œ Powered by your GraphQL backend βš™οΈ Driven by .graphqlrc.yml + plain .graphql files 🧠 Model-ready inputs/outputsπŸ“ Built in Go

✨ Features

  • 🧰 Run GraphQL operations as tools via CLI
  • 🌐 Serve tools via HTTP for AI agents
  • πŸ—‚ 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: "operations"

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

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

  1. Write a GraphQL operation (operations/getAllFilms.graphql):
query getAllFilms {
  allFilms {
    films {
      title
      episodeID
    }
  }
}
  1. Run it via CLI:
gqai run getAllFilms

🌐 HTTP Server

Run a local server that exposes your tools via HTTP:

gqai serve

Call the tools via HTTP POST requests:

curl -X POST http://localhost:8080/tools/call  -d '{"toolName": "getAllFilms"}'

πŸ“¦ Tool Metadata

Auto-generated tool specs for each operation, so you can plug into any LLM that supports tool use.

πŸ€– Why gqai?

gqai makes it easy to turn your GraphQL backend into a model-ready tool layer β€” no wrappers, no extra infra. Just define your operations and let AI call them.

πŸ§ͺ Roadmap

  • CLI tool runner

  • HTTP server mode (gqai serve)

  • Tool metadata generation

  • JSON Schema validation

  • Plug-and-play with OpenAI, Fireworks, etc.

πŸ“œ License

MIT β€” fork it, build on it, model all the things.

πŸ‘‹ Author

Made with ❀️ and πŸ€–vibes by Stephen Spalding

MCP Server Β· Populars

MCP Server Β· New

    jonashertner

    OpenCaseLaw

    Open Swiss legal corpus + MCP server: 1M+ court decisions (1875–today), 21k laws, 10M-edge citation graph, 42 MCP tools. CC0 data, MIT code. Live at mcp.opencaselaw.ch

    Community jonashertner
    SystemCraftsman

    Strimzi Kafka CLI

    Command Line Interface for the Strimzi Kafka Operator

    Community SystemCraftsman
    DROOdotFOO

    Raxol

    Write one app, render it to a terminal, a browser, or as agent tools. The terminal for your Gundam.

    Community DROOdotFOO
    morluto

    REA: Reverse Engineer Anything

    Reverse engineer anything with agents, from app behavior down to native binaries.

    Community morluto
    nedlir

    MCPwner

    Model Context Protocol server for autonomous vulnerability discovery

    Community nedlir