drio
Open app

GraphQL MCP Server

Source

MCP server for dynamic graphql

Catalog onlyCatalog onlySTDIO

Overview

GraphQL MCP Server is a strongly-typed TypeScript Model Context Protocol (MCP) server that provides seamless access to any GraphQL API through Claude AI.

To use the GraphQL MCP Server, you can either install it globally via npm or clone the repository. After setting up the environment variables with your GraphQL API details, you can build and run the server.

  • Strongly Typed: Built with TypeScript for improved code quality and type safety. - Dynamic GraphQL Integration: Connect to any GraphQL API with automatic tool generation. - Schema Introspection: Automatically discovers and exposes all GraphQL operations as tools. - Full Mutation Support: First-class support for GraphQL mutations with proper handling. - Query & Mutation Whitelisting: Optional whitelisting to control which GraphQL operations are exposed. - Rich Type Support: Properly handles complex GraphQL types, input objects, and variables. - MCP Standard Compliant: Follows the Model Context Protocol format for seamless Claude integration. - Smart Query Generation: Builds efficient GraphQL queries with proper field selection. - Authentication Support: Simple API key authentication.
  1. Seamlessly integrating various GraphQL APIs into applications.
  2. Automating the generation of tools for GraphQL operations.
  3. Enhancing Claude AI capabilities with dynamic GraphQL data access.

Add to your AI client

Use these steps to connect GraphQL MCP Server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.

Cursor

Add this to your .cursor/mcp.json file in your project root, then restart Cursor.

.cursor/mcp.json

{
  "mcpServers": {
    "graphql-mcp-ctkadvisors": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-graphql-mcp-ctkadvisors"
      ]
    }
  }
}

Claude Desktop

Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

{
  "mcpServers": {
    "graphql-mcp-ctkadvisors": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-graphql-mcp-ctkadvisors"
      ]
    }
  }
}

Claude Code

Add this to your project's .mcp.json file. Claude Code will detect it automatically.

.mcp.json (project root)

{
  "mcpServers": {
    "graphql-mcp-ctkadvisors": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-graphql-mcp-ctkadvisors"
      ]
    }
  }
}

VS Code (Copilot)

Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.

.vscode/mcp.json

{
  "servers": {
    "graphql-mcp-ctkadvisors": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-graphql-mcp-ctkadvisors"
      ]
    }
  }
}

Windsurf

Add this to your Windsurf MCP config file, then restart Windsurf.

~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "graphql-mcp-ctkadvisors": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-graphql-mcp-ctkadvisors"
      ]
    }
  }
}

Cline

Open Cline settings, navigate to MCP Servers, and add this server configuration.

Cline MCP Settings (via UI)

{
  "mcpServers": {
    "graphql-mcp-ctkadvisors": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-graphql-mcp-ctkadvisors"
      ]
    }
  }
}

FAQ

Can I use GraphQL MCP Server with any GraphQL API?

Yes! It is designed to connect to any GraphQL API.

Is there a cost associated with using GraphQL MCP Server?

The project is licensed under the Business Source License 1.1, allowing non-commercial use for free.

How do I handle authentication?

You can set up simple API key authentication in the environment variables.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":3127,"uuid":"a6bfce02-8bea-4d7b-a978-f779696704d1","name":"graphql-mcp","title":"GraphQL MCP Server","description":"MCP server for dynamic graphql","avatar_url":"https://avatars.githubusercontent.com/u/187697541?v=4","created_at":"2025-03-18T02:57:21.241Z","updated_at":"2025-03-18T14:04:22.618Z","status":"created","author_name":"ctkadvisors","author_avatar_url":"https://avatars.githubusercontent.com/u/187697541?v=4","tags":"[]","category":"developer-tools","is_featured":false,"sort":1,"url":"https://github.com/ctkadvisors/graphql-mcp","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":"{\"star\":\"0\",\"license\":\"View license\",\"language\":\"JavaScript\",\"is_official\":false,\"latest_commit_time\":\"2025-03-17 15:53:01\"}","user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]