mcp4gql
An MCP server that acts as a bridge, allowing MCP clients to interact with a target GraphQL API.
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.
관련 서버
Scout Monitoring MCP
스폰서Put performance and error data directly in the hands of your AI assistant.
Alpha Vantage MCP Server
스폰서Access financial market data: realtime & historical stock, ETF, options, forex, crypto, commodities, fundamentals, technical indicators, & more
HAL (HTTP API Layer)
An MCP server that enables Large Language Models to make HTTP requests and interact with web APIs. It supports automatic tool generation from OpenAPI/Swagger specifications.
LogAI MCP Server
An MCP server for log analysis using the LogAI framework, with optional Grafana and GitHub integrations.
Remote MCP Server (Authless)
An example of a remote MCP server without authentication, deployable on Cloudflare Workers.
AI Agent Playwright
An AI agent for the Playwright MCP server, enabling automated web testing and interaction.
MCP-Compose
Orchestration tool for managing multiple MCP servers with a Docker Compose-style interface and a unified HTTP proxy.
Elementor MCP Server
Perform CRUD operations on Elementor page data for a target WordPress website.
CRAN Package README MCP Server
Fetch comprehensive information about CRAN packages, including READMEs, metadata, and search functionality.
MCP Bridge for Zotero
MCP server that enables AI assistants to build, test, and debug Zotero plugins via 26 tools for UI inspection, JS execution, logging, and more.
Octomind
Create and manage end-to-end tests using the Octomind platform.
Elementor WordPress MCP Server
An MCP server for WordPress and Elementor, enabling AI assistants to manage content and build pages.