Get the FREE Ultimate OpenClaw Setup Guide →

github-graphql

MCP server from QuentinCody/github-graphql-mcp-server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio quentincody-github-graphql-mcp-server python github_graphql_mcp_server.py \
  --env GITHUB_TOKEN="your_github_token_here"

How to use

This MCP server exposes a single tool that lets you execute arbitrary GraphQL queries and mutations against GitHub's GraphQL API. After starting the server with a valid GitHub token, you can issue GraphQL operations through the MCP interface by calling the github-graphql tool. It supports standard GraphQL features such as variables, fragments, and inline arguments, and it returns structured results along with error information when applicable. Use cases include fetching repository data, user details, and performing searches, all within the GitHub GraphQL schema.

To use the tool, ensure your environment provides the GITHUB_TOKEN as an environment variable. When you query, provide your GraphQL query string and, if needed, a variables object in the request payload. The server handles authentication, error reporting, and response formatting, so you can focus on crafting valid GraphQL operations and interpreting the results.

How to install

Prerequisites:

  • Python 3.10 or higher
  • Git and access to the repository
  • A GitHub Personal Access Token (PAT) with appropriate scopes

Installation steps:

  1. Clone the repository git clone https://github.com/quentincody/github-graphql-mcp-server.git
  2. Create and activate a virtual environment (recommended)

    macOS/Linux

    python3 -m venv .venv source .venv/bin/activate

    Windows

    python -m venv .venv\Scripts\activate
  3. Install dependencies pip install -r requirements.txt
  4. Run the server (provide your GitHub token via environment variable) GITHUB_TOKEN=your_github_token_here python github_graphql_mcp_server.py

If you plan to integrate with Claude Desktop, configure the corresponding entry to point to the Python interpreter inside your virtual environment and the path to github_graphql_mcp_server.py, as shown in the README:

Additional notes

Tips and common issues:

  • Ensure your GITHUB_TOKEN has the necessary permissions for the operations you want to perform.
  • Activate your virtual environment before launching the server to guarantee Python dependencies are available.
  • Use absolute paths when configuring Claude Desktop integrations to avoid path resolution issues.
  • Check server logs for error messages if queries fail or tokens are not recognized.
  • GitHub API rate limits apply; authenticated requests have higher limits than unauthenticated requests.

Related MCP Servers

Sponsor this space

Reach thousands of developers