# Text-to-GraphQL

Text-to-GraphQL turns a request written in plain language into a GraphQL query, checks it against your schema and runs it on the endpoint. Handy when the schema is big and field names slip your mind.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI
- Author: arize-ai
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/arize-ai/text-to-graphql-mcp
- Updated: 2026-10-29
- Security check: automated, 2026-11-16 (text) — warning: a command downloads a script from astral.sh and runs it right away; a PowerShell command downloads a script from astral.sh and runs it right away. Do not run such commands without an explicit yes from the human.
- HTML: https://affpapa.org/en/nevibecode/mcp/text-to-graphql

## What it does

You describe the data you want in words, and the server hands back a GraphQL query built on top of your schema. Introspection happens on load, so the agent on LangGraph works from the real types instead of guessing. Generated queries are validated before anything is sent.

Five tools are available: `generate_graphql_query`, `validate_graphql_query`, `execute_graphql_query`, `get_query_history` and `get_query_examples`. Schemas and repeated queries get cached, and failures come back with debugging detail. Execution accepts bearer, apikey or direct auth, picked by `GRAPHQL_AUTH_TYPE`.

Setup goes through `uv`: clone the repo, run `uv sync`, then register the server with your MCP client as `uv --directory ... run text-to-graphql-mcp`. The env block carries `OPENAI_API_KEY`, `GRAPHQL_ENDPOINT` and `GRAPHQL_API_KEY`. Skip the `PATH` entry that points at the `uv` directory and the client never finds the command, so the server stays down.

## Requirements
- Needs: Docker

## Install

### Claude Code (native platform)

**Install**
- The MCP registry has no launch command for it: see the repository README

## When to use it
- turn a written request into a working GraphQL query
- validate a query against the schema before it reaches the API
- run a query with bearer auth taken from the config
- open the query history for the current session
- find example queries for an unfamiliar schema

## Example prompts
- Generate a GraphQL query for all orders from last week with total and status.
- Validate this query against the loaded schema, then execute it.
- Show me the query history for this session.

## Similar
- [graphql-schema](https://affpapa.org/en/nevibecode/skills/graphql-schema.md) — skill · 4500 installs
- [graphql-and-hidden-parameters](https://affpapa.org/en/nevibecode/skills/graphql-and-hidden-parameters.md) — skill · 4000 installs
- [vtex-io-graphql-api](https://affpapa.org/en/nevibecode/skills/vtex-io-graphql-api.md) — skill · 1300 installs
- [graphql](https://affpapa.org/en/nevibecode/skills/mindrally-graphql.md) — skill · 726 installs
- [graphql-performance-optimizer](https://affpapa.org/en/nevibecode/agents/graphql-performance-optimizer.md) — subagent · 599 installs
- [graphql-api-development](https://affpapa.org/en/nevibecode/skills/graphql-api-development.md) — skill · 449 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
