SuperAPIAI Directory

text-to-graphql-mcp

github.com · AI developer platforms

Text-to-GraphQL MCP is an MCP (Model Context Protocol) server built on LangGraph that converts natural language descriptions into GraphQL queries. It can be integrated into AI assistant clients such as Claude Desktop and Cursor, providing capabilities including GraphQL schema loading and introspection, query validation, authenticated query execution, query history, caching, and example queries, helping developers and non-technical users interact with GraphQL APIs more conveniently. The project adopts a multi-agent architecture, supports deployment via UV, PyPI, or Docker, and is licensed under the Elastic License 2.0.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsmacOS · Linux · API

About this tool

Purpose Text-to-GraphQL MCP aims to bridge the gap between natural language and GraphQL APIs. Through a server that follows the MCP (Model Context Protocol), it converts users' natural language descriptions into valid GraphQL queries and can be seamlessly integrated into MCP-compatible AI assistant clients such as Claude Desktop and Cursor, making it easier for developers and even non-technical users to interact with databases and APIs.

Key Capabilities

  • Natural language to GraphQL: Convert English natural language descriptions into valid GraphQL queries.
  • Schema management: Load and introspect GraphQL schema information.
  • Query validation: Validate generated queries against the loaded schema.
  • Query execution: Execute queries against GraphQL endpoints and return formatted results, with authentication support.
  • Query history: Record and manage all queries in the current session.
  • Example queries: Provide example queries to help understand system capabilities.
  • Caching: Built-in caching mechanism that caches schemas and frequently used queries.
  • MCP protocol compatibility: Compatible with Claude Desktop, Cursor, and other MCP clients.

Architecture and Usage The system adopts a multi-agent architecture based on LangGraph, including stages such as intent recognition, schema management, query construction, query validation, query execution, and data visualization suggestions. Before use, UV must be installed (recommended), and the UV installation path must be obtained for MCP configuration (the common path on Linux/macOS is ~/.local/bin).

In Cursor, add the configuration to .cursor/mcp.json; in Claude Desktop, add it to its MCP configuration file (on macOS, ~/Library/Application Support/Claude/claude_desktop_config.json; on Windows, %APPDATA%\Claude\claude_desktop_config.json). When configuring, replace the actual repository path and UV path, set the PATH environment variable, and fill in the API key. You can also use a .env file with a simplified configuration, or run the MCP server directly toTest.

The project also supports Docker deployment: build the image, create a .env file and run the container, or use docker-compose.yml. When using Docker, environment variables (such as OPENAI_API_KEY, GRAPHQL_ENDPOINT, etc.) need to be set when the container starts; the MCP client configuration is only responsible for connecting to an already running container and communicating with it via docker exec.

Authentication configuration Multiple authentication methods are supported: bearer (Authorization: Bearer <token>, the standard method for most GraphQL APIs), apikey (X-API-Key: <key>, as used by Arize), direct (Authorization: <token>, without the Bearer prefix), and custom authentication formats via GRAPHQL_HEADERS. The materials provide configuration examples for the GitHub, Shopify, and Arize GraphQL APIs.

Use cases Suitable for developers who need to query GraphQL APIs in natural language, non-technical users who want to lower the barrier to using GraphQL, and scenarios that integrate GraphQL query capabilities into AI assistants such as Claude Desktop and Cursor.

Limitations and notes The project uses the Elastic License 2.0 (ELv2). The materials note that the PyPI installation method is marked as "when published", i.e., available after publication. The materials do not provide specific pricing, cost, or performance data. The materials also mention that Arize Phoenix can be combined for observability and agent development, but do not elaborate on specific integration steps.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools