GraphQL
About
Transforms any GraphQL API into dynamic tools through automatic schema introspection, enabling direct access to structured data with parameter validation and configurable security controls.
Details
- Author
- ctkadvisors
- Repository
- ctkadvisors/graphql-mcp
- GitHub stars
- 4
- License
- Other
- Categories
- Developer Tools, API, Other, Design, Search, Infrastructure, Security
- Tags
- #visualization, #integration
Jump to
- 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
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
GraphQLCommand (node, npx, python, etc.)nodeArguments-
Argument 1
/absolute/path/to/dist/graphql-mcp-server.js
Environment-
GRAPHQL_API_KEY
your-api-key-if-needed -
WHITELISTED_QUERIES
["countries","continent","languages"] -
GRAPHQL_API_ENDPOINT
https://your-graphql-api.com/graphql
Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
-
Argument 1
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
npm install -g graphql-mcp
npm install
Copy the sample env file and update it with your GraphQL API details:
cp .env.sample .env.development
Edit .env.development with your GraphQL API endpoint and optional API key.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"graphql": {
"env": {
"GRAPHQL_API_KEY": "your-api-key-if-needed",
"WHITELISTED_QUERIES": "[\"countries\",\"continent\",\"languages\"]",
"GRAPHQL_API_ENDPOINT": "https://your-graphql-api.com/graphql"
},
"args": [
"/absolute/path/to/dist/graphql-mcp-server.js"
],
"command": "node"
}
}
}
Linux
{
"env": {
"GRAPHQL_API_KEY": "your-api-key-if-needed",
"WHITELISTED_QUERIES": "[\"countries\",\"continent\",\"languages\"]",
"GRAPHQL_API_ENDPOINT": "https://your-graphql-api.com/graphql"
},
"args": [
"/absolute/path/to/dist/graphql-mcp-server.js"
],
"command": "node"
}
Macos
{
"env": {
"GRAPHQL_API_KEY": "your-api-key-if-needed",
"WHITELISTED_QUERIES": "[\"countries\",\"continent\",\"languages\"]",
"GRAPHQL_API_ENDPOINT": "https://your-graphql-api.com/graphql"
},
"args": [
"/absolute/path/to/dist/graphql-mcp-server.js"
],
"command": "node"
}
Windows
{
"env": {
"GRAPHQL_API_KEY": "your-api-key-if-needed",
"WHITELISTED_QUERIES": "[\"countries\",\"continent\",\"languages\"]",
"GRAPHQL_API_ENDPOINT": "https://your-graphql-api.com/graphql"
},
"args": [
"/c",
"node",
"/absolute/path/to/dist/graphql-mcp-server.js"
],
"command": "cmd"
}
GraphQL MCP Server
A strongly-typed TypeScript Model Context Protocol (MCP) server that provides seamless access to any GraphQL API through Claude AI.
Features
- 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
Repository Structure
graphql-mcp/
├── src/
│ └── graphql-mcp-server.ts # Main server implementation (TypeScript)
├── dist/ # Compiled JavaScript (generated)
├── docs/
│ ├── GETTING_STARTED.md # Setup and usage guide
│ ├── PROJECT_STATUS.md # Current project status
│ └── TECHNICAL.md # Technical documentation
├── .env.development # Environment variables
├── .env.sample # Sample environment template
├── claude_desktop_sample_config.json # Sample Claude Desktop config
├── package.json # Project dependencies
├── tsconfig.json # TypeScript configuration
├── run-graphql-mcp.sh # Script to run the server
└── README.md # This file
Prerequisites
- Node.js 18 or later
- TypeScript 5.x or later
- Claude Desktop with MCP support
- A GraphQL API endpoint (defaults to the Countries API if not specified)
Installation
Option 1: From npm
```bash
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





