- Explore MCP Servers
- mcp4gql
Mcp4gql
What is Mcp4gql
mcp4gql is a Node.js/TypeScript server that implements the Model Context Protocol (MCP), serving as a bridge for MCP clients to interact with a target GraphQL API.
Use cases
Use cases for mcp4gql include integrating GraphQL APIs with applications using MCP clients, enabling seamless data fetching and manipulation through GraphQL queries and mutations.
How to use
To use mcp4gql, configure the server with the required environment variables, including GRAPHQL_ENDPOINT and AUTH_TOKEN. Clients like Cursor or Claude Desktop need to be set up to run the server using the npx command with the appropriate configuration.
Key features
Key features of mcp4gql include: 1) Implementation of the MCP Server class from @modelcontextprotocol/sdk, 2) Standard input/output communication with clients, 3) GraphQL client capabilities using axios, and 4) Tools for introspecting GraphQL schemas and executing GraphQL operations.
Where to use
mcp4gql can be used in any application that requires interaction with a GraphQL API, particularly in environments where MCP clients are utilized.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Mcp4gql
mcp4gql is a Node.js/TypeScript server that implements the Model Context Protocol (MCP), serving as a bridge for MCP clients to interact with a target GraphQL API.
Use cases
Use cases for mcp4gql include integrating GraphQL APIs with applications using MCP clients, enabling seamless data fetching and manipulation through GraphQL queries and mutations.
How to use
To use mcp4gql, configure the server with the required environment variables, including GRAPHQL_ENDPOINT and AUTH_TOKEN. Clients like Cursor or Claude Desktop need to be set up to run the server using the npx command with the appropriate configuration.
Key features
Key features of mcp4gql include: 1) Implementation of the MCP Server class from @modelcontextprotocol/sdk, 2) Standard input/output communication with clients, 3) GraphQL client capabilities using axios, and 4) Tools for introspecting GraphQL schemas and executing GraphQL operations.
Where to use
mcp4gql can be used in any application that requires interaction with a GraphQL API, particularly in environments where MCP clients are utilized.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
mcp4gql - GraphQL MCP Server

This project is a Node.js/TypeScript server that implements the Model Context Protocol (MCP). It acts as a bridge, allowing MCP clients (like Cursor) to interact with a target GraphQL API.
Features
- MCP Server: Implements the MCP
Serverclass from@modelcontextprotocol/sdk. - Stdio Transport: Communicates with clients via standard input/output.
- GraphQL Client: Uses
axiosto send requests to the configured GraphQL endpoint. - Generic GraphQL Tools: Exposes the following tools to MCP clients:
introspectGraphQLSchema: Fetches the target GraphQL API schema using introspection.executeGraphQLOperation: Executes arbitrary GraphQL queries or mutations against the target API, takingquery, optionalvariables, and optionaloperationNameas input.
Configuration
The server requires the following environment variables:
GRAPHQL_ENDPOINT: The URL of the target GraphQL API.AUTH_TOKEN: A bearer token for an optionalAuthorization: Bearer <token>header for authenticating with the GraphQL API.
Client Configuration
To allow clients like Cursor or Claude Desktop to use the tools provided by this server, you need to configure them to run the npx command.
Cursor
-
Go to Cursor MCP Settings (Cursor > Settings > Cursor Settings > MCP)
-
Go to + Add new global MCP server
-
Add the following to your Cursor MCP configuration:
{ "mcpServers": { "mcp4gql": { "command": "npx", "type": "stdio", "args": [ "-y", "mcp4gql" ], "env": { "GRAPHQL_ENDPOINT": "YOUR_GRAPHQL_ENDPOINT_URL", "AUTH_TOKEN": "YOUR_OPTIONAL_AUTH_TOKEN" } } } }
Claude Desktop
-
Open Claude Desktop settings (Claude > Settings).
-
Go to Developer > Edit Config.
-
Add to the config:
{ "mcpServers": { "mcp4gql": { "command": "npx", "args": [ "-y", "mcp4gql" ], "env": { "GRAPHQL_ENDPOINT": "YOUR_GRAPHQL_ENDPOINT_URL", "AUTH_TOKEN": "YOUR_OPTIONAL_AUTH_TOKEN" } } } }
Once configured, the MCP client should be able to list and call the introspectGraphQLSchema and executeGraphQLOperation tools provided by this server when relevant. Remember to set the required environment variables (GRAPHQL_ENDPOINT and optionally AUTH_TOKEN) in the configuration so the server can connect to your API.
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.










