mcp4gql

mcp4gql

GraphQL MCP Server that acts as a bridge allowing MCP clients (like Cursor or Claude Desktop) to interact with target GraphQL APIs through standard tools for schema introspection and operation execution.

Category
Visit Server

Tools

introspectGraphQLSchema

Fetches the schema of the target GraphQL API using introspection. Returns the schema in JSON format.

executeGraphQLOperation

Executes an arbitrary GraphQL query or mutation against the target API. Use introspectGraphQLSchema first to understand the available operations.

README

mcp4gql - GraphQL MCP Server

smithery badge

mcp4gql

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 Server class from @modelcontextprotocol/sdk.
  • Stdio Transport: Communicates with clients via standard input/output.
  • GraphQL Client: Uses axios to 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, taking query, optional variables, and optional operationName as 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 optional Authorization: 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

  1. Go to Cursor MCP Settings (Cursor > Settings > Cursor Settings > MCP)

  2. Go to + Add new global MCP server

  3. 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

  1. Open Claude Desktop settings (Claude > Settings).

  2. Go to Developer > Edit Config.

  3. 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.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured