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

    kunwar-shah

    Claudex

    MCP server with persistent memory + FTS5 search for Claude Code conversation history. Index your ~/.claude/projects/, expose 10 MCP tools, browse via web UI. MIT-licensed.

    Community kunwar-shah
    phasespace-labs

    palinode

    The memory substrate for AI agents and developer tools. Git-versioned, file-native, MCP-first.

    Community phasespace-labs
    egebese

    DataSEO MCP

    A free SEO research tool using Model Context Protocol (MCP) powered by Ahrefs data. Get backlink analysis, keyword research, traffic estimation, and more β€” directly in your AI-powered IDE.

    Community egebese
    mcpware

    Cross-Code Organizer (CCO)

    Cross-Code Organizer (formerly Claude Code Organizer): cross-harness config dashboard for Claude Code, Codex CLI, MCP servers, skills, memories, agents, sessions, security scanning, context budget, and backups.

    Community mcpware