GitHub GraphQL MCP Server
A Model Context Protocol (MCP) server that provides access to GitHub's GraphQL API. This server exposes a single tool that allows executing arbitrary GraphQL queries and mutations against GitHub's API.
Features
- Execute any GraphQL query against GitHub's API
- Comprehensive error handling and reporting
- Detailed documentation with example queries
- Support for variables in GraphQL operations
Prerequisites
- Python 3.10 or higher
- A GitHub Personal Access Token (PAT)
Installation
- Clone this repository
- Set up a virtual environment (recommended):
# On macOS/Linux python3 -m venv .venv source .venv/bin/activate # On Windows python -m venv .venv .venv\Scripts\activate - Install dependencies:
pip install -r requirements.txt
Usage
Running the Server
# If using a virtual environment, make sure it's activated
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Run the server with your GitHub token
GITHUB_TOKEN=your_github_token_here python github_graphql_mcp_server.py





