mcp4gql is an MCP server that acts as a bridge, allowing MCP clients to interact directly with any target GraphQL API. Built with Node.js and TypeScript, it implements the Model Context Protocol using standard input and output (stdio) transport and makes remote HTTP calls via Axios. Software engineers, API developers, and technical teams use mcp4gql to inspect remote schemas and execute queries without leaving their AI-driven development workflows. The server exposes tools to retrieve the remote API schema through GraphQL introspection and execute arbitrary GraphQL queries or mutations against the target service. It supports authentication via a configurable bearer token, enabling AI assistants to explore complex data graphs, build queries against documented types, and retrieve live data directly from endpoints inside environments like Cursor and Claude Desktop.
Category: Developer Tools & Code Intelligence
Tags: api-bridge, graphql, introspection, query
claude_desktop_config.json). 3. Add mcp4gql to the mcpServers object: json { "mcpServers": { "mcp4gql": { "command": "npx", "args": ["-y", "mcp4gql"], "env": { "GRAPHQL_ENDPOINT": "YOUR_GRAPHQL_ENDPOINT_URL", "AUTH_TOKEN": "YOUR_OPTIONAL_AUTH_TOKEN" } } } } 4. Replace YOUR_GRAPHQL_ENDPOINT_URL with your target GraphQL API address and supply a token for AUTH_TOKEN if authentication is required. 5. Save the configuration and restart your MCP client.Part of MCP Servers
mcp4gql enables MCP-compatible AI assistants to interact with GraphQL endpoints. It provides tools to introspect GraphQL schemas and execute arbitrary operations, including queries and mutations with optional variables and operation names, returning the results directly to the AI client.
mcp4gql works with any MCP client that supports standard input and output transport mechanisms. This includes desktop environments like Claude Desktop as well as developer code editors like Cursor.
You do not need to install it separately if you configure your client to run it via npx. Add mcp4gql to your client MCP configuration using npx with the -y flag and the mcp4gql package name, along with the required environment variables.
mcp4gql requires GRAPHQL_ENDPOINT pointing to your target GraphQL service URL. It also supports an optional AUTH_TOKEN environment variable, which attaches a Bearer token authorization header to outgoing API requests.