Text-to-GraphQL — Claude Code MCP server: what it does, how to install
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.
no license updated 2026-10-29
Open on GitHubWhat Text-to-GraphQL 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.
What it helps with
- 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 for the agent
- 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.
How to install Text-to-GraphQL
Install
The MCP registry has no launch command for it: see the repository README
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Text-to-GraphQL
How do I install Text-to-GraphQL?
Clone the repo with git clone https://github.com/Arize-ai/text-to-graphql-mcp.git, then cd text-to-graphql-mcp, uv sync and check it with uv run text-to-graphql-mcp --help. Then add the server to your MCP config as uv --directory /path/to/text-to-graphql-mcp run text-to-graphql-mcp with the env variables filled in.
What does Text-to-GraphQL do?
It takes a plain-language request, builds a GraphQL query from your schema, validates that query and can execute it against the endpoint. A LangGraph agent handles the translation, and query history lives for the session.
What do I need before it works?
uv installed with its directory listed in the PATH env entry, an OPENAI_API_KEY, plus GRAPHQL_ENDPOINT and GRAPHQL_API_KEY for the target API.