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

    82ch

    MCP-Dandan - MCP Security Framework

    MCP Security Solution for Agentic AI β€” real-time proxying, behavior analysis, and malicious tool detection

    Community 82ch
    Vvkmnn

    claude-historian-mcp

    πŸ€– An MCP server for Claude Code conversation history

    Community Vvkmnn
    tommyreid622

    Polymarket Copy Trading Bot

    Polymarket trading bot: Polymarket copytrading bot, Polymarket arbitrage bot on Polymarket, Monitor real price on Polymarket and calculate prob and automatically mirror positions with intelligent sizing and safety checks on Polymarket.(copytrading bot & arbitrage bot))

    Community tommyreid622
    aws

    MCP Proxy for AWS

    AWS MCP Proxy Server

    Community aws
    railsblueprint

    Blueprint MCP

    MCP server for browser automation across Chrome, Firefox, and Safari using real browser profiles

    Community railsblueprint